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# > june 2004 > threads for thursday june 3

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

Control is Flickering
Posted by Qumer Mumtaz at 6/3/2004 11:46:01 PM
H I am using a datagrid and a updown counter Control is added to one the cells of the datagrid. The problem is when I scroll horixentally or vertically the control starts Flickering.What I wanna do is, control does not flicker whenever I scroll horizentally or vertically Any help well comed Thanx...more >>

Question about Events and delegates
Posted by Flare at 6/3/2004 11:42:37 PM
Hi i have a qusstion about events and delegates. Especially the precis role of the Event. Eg. We have a class wich want to fire events so we declare: public delegate void TestEventHandler(object sender, EventArgs arg); public event TestEventHandler Test; And fire the event with if(Test...more >>

System.Diagnostics.Debug.Assert();
Posted by cody at 6/3/2004 11:24:15 PM
System.Diagnostics.Debug.Assert(); Hello??? A language should encourage programmers to heavily use the assert-feature, since it improves safety, stability, readability and maintainability of software. Most language designers recognized this, see C/C++ and Java which supports an assert keyword....more >>

Popup menu question
Posted by Paddy at 6/3/2004 10:40:48 PM
After creating a popup menu and writing the necessary additional code, nothing happens when I click the right hand mouse button. What is up? ...more >>

Error handle
Posted by Karunakararao at 6/3/2004 10:21:09 PM
Iam trying like this in VB.NET Try Catch expFillList As Exception Err.Raise(1, Err.Source, Err.Description) End Try how can i write in C# in database.cs how can i write in C# code like raising error in ERROR.aspx Thank u Venu ...more >>

public const not public ?
Posted by Sagaert Johan at 6/3/2004 9:54:41 PM
Hi public const char ETX='\u0003'; Does not seem to be public... Why ? If i remove the const keyword ,it then seems to work Johan ...more >>

explainable RegEx behavior?
Posted by relishguy NO[at]SPAM pluggedin.org at 6/3/2004 9:43:36 PM
OK, so I am was never so good on NFAs and DFAs, but I am just trying to get one of the Microsoft-supplied RegEx samples to work. It is the last example (describing the Capture class) from this page: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconusingregulare...more >>

Creating Object
Posted by David at 6/3/2004 9:18:23 PM
How can I check if the object is created? ...more >>



Regex Replace [B]sometext[/B]
Posted by DDK at 6/3/2004 8:40:10 PM
I am trying to figure out how to Replace tags such as [B]...[/B] with the correct HTML <b>...</b> tags in C#. The code below works however only if one set of tags are found, if you have more than two sets of the tags within the text it renders from the first [ and the last ]. Here is the c...more >>

Concatenating Object instance name in loop???
Posted by Isz at 6/3/2004 8:29:17 PM
I can do this easily enough in actionscript, but I would like to do it also in C#. I have 10 Image controls on the .aspx page. I want to create a loop that makes the first 'n' number of Images' control prroperty visible = true. My Image controls are named: Image1, Image2, Image3... etc. ...more >>

how to handle the exceptions??????
Posted by Karunakararao at 6/3/2004 8:07:12 PM
Hi I'm facing an issue in Exception handling, help is highly appreciated. Let us assume there is : 1) abc.aspx page 2) DatabaseConnection.cs (Database connection is handling over here) 3) ErrorPage.aspx I'm calling a method from abc.aspx which opens the database connection by using the Da...more >>

DataGrid and Tablestyles
Posted by nevin at 6/3/2004 7:24:19 PM
Hiya, I have a table which without any tablestyles and associated columns displays all the columns of the table as you would expect. If I add a tablestyle and one column which I then add the TableStyle to the grid no columns at all show. This grid is visible and i can see the current position...more >>

DefaultValueAttribute
Posted by Dulovits M. at 6/3/2004 7:16:14 PM
I want a default value for this color property ( with System.ComponentModel.DefaultValue ) but it doesnt work .. any hints or ideas what ive done wrong ?? [System.ComponentModel.Category("Border")] [System.ComponentModel.DefaultValue(typeof System.Drawing.Color),"Yellow")]...more >>

Execution speed, Java vs. C#/J#
Posted by Michael A. Covington at 6/3/2004 7:15:27 PM
Has anyone made any tests they'd like to tell me about? -- Michael A. Covington - Artificial Intelligence Ctr - University of Georgia "In the core C# language it is simply not possible to have an uninitialized variable, a 'dangling' pointer, or an expression that indexes an array beyond ...more >>

Multi-relational tables in a dataset....
Posted by rmorvay at 6/3/2004 6:48:37 PM
I have three tables in a dataset that I need to relate. I know how to relate two tables but going beyond that is, quite frankly, beyond me. Any insight? Here is the C# code that I did for a two table relate. I need to relate TerritoryExceptionColumns as well: DataColumn[] Territo...more >>

How get focus in new row in DataGrid?
Posted by Bill Todd at 6/3/2004 6:14:17 PM
I have a WinForms DataGrid bound to a DataView. I insert a new row by calling CurrencyManager.AddNew. However, the user cannot begin entering data until he/she clicks in the first cell of the new row. How can I set focus to the first cell of the new row in code so the user can start typing? N...more >>

C++ vc C#. Destructor of not created class get called.
Posted by pronto at 6/3/2004 5:00:15 PM
Hello All. I've got some unexpected (to me) behavior. In C++, destructor of the class that wasn't created is not called, in C# some how I've got destructor call for class that wasn't initialized properly (by constructor). Please look examples. Is that a normal ? .. or garbage collector take...more >>

TTF reader?
Posted by Dan at 6/3/2004 4:59:19 PM
Is there any C# library to read header tables from truetype or opentype fonts? I'd like to read info such as font full name, copyright, version and the like, and it would be great if I could also know if a specific charcode has a glyph in a specified font file or it will just be rendered with the...more >>

fax and .net
Posted by q at 6/3/2004 4:20:48 PM
how send fax in .net? ...more >>

windows server timeout
Posted by Ram Baruch at 6/3/2004 3:57:49 PM
Hi, I have a question: I made a windows service (using VS wizard). All it does is to connect to my site every X seconds and check if there is anything new to download. If there is- it downloads a big file (using WebClient.Download() ). On MY computer it doesn't take a ling time, but on other co...more >>

Threading and IPC
Posted by SRLoka at 6/3/2004 3:55:53 PM
I am developing a C# windows service that gets a continuous stream of bytes via TCP. As soon as it finds the delimitters(that we have defined), it needs to pass the data to another thread for processing. The receiving thread does not care what happend to the data(no thread sync needed). I am thin...more >>

Event on dynamically created linkbutton in C#
Posted by Alice Lee at 6/3/2004 3:39:17 PM
Hi, My web from has one button and by clicking this button a list of linkbuttons must be dynamically displayed based on information in database. Then click any one of these linkbuttons another set of linkbuttons will be displayed, and so forth... My code works, but I have to click twice every...more >>

Parsing C# string usinsg RegEx
Posted by Natalia DeBow at 6/3/2004 3:19:05 PM
Hi there, I have another question for .NET RegEx experts. I am reading in a C Sharp file line by line and I am trying to detect comments that start with either // of ///. What I am particularly interested is the comments themselves. I am interested in some stats with regards to the amount...more >>

Dynamically firing events using reflection.
Posted by Tim Haughton at 6/3/2004 3:15:26 PM
Can anyone tell me how to dynamically fire an event? I have an object that reflects on which events it has and based on some logic, elects which one to fire. Or at least that's the plan. So the question is - how do I fire an event when I have an EventInfo object?? There is a GetRaiseMetho...more >>

Scaling Controls
Posted by Dennis Carolus at 6/3/2004 3:14:13 PM
hi, does anybody know if theres a way to scale a control to another resolution? i've only found the method Control.Scale, but this method doesnt for example change a buttons text size, but obly its bounds. thx Dennis ...more >>

NotifyIcon app: how to show the context menu?
Posted by David at 6/3/2004 3:08:08 PM
Hi, I am developing a NotifyIcon app with C#. I want to show the context menu when user left-clicks on the icon, the same as he/she right-clicks on it. In that event handler, myNotifyIcon_Click(), I call myNotifyIcon.ContextMenu.Show method. But I am not sure what these two parameters I shoul...more >>

With keyword
Posted by john sutor at 6/3/2004 2:58:42 PM
Is there any method in C# similar to the Visual Basic method "With". This was very useful and eliminated a lot of code writing. ...more >>

Proper way to read a File to a Byte[] and vice versa
Posted by james at 6/3/2004 2:56:39 PM
I have a FileStream retrieved from FileOpenDialog. I have a Byte[] which I intend to store for later use. What is the most efficient way of getting the File into my Byte[] and tehn back out to a new FileStream ? I have been looking at all the Readers and Writers and due to information overload...more >>

automatically stopping a Windows Service
Posted by caulker at 6/3/2004 2:47:06 PM
how can a windows service terminate itself? I have a windows service that reads in configuration settings from an XML file, but I'd like the service to automatically stop if it doesn't find a particular element in the XML file. ...more >>

HybridDictionary
Posted by William Stacey [MVP] at 6/3/2004 2:28:44 PM
I take it the reason HybridDictionary may be faster then a normal Hashtable with 10 items is less is the cost of generating hashcodes ? Other reasons? -- William Stacey, MVP ...more >>

Exchange 2000 Connection
Posted by Neil Rudd at 6/3/2004 2:17:09 PM
Can anyone tell me how I can connect to an Exchange Server from my C# windows application. I specifically require to connect to the public folders and there defined views. Thanks in advance Neil ...more >>

hashtable and casing
Posted by William Stacey [MVP] at 6/3/2004 2:06:52 PM
Doing a project that makes heavy use of domain names such as "www.yahoo.com." Domain names preserve case but are concidered equal if names are same but case is different. I know I can store these names as keys in a hashtable with case insens comparer and CaseInsensitiveHashCodeProvider. That w...more >>

How to do this C++'s code with C# ?
Posted by pronto at 6/3/2004 1:54:12 PM
Hello all. Follow C++ "console application" printing out "Hello world". How to create C# console application with same approach (instance of some class will be created without reference from main()) regards pronto class C1 { public : C1::C1() { puts("Hello World"); } } ...more >>

Memory barrier note
Posted by William Stacey [MVP] at 6/3/2004 1:47:19 PM
Here is an interesting writing on memory barriers. Not sure if this helps my understanding or raises more questions, but interesting... http://discuss.develop.com/archives/wa.exe?A2=ind0203B&L=DOTNET&P=R375 -- William Stacey, MVP ...more >>

vb or c#
Posted by Mike at 6/3/2004 1:36:21 PM
I know this question has been asked over and over again But I'm currently doing VB.NET development and just finished migration of a VB6 app to VB.NET(asp.net) web app. I wanted to do the conversion in C# but time didn't allow me to learn C# as I went. My question is in my area all i'm seeing ...more >>

Windows Service and FileSystemWatcher Problems
Posted by Bonnett at 6/3/2004 1:33:49 PM
I have made a simple console application that creates a webpage from my playlist, then uploads it to my webhost. I decided to convert it to a windows service and use the FileSystemWatcher to monitor the playlist file, this is where i became stuck. I know the service detects changes to the playli...more >>

Sharing a folder programmatically
Posted by Chuck at 6/3/2004 1:29:11 PM
How do you share a folder/directory programmatically? The DOS way is << net share -sharename- = -location- >> I could use Process, but that means launching a command window to execute the 'net share' command. I want to do this from within C# code (Installer.Commit) . I don't care if the answer...more >>

VB or C#
Posted by Mike at 6/3/2004 1:27:07 PM
I know this question has been asked over and over again But I'm currently doing VB.NET development and just finished migration of a VB6 app to VB.NET(asp.net) web app. I wanted to do the conversion in C# but time didn't allow me to learn C# as I went. My question is in my area all i'm seeing ...more >>

Using a Web Service
Posted by Brian Conway at 6/3/2004 12:52:00 PM
I can't find any information on how to use a web service. What I am looking to do is have someone put in a 8 character word into textbox1.text and then have a button next to it to populate the information on the form from a webservice that contains the information. So far the only thing I found...more >>

Will Whidbey have more support for Extended MAPI??
Posted by Robert Hanson at 6/3/2004 12:29:16 PM
Hi All, Can anyone comment on whether of not Whidbey will provide better support for Extended MAPI so we can avoid the Outlook Warning Message? Thanks in advance, Bob Hanson Centare Group Ltd. *** Sent via Devdex http://www.devdex.com *** Don't just participate in USENET...get rewarde...more >>

Couldn't get process information from remote machine
Posted by Ian Frawley at 6/3/2004 12:24:00 PM
Hi All, I keep getting the above message when using GetProcessesByName(ProcessName,this.IPAddress) Does anyone know why? -- Ian Frawley ...more >>

Wrapping a COM DLL
Posted by Sam Martin at 6/3/2004 12:11:51 PM
hi all, i've asked a similar question recently regarding accessing the Windows Address Book by creating a wrapper class in C# I need to know whether I'm barking up the wrong the tree? What i've started doing is creating the required structs and declaring function calls within the wab32.dl...more >>

Generating hyperlinks dynamically (replacing words with links)
Posted by Jazzdrums at 6/3/2004 11:33:39 AM
Hello, I've (parts of ) HTML documents and a list of words that I have to transform as an hyperlinks, i.e. surround them with a "<a href="...">" "</a>". A first simple approach is to parse the HTML, loop on each textual nodes and then loop on each words and made a string replacement provided t...more >>

Disallowing new table rows in a dataset
Posted by Cat at 6/3/2004 11:01:08 AM
I have a DataTable in a DataSet which is bound to a DataGrid. I want users to be able to edit the data rows that appear in the grid on startup but unable to add new rows. Any ideas? Cat ...more >>

CreateFile
Posted by JLW at 6/3/2004 10:54:31 AM
I'm having alot of difficulty with this one. I have seen no less than 20 different ways to use this function with a named pipe. I'm trying to use \\.\TAPE0 (TapeDrive). Here's my decleration: [DllImport( "kernel32.dll", SetLastError=true, EntryPoint="CreateFileA" )] internal static exte...more >>

Thread.Abort issue
Posted by Morris at 6/3/2004 10:51:02 AM
I want to abort a running thread, so I call MyThread.abort() function. My problem is this thread runs "almost" like a while(true) loop and I don't want the Abort() function interrupts the thread at any point in the thread. In fact, I have a section of code needs to be "protected" from being interrup...more >>

Parsing Strings
Posted by Mel Weaver at 6/3/2004 10:48:53 AM
Hello, How would I parse "Mel" from the string? "Sent by Mel @4:20" Thanks Mel ...more >>

TreeView flashing when resizing form - but only as a Dialog WHY?
Posted by Terry at 6/3/2004 10:44:33 AM
I've seen several posts from people who have seen this flashing in TreeView's when resizing a form. I've noticed it in my app, but only in the child windows. For example, my main form has a splitter with a TreeView and I do not get the flickering with it. I created a new Form based Windows a...more >>

public holidays, cultural info & DateTime....
Posted by Ollie at 6/3/2004 10:37:38 AM
Does anyone know if you can work out if a day is a public holiday/weekend etc in .Net? I guess it might be related to the cultural info..... Cheers Ollie Riches ...more >>

GDI+
Posted by Roman S. at 6/3/2004 10:01:25 AM
----------------------------------------------------- Hello! How many different methods you know to draw a single point (pixel) on form? Please write a code. Thank you! -------- Roman S. -----------------------------------------------------...more >>

collection find()
Posted by howard at 6/3/2004 9:27:49 AM
If you have a sorted collection, how do you find the location ^closest^ to where a particular key would be if an element with key isn't in the collection? For example, if you have a SortedArray containing: { 1.102, "fox" } { 1.592, "cat" } { 2.239, "dog" } how do you get an interator that p...more >>

Hash table sorting?
Posted by john sutor at 6/3/2004 9:01:24 AM
Does anyone know how to sort a hash table? ...more >>

Windows Service and app.config
Posted by Bill at 6/3/2004 8:57:35 AM
I've created a windows service in C#, but I'm having trouble reading <appSettings> from a app.config file. I can read <appSettings> just fine from a normal C# windows app, so there must be some trick to read this file from a windows service, yes? perhaps the location of the .config file? a...more >>

Different font in separate listView columns
Posted by Robert Misiak at 6/3/2004 8:49:59 AM
Is it possible to have a different font in individual listView columns? When I do something like: ListViewItem lsi; .... lsi.SubItems[0].Font = new Font (lsi.SubItems[0].Font, lsi.Font.SubItems[0].Style | FontStyle.Bold); The entire line (all columns) of the list appears in bold. I just w...more >>

preesing F3 key and cathcing the event
Posted by Gidi at 6/3/2004 7:56:06 AM
hello, i writing a windows application in C#. i have a text box and i want to catch the F3 keypreess event how can i do it? what is the currect syntax and how can i catch it when the foucus is on the dataGrid?? thank you alll...more >>

Upgrade Paths
Posted by jonny at 6/3/2004 6:33:35 AM
hi all, I need to find out whether an install was an upgrade or a clean install. Is this possible? e.g user has 4.2 they upgrade to 4.3 bool upgrade = true or user installs new 4.3 bool upgrade = false...more >>

How do i access a VB6dll in C#
Posted by Charles Haynes at 6/3/2004 5:41:03 AM
I am trying to get my C# program to access an from in an older VB6 dll. How would I go about doing this?...more >>

Testing for undefined properties
Posted by Michael McDowell at 6/3/2004 5:21:06 AM
Hi How might I test for property being <undefined> before I try and use it Ta in advance Michael McD....more >>

GUID Question
Posted by Doug at 6/3/2004 4:14:25 AM
I have a value that was a GUID converted to string and stored in the DB. I need to get that value back into a Guid, how can i do that? Do something like (System.Guid)<GUIDStringVariable> does not work. Thanks. DOug ...more >>

Richtextbox (RTB)
Posted by KG at 6/3/2004 3:42:36 AM
I have a richtextbox that I use as a text editor. The font and attributes are set by a toolbar. When text with multiple fonts applied is selected within the RTB, the SelectionFont is null (naturally). Unfortunately this stops any manipulating of other properties such as Bold, Italic, Size etc.....more >>

Font Issues
Posted by KG at 6/3/2004 3:36:20 AM
I have a richtextbox that gets the selectionfont from a combo box populated from the InstalledFontCollection. There are a number of fonts that the richtextbox will not update to properly. Amongst these are: Raavi, Shruti and Tunga. When I set the selectionfont to any of these fonts, unless I h...more >>

ArrayList - GetRange
Posted by TT ( Tom Tempelaere ) at 6/3/2004 3:31:07 AM
Hi At one point in my application I have a single ArrayList object that I need to break up in two Arraylist objects: the beginning part up to an index, and the ending part from a certain index. I am now using ArrayList.GetRange but the documentation states that this method does not create new Arra...more >>

GetLocaleInfo
Posted by Beholder at 6/3/2004 3:29:29 AM
I'm trying to call the Windows API's function GetLocaleInfo but the call fails. Using the GetLastError function, I get error 126: The specified module could not be found. Here's my code: private const int LOCALE_SYSTEM_DEFAULT=0x400; private const int LOCALE_SDECIMAL=0xE; [DllImport("ke...more >>

Order Text as Numbers
Posted by dave NO[at]SPAM court-technologies.com at 6/3/2004 2:26:44 AM
Hi, I am currently writing a requirements gathering system which which have requirement values of 1.1, 1.1.2, 1.1.3, 2.3.4.5 etc etc. This works fine stored as varchar in SQL Server 2000 until I want to sort it in a .Net datagrid. As soon as I reach 10, it obviously puts the record down wit...more >>

win32 api and c#
Posted by jacob at 6/3/2004 1:53:20 AM
hi all I want to work with the api of windows .i work with c-sharp. when i can find explenation that explen clear how to deal with APIs TNX jacob ...more >>

DoEvents in C#?
Posted by Tony at 6/3/2004 1:45:06 AM
Just starting C# from a VB background. Is there a C# keyword comparable to the vb keyword DoEvents? Tony! ...more >>

ListView Control bugs
Posted by at 6/3/2004 1:03:27 AM
I think .NET 1.1.4322 ListView control has some bugs .I set ListView for displaying details I set multiselect and fullrowselect to true.I set small image list.When I compile it works well.But finally I add some context mrnu to listview but after next compile ,list view doesnot draws images .If I ...more >>


DevelopmentNow Blog