Archived Months
June 2003
July 2003
August 2003
September 2003
October 2003
November 2003
December 2003
January 2004
February 2004
March 2004
April 2004
May 2004
June 2004
July 2004
August 2004
September 2004
October 2004
November 2004
December 2004
January 2005
February 2005
March 2005
April 2005
May 2005
June 2005
July 2005
August 2005
September 2005
October 2005
November 2005
December 2005
January 2006
February 2006
March 2006
April 2006
May 2006
June 2006
July 2006
August 2006
September 2006
October 2006
November 2006
December 2006
January 2007
February 2007
March 2007
April 2007
May 2007
June 2007
July 2007
August 2007
September 2007
October 2007
November 2007
December 2007
January 2008
February 2008
March 2008
April 2008


all groups > c# > march 2004 > threads for monday march 1

Filter by Day: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

swf file
Posted by Fabrizio at 3/1/2004 11:11:05 PM
Hi, I need to add a "onclick" event to an object with a Swf file on my web page There is anyway to use a swf file as a banner thank yo Fabrizio ...more >>

Can a Stream notify other objects when it has been changed?
Posted by Peter Rilling at 3/1/2004 10:56:38 PM
Is there anyway of being notified when a Stream is modified? Basically, If one of my objects is passed a stream, I would like to initialize an object cache. Then when the Stream changes, I would like to update the cache. Does not look like the stream has any event that I can hook. ...more >>

Moving mouse by code
Posted by Vlatko at 3/1/2004 10:40:19 PM
Can I set a x, y value of a mouse pointer (where I would like to set a mouse on the screen). I would like to move a mouse with my program. Can it be done? Thx ...more >>

tab char in a string...
Posted by Chuck Bowling at 3/1/2004 10:17:34 PM
how do i get a tab char into a string? i tried this and it didn't work... t.Question = "this is the \t\t\t first line" + Environment.NewLine + "the \r\n second broken line"; ...more >>

Re-Creating the Problem
Posted by C# Learner at 3/1/2004 10:13:32 PM
Here's a simple way to recreate my flicker problem. - Create a new project. - Put a ListBox on the form. - Resize it so that it can accompany 20 items. - Put a button on the form. - Double-click the button to add a Click event handler. - Insert the following code in the event handler: { ...more >>

How to add my own Method to existing class?
Posted by Matt Doggie at 3/1/2004 10:04:50 PM
In C#, the String class has a lot of Methods, such as "mystring".Trim(); I want to add my own Method so that the whole web application can use it. What I want is: "mystring".GetIt(); How do I do it? How do I override the String class so that the whole application knows about the change? ...more >>

How to add my own Method to existing class?
Posted by Matt Doggie at 3/1/2004 10:04:47 PM
In C#, the String class has a lot of Methods, such as "mystring".Trim(); I want to add my own Method so that the whole web application can use it. What I want is: "mystring".GetIt(); How do I do it? How do I override the String class so that the whole application knows about the change? ...more >>

INCLUDE
Posted by Dmitri Shvetsov at 3/1/2004 9:32:33 PM
Hi All, Does somebody know how can I include an external file into my C# source file? I need to insert the same strings (about 5-10) into about 75 different files, probably I will need to modify all these strings later, and I see it as a good idea to use an INSERT approach, but C# is not C+...more >>



Deny move within a listbox?
Posted by Byron at 3/1/2004 9:19:50 PM
I'm looking for a way to deny a move from the current listbox item. For instance, if the user is editing the record associated with the current listbox item I want to deny a move within the listbox until they have saved the changes. Is there any way to deny a move from the current item so the ...more >>

C# does not support Unicode?
Posted by Johannes at 3/1/2004 8:36:06 PM
Is it correct that Unicode characters with code points above 0x10FFFF are not supported by C# I have a hard time believing this since it would eliminate some Asian languages. If it is true, is there a workaround? Do other .NET languages support code points > 0x10FFFF I appreciate any comments T...more >>

C# does not support Unicode characters
Posted by Johannes at 3/1/2004 8:36:05 PM
Is it correct that Unicode characters with code points above 0x10FFFF are not supported by C#? I have a hard time believing this since it would eliminate some Asian languages. If it is true, is there a workaround? Do other .NET languages support code points > 0x10FFFF? I appreciate any comment...more >>

sockets: receive and transmit in one time ?
Posted by user NO[at]SPAM domain.invalid at 3/1/2004 8:29:04 PM
Hello I have a thread1 in which i am in infinite loop reading data from socket. But sometimes i want to transmit data using that socket (thread2 decides about it). Can i simply from thread2 call: networkStream.Write(); where networkStream is associated with socket from thread1. That socket ...more >>

C# for a serious desktop app? (newbie question)...
Posted by MustRide at 3/1/2004 7:50:05 PM
I am looking for the best tool to develop a multi-tiered desktop app. I know that C# is a solid choice, but HOW good of a choice is it in the long run? I will have a website (asp.net probably) tied into the app and components including Macromedia Flash, to name but one. Would C++ (or others?) pos...more >>

syntax coloring ctl?
Posted by Dan at 3/1/2004 7:23:42 PM
I'd like to show some XML text into an (editable) text box with some syntax coloring for tags, attributes etc. I don't need a full-blown commercial control, I'd just like to do some coloring on tags and the like. Is there any (possibly free!) C-Sharp control (based onto the RTF control, I imagine...more >>

ToolTip contextsensitive
Posted by Thomas Kehl at 3/1/2004 7:19:08 PM
Hi! Is there an event which will be called, before a ToolTip of a Control will be shown? I have binded with the SetToolTip()-Method of the ToolTip-class ToolTips to textboxes. Now, I want to show in the ToolTip text which is contextsensitive. Now, I think, when there will be a event before a ...more >>

SendMessage function?
Posted by Dave Veeneman at 3/1/2004 7:15:56 PM
I need to send a message (WM_SETREDRAW) to a windows form. However, I don't have a SendMessage() function, and I don't think C# or the .Net framework have such a function built-in. Can someone provide canonical C# code for such a function in C#? I'd like to avoid recreating the wheel. Thanks. ...more >>

Generating an Event at a specific time
Posted by dhourd NO[at]SPAM ozemail.com.au at 3/1/2004 6:24:14 PM
I'm performing a conversion of code from C to C# and I want to perform a callback to a function where the callback is performed at a certain time, like 2 March 2004 at 1:35pm. I realise there are loads of timers in C#, but they all perform repeatable events using an elapsed time which is ...more >>

VB pgmr needs help with Regex for C#
Posted by Mortimer Schnurd at 3/1/2004 5:46:43 PM
Hi All, I am a VB 6 programmer who is now trying to learn C#. In doing so, I am trying to convert some of my VB modules to C#. I routinely user Reg Expressions in VB and am having some trouble trying to use Regex in C#. Basically, I have a fixed format text file which I need to validate prior t...more >>

dynamic windows service name
Posted by Rami Saad at 3/1/2004 5:16:07 PM
Hi all, I am trying to install a service using dynamic naming. I wrote values in the configuration file, and trying to assign one of those values to a string, and using this string as the name of the installer <?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettin...more >>

Question about type-conversion in property
Posted by Simon Cheng at 3/1/2004 5:05:10 PM
Hi, Using VS.NET 2003, the following code fails compilation (as expected): ------------------------------------------- using System; class App { static public int I { get { return 1.0f; } } // Cannot implicitly convert type 'float' to 'int' static void Main() { Console.WriteLine...more >>

Xml classes
Posted by dave at 3/1/2004 4:54:29 PM
Hi, May someone tell me how can i use the C# XML classes to read an xml file? I need to make a class with the structre of the XML files and to rean number of xml files from the same directory and put them data in the class represent them, How can i read a number of xml file`s (with the same...more >>

C# and XML
Posted by C# newbie at 3/1/2004 4:22:36 PM
Hey guys, I've a method as below, which searches for some text or strings into an XML file. I pass an XPath query like: //*[contains(.,"Smith")] Which works fine! the problem: It only finds Smith not "smith" or "SmItH". I know there is an xml translate function but don't know how to use...more >>

RowFilter not working...pls help
Posted by Bamse at 3/1/2004 4:13:21 PM
hi, i have this situation: 1 gridDocs binded to a table, 1 gridRev + several controls binded to a dataset, which does not contain the above mentioned table; i want that when i select a row in gridDocs, get the id of the selected document and pass it to the RowFilter of the gridRev; then, the...more >>

Bitmap files
Posted by Ole-Johan Ellingsen at 3/1/2004 3:52:45 PM
Hi. I have a very custom image format that I have to save as a bitmap file. It is a black/white image. Also, I need to load a bitmap file and convert it to my custom format. What would be the easiest way of implementing this in C#? Thanks. Ole-Johan Ellingsen ...more >>

using catch
Posted by Abhishek Srivastava at 3/1/2004 3:33:22 PM
Hello All, I have seen code snippets like try { ..... } catch { throw; } What I wonder is that in this type of syntax, how does one log (on the console) the exception before throwing it? since we are not using any name of the exception? Thanks for your help. regards, ...more >>

COM references
Posted by C# beginner at 3/1/2004 3:32:58 PM
Hi all I posted this question earlier today. I did not get many resposes. Please help me out with this problem. Thanks a lot. ---------------------------------------------------------- I have two .NET applications, one is a C# class library that interoperates with COM and the other is a C# ...more >>

Are C# structs and C structs the same? Help needed
Posted by Angel at 3/1/2004 3:29:16 PM
I'm using several C functions (in a dll) that receive a struct as parameter. Since I'm doing it in C#, I assume I need to recreate the struct in C# in order to call the function with the required parameter. What would I need to do in order to convert a struct that looks like this: typedef str...more >>

doing other things while the program in loop
Posted by 2003et at 3/1/2004 3:16:28 PM
I want to show the number on the screen, while the program is in loop, at real time... But the program shows the number after loop ends... My program do nothing before loop ends... How can I prevent this? I don't want my program to stall while it is in loop... Thank you... ...more >>

Datagrid Custom GridTableStyle??
Posted by Darryn Ross at 3/1/2004 3:07:02 PM
Hi.... I am adding my own table and column style to my datagrid, but when i = view the form the field width isn' what i set it too in my code? A snippet of my code is as follows... DataGridTableStyle TSTblStyle =3D new DataGridTableStyle() ; TSTblStyle.MappingName =3D "tbl"; DataGr...more >>

C Sharp Book... Any good?
Posted by Dragon at 3/1/2004 3:02:59 PM
Hi, I have 'some' experience in VB. I would like to learn C-Sharp and would like to know if the following book is any good or not. Thank you. Microsoft Visual C# .NET Step by Step - Version 2003 by John Sharp and Jon Jagger ISBN:0735619093 ...more >>

Could not stop C# Windows Service with Server Explorer
Posted by Marco Liedekerken at 3/1/2004 2:59:34 PM
Hi, When I try to stop my C# Windows Service I get the message "Couldn't perform the requested operation for service ....". Other posts suggest that it has something todo with the config file (putting RemotingConfiguration.Configure(AppDomain.CurrentDomain.SetupInformation.Con figurationFile)...more >>

Arrays in C#
Posted by skrishnan NO[at]SPAM snet.net at 3/1/2004 2:27:45 PM
I think I have understood Arrays incorrectly in C#. I declared the following int[] myIntArray = new int[5] { 1,2,3,4,5 }; I assumed that this has created an Integer Array, and to access any element I would have to do the following : myIntArray[4]; However I see that there is also anothe...more >>

references
Posted by C# beginner at 3/1/2004 2:01:07 PM
Hi all I have two .NET applications, one is a C# class library that interoperates with COM and the other is a C# windows application that tests the C# class library. My test application was working fine and so was my class library. Earlier, I had problems with my C# class libary, so I had ...more >>

List box, quickly removing many items
Posted by Jeremy Owens-Boggs at 3/1/2004 1:56:52 PM
We are trying to implement a dual list box selection where you have two list boxes, You highlight items in the right side list box, click a button and this moves those items over to the left hand list box. The problem is that if there are many items selected (thousands), then removing the items ...more >>

database sums.
Posted by vncntj NO[at]SPAM hotmail.com at 3/1/2004 1:55:36 PM
I have this connection void Page_Load(Object sender, EventArgs e) { SqlConnection myConnection = new SqlConnection("server=1.1.1.1;uid=;pwd=;database=mdMuseumStore"); SqlDataAdapter myCommand = new SqlDataAdapter("SELECT * from Paintings_vw", myConnection); DataSet ds = new DataSet(); ...more >>

Persist code for a Collection (for my custom component)
Posted by Derrick at 3/1/2004 1:17:10 PM
Hello all; I have created a custom component, whose properties (let's call them myObjectA and an collection of myObjectB) I'm trying to set via a GUI. I have the GUI running after the user clicks a Designer Verb, and it gets the values for myObjectA and myObjectB correctly. The designer cr...more >>

OleDBDataAdpter update fails becorse of Fieldname in DB ??
Posted by Sagaert Johan at 3/1/2004 1:16:53 PM
The update seems to fail becorse of the fieldname in my DB One of the fields is called "Zone" in my MDB If i change the fieldname in both the database and in my test application, the error is gone.... Any explanation ? ...more >>

Converting C++ to C# issues
Posted by Eric Kinskofer at 3/1/2004 12:41:13 PM
Hi all, I'm a noobie to C# and am having probs with tyring to convert some legacy C++ code to C#. I've attached some psuedo code to try and explain the problem: ---code-- int headersize, bodysize, nLibIndex; HEADER_STRUCT* header = new HEADER_STRUCT(); header->member = value; .... a...more >>

calling unmanaged dll function with user-defined parms
Posted by Angel at 3/1/2004 12:35:30 PM
I'm trying to call a DLL function that receives as parameter a user-defined structure created by the company that made the dll. When I call the function from my main form, I call dllCalls.addVer("string1", "string2") -this is how I created the method in the class. Now, in this static method t...more >>

Remote Debugging
Posted by chris fink at 3/1/2004 11:50:33 AM
I am attempting to remote debug a process (C# application) whose execution time is less than 2 seconds. When attempting to attach this process from the client machine, I am unable to catch the process in time. Any suggestions on how to fix this issue? I understand once the process is attache...more >>

How post XML document using .NET?
Posted by Ronald S. Cook at 3/1/2004 11:39:01 AM
What is the C# code to post a simple XML document to a URL? Thanks. ...more >>

sending pop3 mail
Posted by Ken Nistler at 3/1/2004 11:32:28 AM
Hello, I was wondering if anyone can help me out. I am trying to send mail from a c# app thru my ISP pop3 mail server. I figured it would be similar to using SMTP, but use my username and password for authentication. I guess what I am trying to do is the same thing that outlook express doe...more >>

Examine the exported functions of a 'native' DLL
Posted by chadich NO[at]SPAM yahoo.com at 3/1/2004 11:26:21 AM
I have a non-COM, non-.NET DLL, apparently written in C++ but for which there is no source available (so I am told). I have tried the DumpBin utility and Dependancy Walker to examine the exported functions so that I can P/Invoke them from C# but I only ever see the names of the functions, never...more >>

Launching c# dialog from c++ application
Posted by natan13 NO[at]SPAM hotmail.com at 3/1/2004 11:03:49 AM
Hi, I need to launch a c# dialog from an application written in c++. I'm running into the problem that the c# dialog behaves as if its a different application. Clicking anywhere in the c++ application, including the main window hides the c# dialog. How do I get it to always stay on top of the ...more >>

Run process as another user
Posted by Sorin Dolha [MCSD .NET] at 3/1/2004 11:02:57 AM
I would like to start a process from C# code as another user. The C# = code is executed as the ASPNET user because it relies in a Web Page = class, and I would like that the process will run as another user to = gain the required rights for execution (the external process needs to = create a mai...more >>

event syntax question
Posted by Pat Richey at 3/1/2004 10:51:17 AM
i'm writing some events that need to be NonSerialized and to get it to work i ended up doing something like: [field: NonSerialized] public event OnEventHandler myEvent; because [NonSerialized] public event OnEventHandler myEvent; didn't compile. my question is: what does the 'field:...more >>

Windows DataGrid Question
Posted by Jim Heavey at 3/1/2004 10:24:27 AM
I am using a datagrid to present data in a WINDOWS application. If the user click on a cell within the grid, the datagrid allows the user to edit the value. I want to allow editing on certain columns, but disallow it on others. How do I do this? I am using a DataGridTableSyle to identify t...more >>

COM interop
Posted by C# beginner at 3/1/2004 10:10:32 AM
Hi all I am trying to call my C# class library from COM. My C# library works perfectly in the .NET environment. I have registered my C# component using regasm and also placed it in the GAC. But for some reason my VBScript COM component can't interop with .NET. I am calling my .NET component...more >>

wsprintf ?
Posted by user NO[at]SPAM domain.invalid at 3/1/2004 9:19:02 AM
Hello Can i use wsprintf in C#? is there any similar function ? Thanx ...more >>

desconexión de usuarios
Posted by José Achig at 3/1/2004 9:08:25 AM
Hola Cómo puedo saber el momento que un usuario de Windows ha cerrado la sesión?. La implementación de ésto debe ser desde un servicio de Windows que corre bajo la cuenta de Sistema Local. Muchas gracias por su ayuda ...more >>

including .cs ?
Posted by user NO[at]SPAM domain.invalid at 3/1/2004 8:57:11 AM
Hello I have classes (definition and body) in several .cs files, each .cs file for each class. How can i 'include' them in my main project, so i could use that class ? Thanx ...more >>

Enum with string values
Posted by vbextra NO[at]SPAM sbcglobal.net at 3/1/2004 8:19:57 AM
I want to return string values like below public enum PropType { All = "A", Mature = "M" } Is this possible at all? Is there any elegent way to return string values using enum?...more >>

Further Misery
Posted by C# Learner at 3/1/2004 8:12:13 AM
Even a ListBox causes large amounts of flicker when adding items: private void TestListBox() { listBox.BeginUpdate(); listBox.Items.Clear(); for (int i = 0; i < 20; ++i) { listBox.Items.Add("test"); } listBox.EndUpdate(); } Removing the BeginUpdate()/EndUpdate() calls has no...more >>

CryptoAPI from C# (long code part)
Posted by ehigionni NO[at]SPAM katamail.com at 3/1/2004 7:41:57 AM
I'm trying to sign a message using CrytpoAPI (I can't use CAPICOM because I have Biztalk could verify this sign). I'm traslating the example in MSDN library at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/security/security/example_c_program_signing_a_message_and_verifying_a_me...more >>

HOW TO: Create a single DataSet bound object used by 50 DropDownList box controls in the same web form. CSHARP
Posted by Bill at 3/1/2004 7:10:42 AM
I have a seating chart web form that has over 50 entry field controls (tables/booths) where I use a DropDownList box to select a single company name from a single large list of organizations (200 plus conference attendees). All web form datavalues will be one of the same 200 organizations in t...more >>

how to creat a single zip file out of two files (zipping and unzipping functionality)
Posted by seash at 3/1/2004 5:41:09 AM
H My application creates two files , i have to zip these two files to a a single file, how to use winzip functionality in c# Is there any builtin functions available with visual c# the two file are in text and binary formats , is it possible to Zip them and unzip in c# -----need hel ---------...more >>

Including resources in the standard Windows format.
Posted by borisyankov NO[at]SPAM yahoo.com at 3/1/2004 4:31:49 AM
I want to include icons as resources in my final C# .exe file in the standard Windows format. I added two icons to the project and set their property Build Action to Embedded Resource. This did not do the work. I managed to add the icons with the built-in resource editor but I will have to do...more >>

CommandBar for VS.NET IDE
Posted by Samuel at 3/1/2004 4:31:09 AM
Hi I want to customize our IDE. I developed some Add-ins and would like to create command bar to access them directly. I'm not sure if the term of "command bar" is appropriat. I mean with it a group of icon like the standard one of VS.NET to create a new project or a new element .. How can I to...more >>

client server upload file
Posted by fdsa42 NO[at]SPAM hotmail-dot-com.no-spam.invalid at 3/1/2004 4:18:58 AM
i'm planning to develop a client server system the client and server both able to upload picture client will upload the picture to a folder that reside in the server while server user can also upload picture to that folder also and then client and server can retrieve the picture from there. ...more >>

" i = 10 " gives " i == 6 " ?!?!?!
Posted by Maarten at 3/1/2004 3:08:30 AM
Hello, I'm a software engineer for a Dutch company and I am working on the improvement of a already made program and I've found a very curious problem. It consists of two parts, explained below: When one of my functions is called, the program works as it is supposed to do, but when I ...more >>

.NET *Fails*
Posted by C# Learner at 3/1/2004 2:59:55 AM
I've just recently messed with .NET /controls/, and I can't say I'm impressed. Several of them appear to be *highly* inefficient when it comes to screen updates (see my thread "ListView Unbearable" for a major example of this). These tests were run on a *brand new* PC, too. I can't bear t...more >>

Saving user prefs, form position, etc
Posted by VS Noob at 3/1/2004 2:39:50 AM
Hello. I'm developing Windows.Forms based applications, and each will need per-user persistent data consisting of user preferences, last form size/position, and the like. Is there a standard or recommended approach to this? I'm aware that such data is often stored in an appropriate HKCU\Sof...more >>

format number in a certain format
Posted by crowl NO[at]SPAM gmx.de at 3/1/2004 2:08:13 AM
Hi all, I want to have a number in a certain format. I took a look in the msdn and was happy to find the format-number Function. This works fine. But unfortunately, I can't find the format pattern specification. In the msdn I found some samples like format-number(5351,"#,###"), but not a de...more >>

Replace text in text file
Posted by Samuel at 3/1/2004 2:01:07 AM
Hi I would like to replace a string to an another into a text file (not a XML) Have someone a example that I can take a look ti Samuel...more >>

ListView Unbearable
Posted by C# Learner at 3/1/2004 1:15:31 AM
Has anyone else noticed ListView's unbearable flickering? I have a project containing a list-view with the following: - View: Details - Columns: 5 The following code causes the list-view to flicker: private void TestListView() { const int Num = 20; const string Text = "Test"; ...more >>

OleDB update command ?
Posted by Sagaert Johan at 3/1/2004 12:07:08 AM
I need some example I have a dataset populeted through a dataadapter fill method i can add rows to my dataset , but i have an exception when calling the dataadpters update method. I already spent 7 hours to solve this, yet i still am no step further. I might be missing something around the ...more >>


DevelopmentNow Blog