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# > february 2007 > threads for friday february 2

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

what is the difference wetween Int32.parse and Convert.ToInt32
Posted by psycho at 2/2/2007 10:42:51 PM
what is the difference between the two forms of converting to integer from string string strVal = "10"; Convert.ToInt32(strVal); Int32.Parse(strVal); which method is more efficient in terms of performance? ...more >>


Casting an enum, skips one for no reason?
Posted by PokerMan at 2/2/2007 6:24:30 PM
Hi guys, Maybe someone can explain thisi have this enum: public enum LimitType : int { BottomLimit, TopLimit, Limit } In another class i read values from my db and cast them to the enum, where my db id is 1, it will match the enum that is first and...more >>

Need help with regular expression
Posted by intrader at 2/2/2007 5:27:48 PM
I can't figure out why VS2005 has a problem with the following definition Regex rx = new Regex(@"('|\")"); //here put squiggle under "); what I think I am writing is a regular expresion that will give me all the matches for single or double quotes and remember the match so that I can t...more >>

Poker odds calculator
Posted by hardieca NO[at]SPAM hotmail.com at 2/2/2007 5:05:20 PM
Has anyone heard of an open-source .NET engine that calculates the winning and losing percentages of hands? Regards, Chris ...more >>

Generics and consatraints.
Posted by Michael S at 2/2/2007 4:45:53 PM
When reading about generics, one benefit is to have different implementations depending on reference/value type. As far as I know, List<T> does not box/unbox ValueTypes. How do they do that? A lot of if/else statements in the list? Or can you do something like class MyList<T> where T : ...more >>

Excel get_Range
Posted by John at 2/2/2007 4:44:00 PM
Hi, I use the following statement to get a range in Excel worksheet: Excel.Range oRange = oSheet.get_Range("A1", "A10"); How can I get the entire column? Thanks....more >>

C# Stack item reversal
Posted by RobertEstelle NO[at]SPAM gmail.com at 2/2/2007 4:09:52 PM
Hello everyone, I encountered an interesting bug in a program I was writing that was caused by the following unexpected behaviour. Basically, creating a new Stack object from another results in a reversal of the item ordering. Example: Stack<string> a = new Stack<string>(); a.Push("a"); a.P...more >>

Need help understanding how to call unmanaged dll
Posted by mjohnson at 2/2/2007 3:56:18 PM
I bought a USB IR reciever and installed the driver. The developer kit gives a DLL with the following information: C++ Builder / Microsoft Visual C++: #ifdef __cplusplus extern "C" { #endif int __stdcall DoGetInfraCode(uchar * code, int extra, int * codeLen); #ifdef __cplusp...more >>



unbelievable..?
Posted by Carlos at 2/2/2007 3:51:42 PM
Hi all, I recently built a small prototype smart device project with C# under VS2005 SP1, and was surprised to see that a 'trivial' statement did not work to be able to verify the existence of a file that I had created i.e. System.IO.File.Exists(filename) I verified the existence of th...more >>

Advice on Images and CF2 Please???
Posted by iKiLL at 2/2/2007 3:28:00 PM
Hi All, I am new to .Net and Compact Framework. So I have a really basic question for you all. I am building an application in C# for Windows Mobile 5.0 in VS2005 CF2.0 I would like this application to have some customizable features with out having to recompile. ...more >>

SQL Parameter
Posted by Chris Divine at 2/2/2007 3:18:23 PM
Hello, I sure this is simple, but I cannot see my way through it. I simply want to add the boolean parameter to the sql string - but can't, as I get the error message below. Help much appreciated. MyConnection.Open(); SqlCommand mySqlCommand = new SqlCommand( ...more >>

How to reverse boolean value
Posted by moondaddy at 2/2/2007 2:43:18 PM
I'm new to c# and want to know the preferred way to reverse a Boolean value. for example: in vb I can do this: dim flag as Boolean flag=not flag Is there something similar in c# or do I need to use and if statement? Thanks. -- moondaddy@noemail.noemail ...more >>

Programmatically get printPreviewDialog on a windows form
Posted by inpuarg at 2/2/2007 2:22:58 PM
I have a windows form, there are button , textbox label etc. controls on it. and i can programmatically get each of their names. and i also have a printPreviewDialog on a form. I cannot get it through loop. i know that it does not have an appearance. so - how can i get it programmatically ...more >>

Best methodology for a common db/front end issue
Posted by PokerMan at 2/2/2007 1:54:33 PM
Hi A common situation is a database using an ID number for a table and the front end code needing to read this same id and store it back when used in foregin key tables. For example: database table RoomType ------------- RoomTypeId RoomType and assume values RoomType ------...more >>

detect endianness
Posted by Jimmy Zhang at 2/2/2007 1:07:15 PM
Hi, I am wondering if C# always assumes small-endian byte order, if not, = how should I test the endianess of the platform, there doesn't seem to = be a way to check as pointers are implicit (as opposed to being explicit in = C)? Thanks jz...more >>

alternate controls for ToolStrip and MenuStrip?
Posted by chandu at 2/2/2007 1:01:09 PM
Hello , I am developing an application which it contains one MenuStrip and ToolStrip. now i have to replace these controls with some other controls. is dotnet providing any alternate controls to this . I am dynamically adding the toolstripitems to the toolstrip, Help me. Thanks c...more >>

A quick is this safe singleton question
Posted by PokerMan at 2/2/2007 12:54:48 PM
I usually do singleton implementatios like this: static readonly myClass instance = new myClass (); public static myClass Instance { get { return instance; } } static myClass(){} but in this situation my constructor has variables an...more >>

how do I run an exe from another exe file
Posted by TonyJ at 2/2/2007 12:21:46 PM
Hello! I use VS 2003. I just wonder how do I start an exe from another exe. //Tony ...more >>

can the joystick send events to a C# app?
Posted by Vicente Nicolau at 2/2/2007 12:19:41 PM
All example codes I found with DirectX or XNA access the joystick by pulling... ?? is there anybody who has been able to use the joystick with events (with C#)?? Is it possible? If it is not possible, I only want to know it. In that way I would tell it inmediately to my boss... thank you ...more >>

Remote Debugging
Posted by Vai2000 at 2/2/2007 12:05:06 PM
Hi All, I have a total new server with win2k3 and .net framework 2.0. I have copied an exe which I had built on my machine (.net 1.0) works super on my local box. I need to debug this exe on the server..I cannot install Visual Studio on the server.How can I debug this exe? TIA PS: The ca...more >>

send message to win32 app to press button control - remote control button
Posted by Danny at 2/2/2007 11:45:20 AM
Hi I want to be able from my csharp button to start an application ( which I can do) and then somehow send a message to the win32 application that says "press the button" The win32 application ( borland app) has a button on it that I need to click in order for it to start correctly. Is ...more >>

TypeConverter::ConvertFrom ignores implicit cast
Posted by not_a_commie at 2/2/2007 11:17:09 AM
I have an Angle class that I store angles in. It's basically just a bunch of fancy functions for manipulating a double. It has implicit casts for converting to/from double. Due to the project structure and where it stores the preferred SI units for display, I wanted to have the TypeConverter in ...more >>

PropertyGrid dynamic Dropdown List
Posted by phcmi at 2/2/2007 11:05:47 AM
I have a PropertyGrid question. My task is to replace a legacy dialog box presentation with a modern one. The dialog itself allows the user to set [key/value] configuration settings in our application, so it seems to me that a PropertyGrid is a perfect modern replacement. I won't bore you ...more >>

newbe question
Posted by Chris at 2/2/2007 10:13:00 AM
When a Microsoft help topic says to use this code, where woudl you place it? Sorry, I know its a lame questions. I am a beginner. [TypeConverterAttribute(typeof(DataGridViewRowConverter))] public class DataGridViewRow : DataGridViewBand ...more >>

Tool box icons mostly missing....
Posted by TheMadHatter at 2/2/2007 9:56:00 AM
I dont know what happend to my tool box icons, but most of them seam to have taken a hike. Installing frameworks 3 didnt help bring them back. Where in VS would I set the path for them? And what is the typical location for them?...more >>

COM Question (Excel)
Posted by Gunawan at 2/2/2007 9:17:14 AM
Dear All, I have create an excel (COM Object) using this code Excel.Application xls = new Excel.Application(); but I can not remove it from memory although I have using close and quit wb.Close(false, false, 0); xls.Quit(); If I open task manager there is excel.exe. If I run multipl...more >>

Save bmp/jpg/png...to icon (16x16) - Problem..
Posted by SveinErik at 2/2/2007 9:16:00 AM
Hi, I'm trying to find a method to save bmp, jpg and png files as ico files, 16x16 size. I have managed to convert and save bmp files to icon, but only in 32x32 size. I can't figure out how to save it in the size: 16x16, and I hope someone could help me out a bit? Code that saves from bmp to i...more >>

DataGridView - Row Selected
Posted by Chris at 2/2/2007 9:13:01 AM
What method will return which row is currently being edited in a grid?...more >>

Need to calculate milleseconds until 1:00am...
Posted by trint at 2/2/2007 8:46:45 AM
I need to get the time from NOW and get how many milleseconds until 1:00am for my countdown timer please. Any help is appreciated. Thanks, Trint ...more >>

filestream access denied
Posted by sham at 2/2/2007 8:45:40 AM
Hi to all, I have a file that when I try to open gives the exception message "Access to path c:\data\abc.mpg is denied". As soon as I try to do file = new FileStream(filename, FileMode.Open); the exception is raised. I have rebooted my machine to make sure that nothing is locking the fi...more >>

upgrade to .NET 2.0 but some files are missing
Posted by TonyJ at 2/2/2007 8:35:35 AM
Hello! I have VS 2003 which use .NET 1.1 but I have download and installed .NET 2.0 from MS but some files are missing. The download and installation was successful. The main reason for me to use .NET 2.0 is to be able to use the ClickOnce technology that exist in VS 2005 but according to an...more >>

Setting LinkLabel cursor?
Posted by David Veeneman at 2/2/2007 8:26:57 AM
I'm creating a UserControl that uses a LinkLabel. For reasons that I won't bore everyone with, I don't want the LinkLable to show the default hand cursor when the mouse enters the control. Should be a simple setting on the LinkLabel.Cursor property, right? Not so simple. I set the property,...more >>

web service timeout!
Posted by DBC User at 2/2/2007 7:08:43 AM
Hi All, I am using VS2005/wse3.0 in winform application and using web services. When I try to write a large file say about 5 to 10 MB file (large for me) I get an error something like the following; I found bunch of postings on this. but they are old and for older WSE. I am able to download...more >>

Date Fields don't go into SQLExpress dB but No Error. Pulling Hair out. Help!
Posted by Lynn at 2/2/2007 7:02:53 AM
I wrote the plea below several days ago and got some good help. Thanks to Robin, who responded and helped me solve a real hair-puller for me. Now I have a different question: the changes are appearing in my dB, and all are ok except my dates don't go in. I have tthree date fields, and all of t...more >>

the symbol
Posted by rodchar at 2/2/2007 6:46:04 AM
hey all, what does the @ symbol in front of a string mean? @"mystringvalue" thanks, rodchar...more >>

How to handle a property?
Posted by Papa.Coen at 2/2/2007 6:39:15 AM
Contrary to what the title might make you believe; this is not a n00b question. I recently came across a problem with using a property which made me question the way I use/see properties in general. The problem was with changing item values in a DataRow. The dotNET DataRow class has a ItemVal...more >>

How to click a button multipal times
Posted by thegreenone at 2/2/2007 6:19:01 AM
situation: when i click capture button i need to capture a weight everytime i hit it (5 fields to fill) pluse incriment a counter to let me know which field to fill. I need a code skelaton. -- i have no experience be kind...more >>

data from remote computer
Posted by Tracid83 at 2/2/2007 6:10:44 AM
Hi, I would like to get information from remote computer. I can't use Wmi because I don't have the rights on every computers connected to the network. I use Netbios protocol to know computer name and Mac address. Do you know other solutions ? Thank for your help. ...more >>

Make my own class? Or just use an array?
Posted by Gary at 2/2/2007 4:48:51 AM
I'm a bit confused hopefuly someone can help. I have a text file which stores names and an associated number. Each line in the text file represents one person, and a semicolon ' ; ' seperates person from associated number. The associated number is used as a que position reference (i.e. the ...more >>

error in update command using dataadapter
Posted by nannu at 2/2/2007 4:07:32 AM
m using this code :........................... ======================================================================= OleDbConnection con =new OleDbConnection (@"Provider=Microsoft.Jet.OLEDB.4.0; Data Source = C:\Documents and Settings\ic411242\My Documents\db2.mdb"); con.Open (...more >>

good decompiler app
Posted by Ralph at 2/2/2007 3:51:38 AM
I have a .net exe a client has given to me to modify. Unfortunately client claims source code was accidentally lost, however they do indeed own the app. App is dot net I ran ildasm.exe and did indeed get something I could follow. What I need is a good decompiler to actually produce something I ...more >>

WebBrowser mouse events How do I capture?
Posted by sngilb at 2/2/2007 3:27:00 AM
The WebBrowser control is described as exposing numerous public mouse events. See: http://msdn2.microsoft.com/en-us/library/ayestehw.aspx. many of the event are described as: "This event is not supported by this control. (inherited from WebBrowserBase)". Does this mean that I can't access t...more >>

How to develop cad like application
Posted by Code_explorer at 2/2/2007 3:17:01 AM
I have searched a lot but is unable to find a sample code for developing CAD like application where we can drag circles, square etc. from tollbar connect them with line etc. If anyone of you are able to find please provide me the link for the same....more >>

How to develop cad like application
Posted by Code_explorer at 2/2/2007 3:17:00 AM
I have searched a lot but is unable to find a sample code for developing CAD like application where we can drag circles, square etc. from tollbar connect them with line etc. If anyone of you are able to find please provide me the link for the same....more >>

Copy DataSet problem
Posted by henfo at 2/2/2007 3:04:01 AM
Hi, I am working on program to cop data from the main database (Oracle or SQL Server) to a local Access-database used on laptops. The databse is quite large so the routine nedds to be fast. The stripped down code looks like this: OleDbCommand cmd = new OleDbCommand("SELECT * F...more >>

Implement interface for that class, not dervived classes
Posted by g18c NO[at]SPAM hotmail.com at 2/2/2007 1:26:01 AM
Hi, im trying to do something and just been caught off guard. I want to implement an interface but only for certain class, but of course when i derive from this base class the derived class also inherits the interface. public class Base : IGetType { protected byte m_type; ...more >>

Add items to comboBox how dropdown list resized
Posted by mawenb NO[at]SPAM gmail.com at 2/2/2007 1:10:51 AM
I have a comboBox. evevry time I selected an item in the comboBox, the dropdownlist resized. It flashed before disapeared. In my code, I handled the comboBox SelectionChangeSubmitted event, and in the event handler, I cleared the items in comboBox and refill it. Who knows why it flashed ? Is t...more >>

Confusion over Static class and Static method!
Posted by Anup Daware at 2/2/2007 1:08:01 AM
Hi Group, I have a little confusion over the use of static class in C#. I have a static method in my static class. This method reads an xml and returns a collection of objects. This collection of objects can be different for different users. This method uses some non-static variables which ar...more >>


DevelopmentNow Blog