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# > october 2003 > threads for thursday october 9

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

DataGrid Column Delete Question
Posted by duncan_uwanson NO[at]SPAM yahoo.co.uk at 10/9/2003 11:42:22 PM
I am using the datasource property to populate the datagrid. Once populated the user has the option to select/deselect fields. How do you delete columns by mapping name. Does anyone know how to do this? Thanka in advance...more >>


How to Implement Move Next, Move Previous, Last Record and First Record in a DataGrid Control?
Posted by Anand Ganesh at 10/9/2003 11:27:14 PM
Hi All, How to Implement Move Next, Move Previous, Last Record and First Record = in a DataGrid Control ? Is there any standard tool available in the tool box button? Thanks for your time. Regards Anand Ganesh...more >>

Question about Custom Exceptions
Posted by Flare at 10/9/2003 11:04:44 PM
Hi i just read: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/exceptdotnet.asp Wich is interesting reading by the way. But. I have'nt used exception very much to anything else than ordinary FileExeptions etc. Now i want to create my own exception hierarchy. I...more >>

windows forms questions
Posted by Saso Zagoranski at 10/9/2003 10:40:14 PM
Hi! How can I "delete" the top of a Form? The part where the Form title is and the the close, minimize and maximize buttons are? I've seen that in some applications and it looks really nice (at least to me :) ). One other thing... can these forms be used within MDI forms? ...more >>

Where is MessageBeep?
Posted by Andy Bates at 10/9/2003 10:33:52 PM
I'm intrigued, MessageBox has gone to MessageBox.Show; but where is MessageBeep? I've trawled the help and cannot find any reference to it! The only instance I've seen is using the following to import it from user32.dll: [DllImport("user32.dll")] public static extern bool MessageBeep(BeepTy...more >>

Opinion on how best to wait for a file
Posted by john bailo at 10/9/2003 10:27:07 PM
I'm writing a program to monitor the operation of a process. Part of the process involves trigging a method, then waiting for the creation of a flag file. I want my code to pause at that point. How would you recomment waiting and monitoring. I can think of two ways: 0. Start a timer. 1...more >>

How to set a field value = null in dataGrid?
Posted by J at 10/9/2003 10:16:32 PM
Situation - Using the table pubs.titleauthor in a strongly typed dataset, attached to a datagrid, using the datagrid I would like to set the royaltyper field = null (the database allows nulls in this field). But when click on the cell and remove the field value (leaving a blank), and move to t...more >>

Re: Evaluation Problem Again
Posted by Nicolas at 10/9/2003 9:47:42 PM
Thank you but I still have some problem as I explain here. 1 application with form1 1 dll which is holding some usercontrol etc... The idea is to use the user control dll to alter the Form1 controls When Form1 load then I call and initialize my usercontrol dll First I notice that the controls ...more >>



Moving from byte[] to byte[]
Posted by Tim Conner at 10/9/2003 9:28:20 PM
Which functions are available to move a part from byte[] into another byte[] ? Let's say I have a byte[] of 20 and another of 40. And I want to move 5th to 15th from the first byte[] into occupping bytes 20 to 35 of the second byte[]. Thanks in advance, ...more >>

Quick way to toggle a bit?
Posted by Michael A. Covington at 10/9/2003 8:32:27 PM
Is there a quick way to toggle a Boolean variable? Something shorter than: blah.blither.blatt = ! blah.blither.blatt; ...more >>

GDI Onpaint Problem/Question in Custom control
Posted by Sagaert Johan at 10/9/2003 7:52:23 PM
I have made a custom control that draws a rectangle when the mouse is = down, and does nothing when the mouse is up. I set/reset a flag in MouseDown/Mouse up and use this to do the drawing = in the OnPaint . The recangle draws correct when i press the mouse, but when i release = the mouse ...more >>

textbox newline
Posted by john bailo at 10/9/2003 7:34:14 PM
How do create a new line in a text box. If I put \n in my string, and set .Text to the value of the string, a carriage return character is displayed literally, but it doesn't actually start on a new line in the textbox. ...more >>

Graphics and performance issues
Posted by Martin at 10/9/2003 6:29:16 PM
I am using graphics as backgrounds for forms,buttons,labels etc. The question is: is it faster to load all graphics from files on app start or to use it embeded (places in editor during design). Reason for my question is that application has 5mb, while without graphics it has cca 400kb. Graphi...more >>

Q: Proxy in The Middle
Posted by Soul at 10/9/2003 5:47:14 PM
Hi, I am learning to code a WinForm application which will need to access a Web Service outside the University network. Our University require us to go through a proxy in order to access the Internet. In addition, the proxy require us to authenticated before allow us to go through it. I hav...more >>

Cache.Insert wierd behavior
Posted by Alvin Bruney at 10/9/2003 5:44:40 PM
application_start onRemove = new CacheItemRemovedCallback(this.onRemoveReload); HttpContext.Current.Cache.Insert("CUSTOMERLIST", ds, null, DateTime.Now.AddSeconds(5), Cache.NoSlidingExpiration, CacheItemPriority.Normal, onRemove); onremovereload //onRemove = new CacheItemRemovedCallback(this...more >>

VB.net to C# converter?
Posted by Mark Oliver at 10/9/2003 5:13:02 PM
Hi, Does anyone know where I can find a VB.net to C# converter? Thanks, Mark ...more >>

When's The Printer Done?
Posted by brycelindsey NO[at]SPAM hotmail.com at 10/9/2003 5:00:56 PM
I'm working on an office application that's going to need to print out 300+ billing statements. Since that seems like a lot, I'm thinking that will slow things down, which would be bad. So then I thought that it would be cool if I could just send a billing statement to the printer when the pri...more >>

Using guid or database sequence?
Posted by muscha at 10/9/2003 4:57:33 PM
Hi, I'm trying to decide whether I should use Guid.NewGuid() to generate an ID or using database sequence. Is Guid.NewGuid() will return a unique number? The MSDN said that the probability of duplication is low, but how low? Does anyone know? thanks, /m ...more >>

events between threads?
Posted by thor4707 NO[at]SPAM netscape.net at 10/9/2003 4:55:25 PM
Can the main thread be notified of an event raised by a spawned? A button on a form creates a new thread which will raise an event when it is finished. When the form is notified of the thread termination event, I want my form to create a new form and make the new form's MDI parent the same as...more >>

directsound and c#.
Posted by Kalpesh Modha at 10/9/2003 4:47:19 PM
Hello I am writing a program that makes and window popup and plays a sound repeatedly until the user does soemthing. however directsound for some reason does not play the sound if is does not have focus. Does anyone know how to get round this ? thanks in advance. Kalpesh Modha ...more >>

Simulate horizontal scroll
Posted by Boaz Ben-Porat at 10/9/2003 4:41:53 PM
Hi all Is there a way to simulate a click on a scrollbar (horizontal) of a FataGrid ? I need to programmatically scroll the grid to the right/left upon some condition, when the total width of the grid columns is greater then the grid`s rectangle. TIA Boaz Ben-Porat DataPharm a/s Denma...more >>

Calling a Table Valued MSSQL Function from C#
Posted by Abhishek Srivastava at 10/9/2003 4:41:40 PM
Hello All, I am trying to call a Function in SQL Server which returns a TABLE type. I get an exception Unhandled Exception: System.Data.SqlClient.SqlException: The request for procedu re 'testFunc' failed because 'testFunc' is a function object. at System.Data.SqlClient.SqlCommand.Ex...more >>

Persistence
Posted by Ralph Lund at 10/9/2003 4:35:10 PM
Hi NG. I am intersted in which persistence mechanism you are using in your projects (which persitence layer - data access classes, or-mapping-tool) (for databases) Which experiences do you have? Thx....more >>

When should I use 'using' ?
Posted by Cybertof at 10/9/2003 4:31:51 PM
Hi ! I'm wondering about the use of the 'using' statement. In a procedure, should i declare all instance variables in a using clause ? In the below code, what would happen if MyFont & MyFont2 would be declared in the body of the Main() and not inside the using (even not referenced in th...more >>

Accessing a class outside of project
Posted by Peter Lorz at 10/9/2003 4:13:19 PM
Hello, I have a simple problem. I got two visual studio projects, one is an application, the other a common windows service. The application needs to get a remote reference of the service. Now the question: How do I get the application-project known to the referenced classtype of the remote ...more >>

How to create floating toolbars in C#?
Posted by Anand Ganesh at 10/9/2003 3:38:27 PM
Hi All, How to create floating toolbars which can dock wherever the user docks it ? Is there any easy way I can implement using C#? Thanks for your time and suggestions. Regards Anand Ganesh ...more >>

DataGrid Events
Posted by Kendal Goodrich at 10/9/2003 3:19:42 PM
Can someone please help. I am trying to make use of a datagrid in C#. I create it and fill it with no problem. When it comes to double clicking it I have problems. The double click event will not fire unless I double click on the Row Header. If I remove the row header, I cannot get the event...more >>

how to use structs in a call to an unmanaged funtion
Posted by Bruno van Dooren at 10/9/2003 2:52:20 PM
Hi, i need to create a .NET class that will provide the same functionality as the windows 'run as' command. it seems that this code is not available in the .NET framework. I have found an example that will logon he desired creadentials to get a security token. the only thing i need to do...more >>

Evaluation Problem
Posted by Nicolas at 10/9/2003 2:27:07 PM
The lat part is not working why ???????? Please help......... using System; namespace ConsoleApplication4 { class reflection { public const string mstr =3D "hellpppo world!"; public System.Windows.Forms.TextBox textBox1; [STAThread] static void Main(string[] args) ...more >>

Remote Components Setup problem
Posted by gicio NO[at]SPAM web.de at 10/9/2003 2:15:07 PM
Hi! I will install "Remote Components" on my server to get SQl debbuging working. when I click on the "Install Full" button (To install full remote debugging on all operating systems) I get this message box: Incorrect command line parameters. Windows Installer. V2.00.3790.0 ..... w...more >>

Call static C# method from unmanaged C
Posted by Chris Bruce at 10/9/2003 2:07:40 PM
How does one call a static C# method from an unmanaged C dll? Thanks ...more >>

Jon Skeet
Posted by Alvin Bruney at 10/9/2003 1:55:42 PM
I caught those new letters tacked on to your name. On behalf of the lesser mortals, Congratulations, it's well deserved. ...more >>

Class Casting with ArrayList ?
Posted by Cybertof at 10/9/2003 1:55:31 PM
Hello, In the code below, is there a shortcut not to use the temp var CurrEmployee ? I would like to use something like "if (Employee)MyArrayList.Name" but don't know the syntax.... ******* CODE : (MyArrayList is a list of Employee) ******* Employee CurrEmployee; for (int i = 0;i<...more >>

bitwise rotation
Posted by Shawn B. at 10/9/2003 1:49:20 PM
Greetings, I am simulating an assembly language bit rotation in C# and it works wonderfully --------- .... public uint Value; .... public uint RotateRight(byte count) { Value = ((Value >> count) | (Value << (32-count))); return Value; } --------- as long is the value is 32-bi...more >>

Delegate Question
Posted by John at 10/9/2003 1:28:21 PM
I have a form with a bunch of combo boxes that will be populated at runtime based on user input. I have created a class for the form with will handle all of the UI processes. I am trying to create a generic delegate that will handle all of the combo box loads. So, when the form invokes the UI ...more >>

Adding MRU List to C# Windows Form
Posted by paige_c_watson NO[at]SPAM hotmail.com at 10/9/2003 1:19:37 PM
I have added a mainmenu object to my windows form and would like to display an MRU list on it. Is there an easy way? or do I have to do it programatically? Can anyone point me to a good tutorial. Thanks for the help. Paige W....more >>

How do I pass a file to a class?
Posted by Sam at 10/9/2003 1:10:39 PM
Hi, I have a web form I use to allow users upload files to the web server. Instead of handling this operation in the code behind of the web form, I want to create a class that contains document management functions in it. However, I don't know how to pass the file to this class. I'd appreciate...more >>

Using VC++ code in .NET
Posted by DocR at 10/9/2003 12:44:08 PM
I have some VC++ tested code that I want to use from C#.NET. I know I = have methods to port the code from VC++ code to .NET but my code is = tested and I do not want to port that to C#.NET. Then I know that .NET = can use the unmanaged code, I think I have options to make the dll of = the cod...more >>

Focus
Posted by Pengyu Hong at 10/9/2003 12:43:20 PM
I have several controls in a frame. I want one of controls to have the focus (input focus) when the program starts. However cotrol.Focus() does not work. How to fix this problem? Thanks a lot, Pengyu ...more >>

Random Access Files in C#
Posted by Cybertof at 10/9/2003 12:30:05 PM
Hello, Is there a simple way to read a random access file that has been created with VB6 using direct writing to disk of Type....End Type structures ? I have not found this possibility in C#. Is it possible to map directly a buffer (read from a stream) to a Structure in memory ? If yes, ...more >>

HELP: GetSqlBinary conversion in C# and VB.NET
Posted by Gareth Parris at 10/9/2003 12:16:45 PM
Anyone know what the VB.NET equivalent of this C# statement is... byte [] segBody = (byte []) sqlReader.GetSqlBinary(3); Tried as hard as I could to do it in VB.NET but I cannot seem to do it. ...more >>

Compile code at runtime?
Posted by Adam Clauss at 10/9/2003 11:59:24 AM
OK, I just ran across a program that did this and I am wondering is this something they coded in themselves, or is there already helper classes, etc available to assist in this. The application compiles many C# files at runtime and then uses them. How easy/hard is it to do such a thing? Tha...more >>

project working path
Posted by Ahmet at 10/9/2003 11:51:33 AM
Hi; We have one project that has multiple dll dependencies. on one shared folder, we have shared dll's that project needs to load and use on runtime. if I add items to referance list and mark as don't copy local, when project starts running in dev env. project cant see this dll's that is...more >>

newbee: How to do Interface deliegation
Posted by Kiran at 10/9/2003 11:24:30 AM
Hi, I am new to dotNet, as my background is from Delphi, I am always looking for the way to do it that way :) sorry abt that. I was looking for a way to delegate the interface supported by my class to one of the contained class which we can do in Delphi using "implements" keyword. OK to ...more >>

How can I prevent the combobox from edting?
Posted by NewSun at 10/9/2003 11:16:34 AM
The combobox can drop and be selected,but the display member or text showing can't be edit. Thanks in advance. ...more >>

string or stream?
Posted by Daniel Bass at 10/9/2003 11:10:14 AM
I'm creating a routing application that uses both MSMQ and IBMMQ message queues as a requirement. When retrieving a message off an MSMQ, I ask for the message body stream to get the message data, but when I reference messages coming off an IBM MQ series queue, I receive a string. Now all me...more >>

Cleaning Global Assembly Cache.
Posted by Sujit Shetty at 10/9/2003 10:43:39 AM
I have some references in my GAC which cannot be removed using Gacutil or the Microsoft .NET framework. On delete it gives this msg Pending references: SCHEME: <WINDOWS_INSTALLER> ID: <MSI> DESCRIPTION : <Windows Installer> have tried the various uninstall program. related ...more >>

Best method to parse a very large XML Doc
Posted by Brian at 10/9/2003 10:37:55 AM
Hi all, I have an xml document that can contain 248 nodes with each node containing different fields. There is the possibility that there will be more nodes. Each node can have up to 30 elements. What do you suggest is the best way to parse through this document? Should I create a ...more >>

New foreach syntax?
Posted by Niall at 10/9/2003 10:27:19 AM
Ok, maybe this is getting too lazy and too demanding, but hey, I thought I'd see what people thought about it. Would anyone else find a syntax like: foreach (string Name in CompanyNames and EmployeeNames and ...) { etc } useful? I know that on some collections, you can append, insert et...more >>

ASP.NET DataGrid - how change edit textbox widths?
Posted by Ronald S. Cook at 10/9/2003 10:16:56 AM
Hi all, I have an ASP.NET DataGrid wherein there is an edit link for each row. Upon clicking the link, certan fields in that row display in text boxes so that they may be edited. I would like some textboxes to be wider, some narrower. By default, they are all the same pre-defined width. Doe...more >>

Visual C# for Tablet PC
Posted by Mark Edwards at 10/9/2003 9:57:54 AM
I want to buy Visual C# (or C++) and use it to develop for the Tablet PC. I can't figure out what to buy. I can buy the Visual C# .NET ($109), but don't know if that has the inking libraries. Anyone who has bought something similar, please let me know....more >>

combo box -- dumb question
Posted by Laszlo Szijarto at 10/9/2003 9:51:34 AM
Is there a way to set a value for an item in a combo box that's different than what's displayed? So, for example, I'd like to do something like -- John Smith Mike Jones but hidden behind each might be an employee id (155, 239). When user selects item on the Combo Box, I'd like to ext...more >>

I need clarification on how to use EnumPorts
Posted by Ken at 10/9/2003 9:49:08 AM
Hello Everyone, I would like to use EnumPorts twice on my form. The first time I want to use Port_Info_1 to just list the Port Names. The second instance where I need EnumPorts , is when I receive the Combo.SelectedIndexChanged event. I want to use EnumPorts to get the Port_Info_2 based o...more >>

Socket.Select butI have only Int32 socket-descriptors...
Posted by Dario at 10/9/2003 9:43:10 AM
I have an unmanaged library that handle many TCP/IP connections. In my .NET application i want to test if there is input available on these connections. Using an existing function of the unmanaged library I'm able to retrieve the list of Int32 socket-descriptors handled by the unmanaged library....more >>

Active Documnet Server Support
Posted by Kevin at 10/9/2003 9:38:24 AM
Is it possible to develop an Active Document Full Server or a Container application using C#? Thanks, Kevin....more >>

Stopping a child window from closing
Posted by JH at 10/9/2003 9:29:38 AM
When the user tries to close a child window, I want to use the Closing event to hide the window instead and cancel the close. How can I cancel the window from closing? Thanks....more >>

Creating chm file from .Net
Posted by raghavendra at 10/9/2003 9:26:42 AM
Hi, Can anyone of u give me a pointer how to create a new .chm file.. One more thing is can i update the existing .chm file with some more information embedded in the xml file. Thanks & Regards Tilve ...more >>

Another Kind of Eval
Posted by Nicolas at 10/9/2003 9:19:58 AM
Is there a way to have a handle on a control having only the control name So I dont have to loop through all the controls nested on the form. checking for the control name = my string this could be long and heavy on memory Assuming the control name is "btn_Save" How to get to ctr being the ...more >>

bitwise-AND
Posted by Shawn B. at 10/9/2003 8:48:47 AM
Greetings, If I havea a numeric value, lets say, "uint value" and I want to set the 5th bit, I can't just say "value = (value & 0x20) because it yeilds a boolean evalutation. I can't just add ((2^5)-1) because I am not guaranteed it will set the 5th bit. Thanks, Shawn ...more >>

DataGrid Fully Expanded
Posted by andrewcw at 10/9/2003 8:40:51 AM
I am considering using the DataGrid to show my data. I will take the class data and serialize it / xml transform it or simply load it into a new XML document. The new XML document is essentially a recordset - simple rows. I'd like the content to be fully expanded - whereas now I get the ...more >>

CSV Files & DataObject class
Posted by Max Sandman at 10/9/2003 7:36:40 AM
I need to import and export CSV files. Before I head off the create my own CSV parser (got the link to Falafel's articles), is there a way to use the DataObject class in this process? I don't want to waste time figuring out what it does if it's really not going to help. It sounds like (from the...more >>

Parsing string for hex values ...
Posted by Computer_Czar at 10/9/2003 6:49:46 AM
I'm trying to figure out the best way to parse an input string from a file for hex values. The string is actually Motorola S code produced by an embedded assembler. For example lines contain S1142CD0XXYYZZ... I've written similar programs in C/C++ where I save the string and use a pointer to ...more >>

Date Format
Posted by Tom Pair at 10/9/2003 6:39:10 AM
Hi, I use DateTime.Now to display the current date and time. For instance, it's default format is 2003-10-29 21:23:36. How can I change the format as follows? 10/29/2003 9:23:36 PM MM/DD/YY HH/MM/SS AM/PM Thanks for help Tom *** Sent via Developersdex http://www.developersde...more >>

Idea for future version of C#: Move semantics for structs
Posted by opendtv NO[at]SPAM yahoo.com at 10/9/2003 5:45:42 AM
Consider a struct that resembles this: struct mystruct { byte[] myarray; // ...other stuff... } i.e. a struct that contains at least one reference/pointer. The meaning of "=" (and the meaning of by-value parameter passing) is to perform a memberwise copy of the struct. This is also...more >>

C# generics: is it possible to infer associated types?
Posted by dietmar_kuehl NO[at]SPAM yahoo.com at 10/9/2003 3:15:58 AM
Hi, after reading the documentation on C# generics from several sources, I'm still unclear whether it is possible to infer associated types from a type argument. For example, if I have an enumerator or iterator for a sequence passed to a generic function, is it possible to arrange things such...more >>

How to retrieve DDL?
Posted by myjunkbuster at 10/9/2003 2:40:51 AM
Is there a way to retrieve the ddl from a database via C#? I'd like to extract the parameter information and build a quick test harness. thanks, Scott ...more >>

[SqlException: Line 1: Incorrect syntax near '.'.]
Posted by Roger R. Smith at 10/9/2003 1:51:34 AM
I see this error in my ASP .NET code: [SqlException: Line 1: Incorrect syntax near '.'.] I am trying to execute the following: private const string SQL_SELECT_USER = "SELECT User.Email, User.FirstName, User.LastName, User.Status, User.Phone, User.Privs FROM User INNER JOIN Login ON User.Use...more >>

Executing an application
Posted by Timothy V at 10/9/2003 12:56:57 AM
Hi, how do i execute a .exe file using C#? Thanks, Tim. ...more >>

p2p
Posted by Matias Woloski at 10/9/2003 12:54:21 AM
I have to write something VERY similar to Kazaa. Is there something I could use to do some estimation of development time? Is there anything done on the subject in c#? I couldn't find anything handy in google for c#. any pointers? thanks, Matias ...more >>

Internet dialing
Posted by Timothy V at 10/9/2003 12:38:31 AM
Hi, Does anyone know how to dial a connection to the internet in C#? Thanks, Tim. ...more >>


DevelopmentNow Blog