Groups | Blog | Home


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# > august 2003 > threads for wednesday august 13

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

Bug in the debugger?
Posted by Jason at 8/13/2003 10:15:56 PM
This is an offshoot of my post "c# XOR equals (^=) bug?". While I was working on the code for that problem, I think I found a problem with the VS.NET debugger. That has to do with the quick evaluation tooltips while debugging. Here is the basic code to use for debugging and to illustrate...more >>


c# XOR equals ( ^= ) bug?
Posted by Jason at 8/13/2003 8:48:45 PM
Could someone please tell me if this is a bug or is it by design? I am using the triple XOR swap trick for two integers. I show three "techniques", but only the first one works. All three work in C++, but I get weird results in c#. technique 1: (works in C#) x ^= y; y ^= x; x ^= y...more >>

Static Keyword
Posted by Alvin Bruney at 8/13/2003 8:40:28 PM
I wasn't expecting this behavior from a static variable. A thread wrapped by a class has a couple static variables in a webform. When the thread runs and the browser closes, the static variable is still hanging around. I was under the mistaken impression that static was tied to the session, that ...more >>

Unmanaged code and NullReference Exception problem (PLEASE HELP)
Posted by SpookyET at 8/13/2003 8:14:04 PM
I want to create a wrapper for SQLite and I'm having a problem with getting NullReferenceException when calling the unmanaged function. I do not wish to write in C++ since i do not have enough experience with it. The problem I'm having is that after some 17 rows I get NullReferenceException whil...more >>

InitializeComponent code lost
Posted by Tabo at 8/13/2003 8:07:21 PM
when i build the project using C#, the code in InitializeComponent lost sometimes. Is it a bug?? if yes, can some method fix it? thanks for help. Tabo...more >>

Switch Statement & Objects
Posted by chis2k at 8/13/2003 7:19:49 PM
How can I compare objects in a switch statement? For instance: public void textbox1_Select(object sender, System.Eventargs e) { Textbox tx = (TextBox)sender; switch (tx) { case textbox2: /*something*/ break; case textbox3: /*something*/ break; } } this throws ...more >>

Datagrid : No "new line" option ? how to...
Posted by Herve MAILLARD at 8/13/2003 6:56:31 PM
Hi, My dataGrid is filled by a dataset. I want to modify the data but I don't want that the user can add a new line... How can I do ? Thanks for your help. H. MAILLARD ...more >>

Condition to choose between Class and struct
Posted by NotYetaNurd at 8/13/2003 6:50:08 PM
Hi all, I need a collection of objects --which holds just two variables one string and one intptr --the number of objects @ any point will not exceed 40 or 50 ... Should i go for a struct or a class..Plz advice me in this regard Regards, ...more >>



How to track the mouse without capturing it?
Posted by Will Pittenger at 8/13/2003 6:25:13 PM
If I were writing a C++ program, I would write a mouse hook. Does C# and ..NET 1.1 have anything equivalent. If not, I suppose I will need to use the Win32 API. ---------- Will Pittenger E-Mail: mailto:will.pittenger@verizon.net All mail filtered by Qurb (www.qurb.com) ...more >>

How can I start an exe from C# (like VB' Shell function)?
Posted by Jacobus at 8/13/2003 6:04:57 PM
How can I run an exe from C#. Thanks Jacobus...more >>

Focus
Posted by Patrick De Ridder at 8/13/2003 6:04:08 PM
I have a form with a number of text boxes. When I start the program I want the cursor to be in one particular text box. I have tried textbox4.Focus(); in the constructor, but that doesn't do the trick. How should it be done? Many thanks, -- Patrick De Ridder ngmail@freeler.nl...more >>

Compiling files using csc.exe
Posted by Cin at 8/13/2003 5:59:36 PM
Hi, I have two files: ClassA.cs and Main.cs I need to use ClassA in the Main.cs file inside another class (and so there seems to be a dependency). How do I do that? Do I need to provide a namespace and then "using" it? How do I then compile these two files at the same time from the ...more >>

Decimal rounds when inserted to SQL2k
Posted by Mikael Engdahl at 8/13/2003 5:03:33 PM
Hello I am calling a stored procedure in a SQL Server 2000 like this: <code> SqlCommand cmd = new SqlCommand("Sproc", connection); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("@Param", SqlDbType.Decimal).Value = amount; SqlDataReader reader = cmd.ExecuteReader(); </c...more >>

A Nice Scrolling Window
Posted by Ken Williams at 8/13/2003 4:58:38 PM
Hi can anyone point me to some sample source code for a scrolling window. What I want is a text window that monitors incoming data continuously, so it has to hold say a couple of hundred lines then after that the early lines need to erase as new data arrives. The only way I have seen this do...more >>

Manual binary serialization of a dataset is slow for me - why?
Posted by hs at 8/13/2003 4:28:43 PM
Hi I am serializing a dataset using a binary formatter as follows: IFormatter formater = new BinaryFormatter(); formatter.Serialize(stream, ds); // ds=DataSet, stream=MemoryStream .... DataSet ds2 = (DataSet)formatter2.Deserialize(stream2); For the size of my DataSet, its taking 0.8 second...more >>

printing line numbers along with code.
Posted by lsr.group at 8/13/2003 3:53:48 PM
How can I print the line numbers with the code in C#? I have tried everything and looked in a few books. ...more >>

Too Many Methods!!!
Posted by Sean at 8/13/2003 3:48:52 PM
with C++, I declare several functions in a class in a header file, and I implement in several source files(cpp), then I compile it. but how can I such thing with C#? If I have to implement 100 methods in a class, do I write all in a cs file? what I should do? ...more >>

rasing custom event
Posted by MC D at 8/13/2003 3:44:04 PM
I have an event that I am defining in one class, and I want to subscribe to it in another. I have the delegate for the event in the top of my class: public delegate void statsUpdatedHandler(object sender, EventArgs e); I then have the event defined in the class as: public static event sta...more >>

software conception... best way ?
Posted by Herve MAILLARD at 8/13/2003 3:39:46 PM
Hi, I have to write a software doing the following : - Load a file (containing data) Data will be display in a Treeview and are typed as following Equipement Bloc Tag It could have for each Equipement, m...more >>

Transform VB.Net to C#
Posted by Dave Boal at 8/13/2003 3:31:07 PM
Does anyone know if there is a Microsoft product that converts VB.Net to C#? I heard there was on called CLR - I think it it short for Common Language Reader??? Thanks, Dave...more >>

Include xml file in build output
Posted by Rob Tillie at 8/13/2003 3:13:34 PM
Hello, I want an xml file, part of the project, be included in the build so that it gets to debug/bin. I already set the build action "content", which describes what I want, but vs.net doesn't deploy it. Anyone got an idea? Greetz, -- Rob. ...more >>

How do you find the owner of a process ? (2nd try)
Posted by DD NO[at]SPAM chi-town at 8/13/2003 3:05:05 PM
I'm not sure that this msg made it out, the first time I sent it, so I am trying again. -- Win XP Home Edition I use System.Diagnostics.Process.GetProcesses()) to get info about the processes running. I don't see any members of class' Process' which allows me to get the name of the owner o...more >>

Form objects and controls
Posted by Ann Marinas at 8/13/2003 2:42:33 PM
Hello! Is it possible to get all of your controls in a form and store it in a collection (for populating puposes)? If yes, how can you store it and retrieve it while determining the element's type? Like for example, I have many textboxes and buttons and labels in my form, and I want to pop...more >>

Calling Object
Posted by MAF at 8/13/2003 1:38:49 PM
Is there anyway that I can find out what object called another object? ObjectABase ObjectA inherits from ObjectABase objectA calls objectB I want to invoke a method in ObjectABase? ...more >>

Automating Outlook 2000
Posted by Richard at 8/13/2003 1:38:25 PM
All, I am writing an Outlook 2000 Add-In .DLL program. I have applied the necessary knowledge base fixes to enable event handling in Outlook 2000 and everything is working except for one thing: When I make changes to the items in a folder I get the ItemAdd() event and the ItemChange()...more >>

C# classes - how do I refer to a method in a class without instatiating it?
Posted by kuvpatel at 8/13/2003 12:27:06 PM
Hi I want to refer a class called LogEvent, and use one of its methods called WriteMessage without actually having to create an instance of Logevent. I have tried using the word sealed with the class and this works but I would also like to know of other ways to do this. Also are there an...more >>

Microsoft.DirectX.AudioVideoPlayback
Posted by Kieran Benton at 8/13/2003 12:22:05 PM
Hi everyone, Sorry this is more than a little off topic but Im having a terrible time trying to get anyone at the managed directX groups to reply so I'm going to try with everyone here as they are far more helpful! Im having problems with sound quality using the Audio class from this namespac...more >>

Hosting Controls in IE
Posted by Christoph Schittko [MVP] at 8/13/2003 12:03:30 PM
All, I am trying to display a winforms user control inside an HTML page through an <object> tag. Everything works fine and dandy until I sign the assembly that contains the control. Once I start signing then I just get the icon for the failed control. Now I've confirmed from my web server l...more >>

start automatic outlining
Posted by Mark at 8/13/2003 11:57:18 AM
I have a staff member with VS.NET 2002 who appears to have outlining (+ or - marks) permanently turned off. The option to "Start Automatic Outlining" is there, but it doesn't appear to do anything. The ability to collaspe and expand code is still missing. Suggestions? Thanks in advance! M...more >>

satellite assemblies and localization
Posted by Dan at 8/13/2003 10:34:16 AM
I am creating a c# class library project to be used by some exe clients. This library needs to be localized for its text messages using satellite resource-only assemblies; I have created the library with an embedded resource for the default language and a sample satellite assembly with strings f...more >>

Windows Service
Posted by Sean at 8/13/2003 10:30:22 AM
Hi. I'm converting a project which uses windows form UI to Windows service. I just finished converting but I can't use any UI (winform or console). can't Windows Service use UI? then what will be an alternative? help me. :-) ...more >>

.NET with OOPS
Posted by Anandraj at 8/13/2003 10:17:12 AM
Hi All, We have completed a project with full Object Oriented using J2EE. We want to implement the same Tier in .NET also. We use to pass the data between different layers thro Object but it has to be thro' DataSet in .NET. Instead of using the Dataset if we want to use the Object Oriented Me...more >>

MDAC?
Posted by Dishan at 8/13/2003 10:07:34 AM
Hi Does C# setup application (windows with ms access db) distribute with MDAC? where can I have MDAC.? If client machine have MS-Access does I need to distribute it?. Does it had with Component update CD (.NET)? Regards Dishan ...more >>

Object Properties at Runtime
Posted by Jeff Cope at 8/13/2003 10:02:41 AM
Delphi we had something called RTTI (runtime type information) that allows a user to see attributes of an object at runtime such as properties, methods, etc...Is there something in c# that's similar? Thanks for your help. Jeff ...more >>

String of enumeration
Posted by MAF at 8/13/2003 9:59:57 AM
How do I return the translation of an enumartion? public enum PeriodType { Year, CYear, Season, Month, Week, Hour } I want to pass in 0 and get Year back. ...more >>

Converting IntPtr to byte[]
Posted by Brian Harleton at 8/13/2003 8:57:25 AM
Having trouble figuring out the best way to convert an IntPtr to a byte[] without losing any data. Looks like I need to use Marshal.PtrToStructure(), but I'm not having any luck with that. Any help would be appreciated....more >>

C# exceptions
Posted by Ghost at 8/13/2003 8:44:23 AM
It there any way to attatch the point of creation of an error which is thrown in an object to the instance that caused it to be thrown rather than the throw statement?...more >>

Config Internet Explorer
Posted by #Hai at 8/13/2003 8:13:23 AM
Hi, I want Internet Explorer to use localhost server (127.0.0.1) as proxy server instead of connect directly to the ISP. How to do this (by programming) ? Thanks ...more >>

Newbie: Sending file over a network stream
Posted by ahakim99 NO[at]SPAM yahoo.com at 8/13/2003 6:08:06 AM
Hi Will the following code adequately send a file over a tcp connection. Or is there something fundamentaly wrong with it? And does any one know any good tutorials on sending files over tcp. What is the simplest way of extracting the file at the server end? thanks abz TcpClient tcpclient = ne...more >>

Download using socket
Posted by Henrik at 8/13/2003 5:36:33 AM
I want to download a file using socket programming (and not httprequest) but the DNS keeps giving me errors "IP is ok, but the attached data is not available" I am doing like this and the address is ok. does any one know what is wrong here? IPHostEntry lipa = Dns.Resolve("192.168.0...more >>

c# Problem: Call to GetDiskFreeSpaceExA API not Working!!
Posted by David at 8/13/2003 4:53:59 AM
I am attempting to use the GetDiskFreeSpaceExA api to get the disksapce for a drive. When I call the function from C#, I receive an OK rc but the space is for my default drive "c:". No matter what path (UNC) I pass, I always get the default drive space. I tried passing the path as a constant,...more >>

Input controls
Posted by Helen Pracctice at 8/13/2003 4:33:45 AM
Hello I have an file type input control on my page, which I am using to upload documents to the web server. However I do not want the user to have to select the file, and for the code behind to set the postedfile property automatically. Is there any way of doing this? Thanks *** S...more >>

generate an array with different data types?
Posted by Schnogge at 8/13/2003 3:15:56 AM
Hi! it is possible to generate an multiple-dimensional array with different data types? Or is it possible to combine a one-dimensional array with an other which has an other data type? How must i do that? Thank you so much ! Schnogge ...more >>

Caller class infos
Posted by mirko at 8/13/2003 1:46:06 AM
How can I collect infos about the caller class of a custom class library (dll), directly by the class library itself? I tried using the StackTrace class inside the class library, but the last stack frame (which should collect infos about the caller) contains only infos about the class of t...more >>

How do I put to sleep a thread other than the current one.
Posted by Peter Rilling at 8/13/2003 12:30:26 AM
How do I put to sleep a thread other than the current one? I want to put another thread to sleep to the specified number of milliseconds but the Sleep method seems to only work for the current thread while the Suspend method has no parameters to specify a duration. ...more >>


DevelopmentNow Blog