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# > may 2004 > threads for wednesday may 12

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

Question on Exceptions
Posted by Kevin at 5/12/2004 10:46:04 PM
Hi all I have a question regarding exceptions When I have a try/catch block and within the try block I have an exception, it then goes to the catch block to deal with the error. thats all fine, but once I figured out what the problem is and fixed it in the catch block, how do I get my code to ru...more >>


How do you convert a string value "123.45" to a decimal data type
Posted by Will at 5/12/2004 10:26:03 PM
Thanks in advance....more >>

ProjectGuid
Posted by 2G at 5/12/2004 10:07:52 PM
Hi, How is ProjectGuid generated? Or is it just some random generation. Thanks. ...more >>

How to use Keyboard hooks in C# ?
Posted by Salim Ansari via .NET 247 at 5/12/2004 9:57:03 PM
(Type your message here) -------------------------------- From: Salim Ansari Can anybody please give me sample code in C# to use keyboard hooks in C#? THat would be a great help. Thanks in advance Salim ----------------------- Posted by a user from .NET 247 (http://www.dotnet247.com/) ...more >>

Global variable in C#
Posted by G.Esmeijer at 5/12/2004 9:40:56 PM
Hi, I would like to use a couple of hundred constant string variable throught my program. I want to use them from every corner of the software. In Vb I jst declared the global and it worked . How do I perform this in C#? p.e. string NE_01_001 = "Granulator"; How to declare it and where...more >>

How to disable javascript in AxSHDocVw.AxWebBrowser?
Posted by Simon CJC at 5/12/2004 8:06:02 PM
Hello I use AxSHDocVw.AxWebBrowser in a windows application. But sometimes the url I browsed in AxSHDocVw.AxWebBrowser contains error caused by javascript. Can I prevent javascript from running in AxSHDocVw.AxWebBrowser Thanks Simon CJC...more >>

Resize Behaviour of a Composite Control
Posted by Suresh at 5/12/2004 7:26:05 PM
I am trying to create a composite control which is essentially a panel with 4 labels and 4 check boxes I have designed the control in VisualStudio form designer. I dont want to allow the user to change the size of this control at design time. How can I acheive that I was looking into the Immutabl...more >>

How to open .Net 2003 program with earlier VS?
Posted by Ben Wan at 5/12/2004 6:24:33 PM
I have dowloaded a few sample code from Code Guru but my visual studio .net will not open it. Do anyone know how to make the earlier Visual studio .net open visual studio 2003 projects? The project file is just an XML file. ...more >>



Taking the plunge into C# from Win32/C++
Posted by info NO[at]SPAM 3doutpost.com at 5/12/2004 4:57:20 PM
I write my Windows code in the plain old Win32 API (no MFC at all) and I'm finding that more of my apps would benefit from the use of 3rd party controls. As I understand it, I could embed them in my Win32 API based app but the more sensible option would be to move to MFC. If I'm going to co...more >>

Delegates: How to check for target methods
Posted by Einar Høst at 5/12/2004 4:53:32 PM
Hi, I'm using delegates to show progress when performing certain tasks. However, I'd like to check to see that there actually is a method available for the delegate to call. What's the correct way of doing that? Looking at the documentation for delegates, I've come up with: if (MyEvent.Targ...more >>

how to know a Request.Param value is numeric type or not?
Posted by 2003et at 5/12/2004 4:51:48 PM
How can I understand a Request.Params object's type? I need this: User enters www.domain.com/myfile.aspx?6 then myfile.aspx.cs use "SELECT name FROM people WHERE id="+Request.Params[0]; so if the user enters the parameter as string instead of integer: www.domain.com/myfile.aspx?test th...more >>

Writing Structures To Binary Files
Posted by phyzics at 5/12/2004 4:46:03 PM
I am porting an application from C++ to C#, and am having trouble finding a way to quickly and efficiently write structures to a binary file. In C++ this is trivial because all that is necessary is to pack the structure to 1 byte boundries, and then just write out the structure directly to the File...more >>

How do I create a one line text file with control codes? e.g.: 144 = 0x90 and 147 = 0x93?
Posted by Dan V. at 5/12/2004 4:19:31 PM
How do I create a one line text file with these control codes? e.g.: 144 = 0x90 and 147 = 0x93? I am trying to create a one line text file with these characters all one one row with no spaces. 1. 144 = 0x90 2. 147 = 0x93 3. STX = (^B = 2 = 0x2) 4. NUL = (^@ = 0 = 0x0) 5. DC4 = (^T = 20 =...more >>

Evaluate a string as an integer
Posted by MN at 5/12/2004 3:45:40 PM
Hi All, I have a string like ... String str1 = "(15*20)+12.5"; I want to evaluate this string to get the mathematical output. Ideally output will be 312.5. How can I do with the .Net?? thanks Manoj ...more >>

PackedLen in the string binary representation
Posted by Wiktor Zychla at 5/12/2004 3:41:03 PM
Hi there, when stored in the binaries (or in metadata), strings are represented in a special format: the length is followed by the string data. However, I do not quite understand this PackedLen value that precedes consecutive bytes. I've made some experiments and figured out that 8-b...more >>

52K exe file and 11MB memory footprint
Posted by Christofer Dutz at 5/12/2004 3:02:55 PM
Hi, First of all sorry for crossposing this question. I just found out that this place fits much more than microsoft.public.dotnet.framework I am playing around a little with C# and the .Net Framework. After finishing a first application I have a 52K executable. When executing it I can s...more >>

Problem with resource picture
Posted by Bardo at 5/12/2004 2:51:04 PM
Hi all Ok first of me new to C#sharp. At the moment I am still learning the language. The problem I am running into is that I just can't seem to get a picture embedded into my program and then read it. Everytime I get a error from the debugger. I tried all kinds of thinks but can figure out what i...more >>

C to C#
Posted by Development at American Savings at 5/12/2004 2:40:35 PM
Anyone know of a good tutorial on how to take some pretty complicated C code and turn it into a C# class? I work for a company that wants to begin developing in .net languages but we have a whole bunch of very old, very complex c functions that I would very much like to turn into a DLL (as I'm...more >>

Control Location Property
Posted by Qadir at 5/12/2004 2:36:05 PM
Hello What would be C# code for setting up control location property Thank you,...more >>

How do I convert a string to DateTime?
Posted by Tom at 5/12/2004 2:35:39 PM
I have a text file with a date in the form of mmddyyyy. I want to load this into a dateTime column in a DataSet Table. What is the syntax for this? ...more >>

Problems with an inherited Form
Posted by Uty at 5/12/2004 2:26:03 PM
(Originally posted this in VC++ section .. whoops I'm working on a series of projects which have a few things in common, which has been abstracted into an object we'll call ParentForm. I started a new (actually, the first) project. It's "main" form is called ChildForm, and it inherets from Paren...more >>

Compare to double values return Max
Posted by MFRASER at 5/12/2004 2:22:37 PM
How can I compare two double values and return the greater of the two values? example double doublea = 1.0; double doubleb = 2.0 double retVal = ?compare doublea and doubleb ...more >>

How can I find all files in a directory structure?
Posted by Cyd at 5/12/2004 2:11:03 PM
Can someone please tell me the method in C# I use to search a directory structure to find all files with the same name. I was hoping some sort of array would be returned or something Thanks in advance Cyd...more >>

enum.ToString()
Posted by Ken Allen at 5/12/2004 2:00:58 PM
The ToString() function, when applied to a variable that is an enumeration type, results in a string that is the name of the enumerated value that was defined in the source code. This is cool, but how does one override the function to have some values return a different string? For example, su...more >>

Can I Download 60-day version of .Net 2003?
Posted by Angel at 5/12/2004 2:00:22 PM
Is it possible to download the 60-day version of Visual Studio .Net Pro 2003? Microsoft.com has it for $4.95 but they're on backorder (and I don't want to pay for a trial version). Thanks. ...more >>

Using PropertyGrid to display a struct type attribute
Posted by Jinlin at 5/12/2004 1:49:23 PM
I am using PropertyGrid to display some attributes, one of them is a key/value pair struct. When you click on the attribute, a standard dialog box will popup that I can edit the values. My question is how can I access this dialog box? For example, there is a help button on this dialog box a...more >>

KeyPreview property
Posted by Patrick de Ridder at 5/12/2004 1:38:05 PM
"Forms provide a Boolean KeyPreview property. If you set this to true, your form receives key press events when any of its controls have focus, and it receives these events before the control does. This technique is useful if you are programming a customized interface or a game where you need to ...more >>

Remoting Singleton problem
Posted by Greg Bacchus at 5/12/2004 12:49:55 PM
Hi, have got a Windows Service that is a remoting server, like <wellknown mode="Singleton" objectUri="CacheService.rem" type="ObjectCache, Cache" /> but when used by a client, it does not appear to be a Singleton. The ObjectCache class has an Age property, and for each instance of ObjectCache ...more >>

Chr$(13) in .NET?
Posted by Eddie B. at 5/12/2004 12:05:52 PM
Does anyone know how to do Chr$(13) in .NET? Thanks, Eddie ...more >>

ReadFloat - Reading a 2-Byte float in C#
Posted by herbert.wildmeister NO[at]SPAM gmx-dot-de.no-spam.invalid at 5/12/2004 11:59:36 AM
The System.IO.BinaryReader contains methods for reading almost every basic data type except for 2-Byte floats. Does anybody know how to read a 2-Byte from a file stream? There has to be a more efficient way than to manually read the bits and encode them to a float. ...more >>

Global Dataset in windows application
Posted by James Morton at 5/12/2004 11:10:14 AM
I am writing a c# windows forms application. I read in an XML file to a dataset for read-only access (by the user and the application logic). This is not an MDI app but has LOTS of seperate forms. They all need to get to tables within this DataSet. How can I make the DataSet "Global" for all ...more >>

Creating a popup box similar to 'Insert Comment' in Excel?
Posted by Angel at 5/12/2004 10:47:42 AM
How can I create a popup window similar to the 'Insert Comment' dialog in MS Excel? I only need it to popup, and it should have an OK button. Would that be a Windows form or a user control? Thanks. ...more >>

crossing multiple IP address
Posted by John J. Hughes II at 5/12/2004 10:46:03 AM
I have a system where my software sits on one server and interacts with another server running MS SQL. My software recieves connects via a socket layer on the internet and does it's thing with the SQL. This seems to work fine. The problem is now I have a situation where the internet connect...more >>

Calling known method on unknown type?
Posted by Julie at 5/12/2004 10:42:30 AM
I have a situation where I have multiple objects that aren't related in any way (no base class), but all have a couple of common methods/properties. I'm looking for a clean way to call a particular method/property for the object, w/o having to resort to a bunch of if-is-cast statements. Here ...more >>

Dialog boxes that can minimize vertically
Posted by JP at 5/12/2004 10:39:51 AM
Hi, Does dialog boxes that can minimize vertically exist in C#.NET? I have seen these boxes in e.g. paint shop pro and many linux user interfaces. Could anyone help? -jp ...more >>

Dataset WriteXml method
Posted by RS at 5/12/2004 10:35:08 AM
I have a dataset that was created from a XSD schema. I populate it with data and use WriteXml method to create XML document. Problem is XML tags come out in the order that is different from the order of tags in the XSD. My client requires that XML validates against XSD, and the use XMLSPY to vali...more >>

Need help with Windows Service
Posted by Tressa at 5/12/2004 10:16:11 AM
I have a C# Windows Service and I need to access it from a C++ Application. I am new to programming and have been looking all over for help on the internet without much luck. I did place this line at the top of the C++ file (using namespace Shutdown_Restart;) I get something that says a namesp...more >>

Split this C# newsgroup
Posted by Skc at 5/12/2004 10:12:45 AM
To whoever the Administrator is I am a newbie. I find this newsgroup is too active and daily there are a lot of postings. Does take a lot of time to browse thru the messages. Can we at least split this newsgroup into 2 or 3 groups like: - Newbie (Newbies will post and browse her...more >>

State Button
Posted by Mathieu Chavoutier at 5/12/2004 10:08:22 AM
Hi. Is it possible to do a State Button ? (state selected, and state not selected) I want to do a choice : for example male/female yes/no. So, if the user select Yes, no will be not selected, and Yes will be selected. Is there a simple way ? Have I miss something in the Button property ? ...more >>

How to ...
Posted by Jacek Jurkowski at 5/12/2004 9:41:56 AM
Programically press key in a TextBox as user does pressing keyboard button? ...more >>

number of classes/methods in the .NET framework
Posted by Mark at 5/12/2004 9:38:31 AM
I have it in my head that I saw a marketing document from Microsoft with the total number of classes and methods in the .NET Framework. Something like 70,000 methods? I don't need precise numbers, but a rough estimate of the number of classes and methods would be interesting to know.... Thank...more >>

IServiceProvider. Why does this interface exist?
Posted by kb NO[at]SPAM trollsoft.com at 5/12/2004 9:37:52 AM
I'm currently creating some user controls in C#, and I've come across the interface IServiceProvider. This interface must be one of the worst examples of bad design I've ever seen. It contains one single method, with the following signature: object GetService(Type serviceType); Can anyone t...more >>

List of Sqlservers on LAN
Posted by Reza Alirezaei at 5/12/2004 9:20:56 AM
How can I have a list of all sql servers avaiable on our LAN populated in a DropDownList exacly like what we have when we want to specify Datasource in ADO.Net or wherever? Thanks ...more >>

Network Detection
Posted by Demetri at 5/12/2004 9:06:07 AM
When a user disconnects their wire to the network or those who use RAS disconnects - I need for my Winforms app to be informed the moment it happens. What is the best way to code this in C# ? Any examples or code snippets?...more >>

Stepping Through a .cs in C#
Posted by chawes7420 NO[at]SPAM aol.com at 5/12/2004 9:04:50 AM
I created a class in C# and I would like to step through the class to make sure it works correctly. How can I step thorough this class to make sure that everything is working correctly?...more >>

DataGrid Sorting Explained
Posted by Randy at 5/12/2004 8:41:55 AM
Hello, Could someone please explain to me how the sort works on a Windows Form DataGrid? What I'm trying to find out information on is the fact that when you have a DataTable bound to a datagrid through the DataSource property...if you click on a column header and sort the datagrid, the underly...more >>

Legacy Struct arguments
Posted by Saya at 5/12/2004 8:41:44 AM
Hello guru's, Please help me out in the following: How must I write the code in C# to cope with the following legacy-struct: typedef struct callback { FILE* stream; char buffer [1024]; } I've been trying to use the following, to no avail: [StructLayout(LayoutKind.Sequential)] p...more >>

MSWord to PDF
Posted by Eric at 5/12/2004 8:11:02 AM
Hi I'm trying to convert a MSWord document to a pdf file. How can I do this without a pdfprinter or a software or a component that you can buy on the web. I just want to do ti programatically. If there is no way to do it freely can some one tell me where I can find information to do a component by...more >>

Get Date
Posted by Ola at 5/12/2004 7:32:48 AM
How can i get the date if i have weekno, year and dayofweek using gregorian calender...more >>

Reading Contacts from public folder (Exchange) using c#
Posted by Roland Wolters at 5/12/2004 5:29:10 AM
Hi, I need to read contacts from a public folder in Exchange. I want to do this using my favorite developping language .... c# Anyone there to get me started ? Roland...more >>

Serialize controls
Posted by MichiSu11 at 5/12/2004 4:36:05 AM
I want to serialize the properties of controls. I write Property Name and Value to an Hashtable. This hashtable is serialized. So I want to find out which properties of the control are serializable. I tried following but it doesn't work. I still get not serializable properties into my hashtable. Exc...more >>

OO question on overriding virtual methods
Posted by ori NO[at]SPAM bbs-ce.uab.es at 5/12/2004 3:54:11 AM
Hi all ! There's a question I've been bothering for a while: I'm actually developing architectural frameworks for application developing and I think virtual methods, although needed because of the flexibility they introduce (flexibility really needed in framework developing), are often a nu...more >>

Code Parser
Posted by Tony Liu at 5/12/2004 3:22:54 AM
Does anyone know a good code parser that can parse source code written in C++, VB, C#, and other popular languages? I goggled but can't find any useful link. Thanks Tony ...more >>

Calling an executable from .NET
Posted by Liz at 5/12/2004 2:28:28 AM
I need to be able to call an executable from a .NET solution when a button is pressed. How do I go about this??...more >>

always exactly 100s to establish connection...why??
Posted by TJ at 5/12/2004 2:26:04 AM
Dear Sir/Madam I made one user control using C#(.NET Runtime is 1.1). It is embeded in Internet Explorer Basically, this control is very similiar to FTP client program. So it should be connecte to FTP server. First of all, I have granted full trust for security. So it is not related with an se...more >>

how to add items to main menu...
Posted by Bad_Kid at 5/12/2004 2:14:38 AM
dynamicly, during the program execution - for example - if I press a utton - to add MenuItem - "aaaaa" into the &File column, after Save and before Save As? - and how to remove it as well? ...more >>

AI and .NET: Simulating a Swarm Algorithm in C#
Posted by A Waterfall That Barks at 5/12/2004 1:30:23 AM
http://www.c-sharpcorner.com//Code/2003/March/SwarmSim.asp I just found this port of the swarm groups famous 'complexity from simple interacting agents' type software. Very easy to load and run in Studio. I'm going to try a mono build when I get home...don't know about how to translat...more >>

Project management, multiple directories and namespaces
Posted by Charlie Calvert at 5/12/2004 12:39:42 AM
I'm new to C# and am used to Java, where there is a correspondence between package names and directories. I'm having trouble creating the same functionality in Visual Studio. In particular, I'm having trouble compiling such projects. As an example, suppose I have a project called ConsoleApp...more >>

cracking security dongles...
Posted by Ben at 5/12/2004 12:25:31 AM
I am interested in working on more secure ways of distributing software, which is done via hardware dongles in many cases. However, I really don't even know where to start reading about how it all works. Is there any information out there about how dongle/hardware security works and how it is ...more >>


DevelopmentNow Blog