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 2006 > threads for thursday may 18

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

form.showDialog() does not work properly
Posted by PiotrKolodziej at 5/18/2006 9:28:46 PM
Hi Iam running form2 from form1. But as it was in many my previous applications, now the form2 doesn't overlapp form1. It means that i can select form1 without even closing form2. Here's sample code: if (MessageBox.Show("Button is not recognized. Would you like to ...more >>

systems programming, internals
Posted by rseedle at 5/18/2006 9:28:01 PM
Is there a general intro somewhere into Windows O/S internals, systems programming, device control (USB) with programming examples ? Randy...more >>

Parse String in Quotes as without Quotes
Posted by vighnesh at 5/18/2006 9:24:50 PM
Hello EveryOne In my project I have to parse a string in Quotes as without Quotes.I tried the following code but it didn't work to me. I again getting the string with Quotes, Can Anybody suggest me where I went wrong? Thanks in advance. code: strAssociation = "rundll32.exe" If strA...more >>

What does the syntax"~[Class name]" mean?
Posted by Optimus at 5/18/2006 8:18:45 PM
Hi everyone, I got a question about a syntax in c# which I'm not familiar with. And then I've got some sample source code as shown below. public class Window: System.Windows.Forms.Form { public Window(){ // some code here } ~Window() { ...more >>

Reflection, how to?
Posted by James B at 5/18/2006 7:52:29 PM
If I have a Class below and I want to use Reflection to get classes member variable value how should I actually do it? Can anyone help? Cheers! using System; using System.Reflection; namespace ConsoleApplication1 { /// <summary> /// Summary description for Class. /// </summary> c...more >>

Exception in a Thread other than Main thread
Posted by Mahesh Devjibhai Dhola at 5/18/2006 7:17:17 PM
Hi, I have one program, where i am using IO and Socket Asynchronous methods "BeginXXX" and "EndXXX". Many time, it happens that in Async delegate method, some exception occurs and if i dont handle it, it shows standard Unhandled exception box even I have handled the exception using try/catch ...more >>

OpenFileDialog - MyComputer
Posted by PiotrKolodziej at 5/18/2006 7:04:05 PM
Hi I have a problem. When i enter MyComputer via openfiledialog, i cant see any drives, to change, and generally window is open. Thanks for any help. ...more >>

ListView problem
Posted by Pedro Fernandes at 5/18/2006 6:24:52 PM
Hi all. I have a problem when I do interop between .NET and VB6. What happens is that the listview loses the tile view when my .NET form is under VB6. Does VB6 support this feature? Thanks....more >>



Using multiple windows forms
Posted by Mario at 5/18/2006 5:26:00 PM
Hi, I am trying to create an application with multiple windows forms. The problem that I have is that after creating the window forms, I do not know how to open formN after closing Main form. Each form is in its own class. What I want to do is the following: 1. Click a button on Main me...more >>

lists of generics
Posted by Dan Holmes at 5/18/2006 5:21:30 PM
I created a class that accepts a type parameter. I then want to put all of those into one list<>. List<Parameter<object>> lp = new List<Parameter<object>>(); Parameter<string> licenceKey = new Parameter<string>(); licenceKey.Name = "LICENSEKEY"; ...more >>

Multithreading in GUI application
Posted by Aleksey at 5/18/2006 4:37:00 PM
Hi, all! I'm going to write GUI application with server side. Queries to server should run in particular thread and GUI should stop its work until the query finishes. But refresh of GUI main form should be performed during query time. Does anybody know how to do this? Best Regards ...more >>

Casting a string to a double
Posted by Tina at 5/18/2006 4:33:12 PM
I'm trying to do this: Double myDouble myDouble = (double) myString I have ensured that myString has a valid value i.e. 79.46. But the compiler won't let me do the cast. How can I get the value into myDouble. Thanks, T ...more >>

Saving objects to a collection for later retrieval
Posted by eljainc at 5/18/2006 4:18:49 PM
Hi I'm looking for general code examples to save a form or the components of a form for later retrieval. For example, lets say at runtime some controls (listview, panel, labels) were placed onto a form. Is there a way to save these items, their general properties (position on the form or pare...more >>

No Symbols loaded error - C#
Posted by JV at 5/18/2006 4:12:33 PM
Hi All, I am new to C# and I am having trouble compiling and running code. I have the code written (it was just an example that I took) and I run it, it gives me No Symbols loaded error as below. Please let me know what is that I am doing wrong. 'DefaultDomain': Loaded 'c:\windows\micros...more >>

No Symbols Loaded error in C#
Posted by JV at 5/18/2006 3:47:52 PM
Hi All, I am new to C# and I am having trouble compiling and running code. I have the code written (it was just an example that I took) and I run it, it gives me No Symbols loaded error as below. Please let me know what is that I am doing wrong. 'DefaultDomain': Loaded 'c:\windows\microsof...more >>

retreiving namespace using Reflection | Beginners
Posted by Erland at 5/18/2006 2:04:13 PM
Hi, I want to retreive different namespaces available within an Assembly using Reflection. Is this possible? Can i retreive a namespace within an Assembly using " Type " ? My question is how can we retreive a namespace from an Assembly? For example, i can see different namespaces with " msc...more >>

Cursor Position in KeyPressEvent
Posted by Richard MSL at 5/18/2006 1:49:01 PM
I have a TextBox that I am putting some conditions on, such as restricting the number of decimal places that the user can enter. I have been using the KeyPress event, which allow me to examine the current text and prevent inappropriate keys from being pressed. But I can not figure out how to ...more >>

Repeating a character X number of times?
Posted by David Veeneman at 5/18/2006 1:45:43 PM
What function do I use to repeat a character X number of times? For example, say I want to create a string with 40 dashes. Thanks in advance -- David Veeneman Foresight Systems ...more >>

Scheduling within a windows service
Posted by Simon Harvey at 5/18/2006 1:43:05 PM
Hi all, Can anyone point me in the direction of how to have a .net developed service wake up every sof often to perform a task. I need to make a service that will wake up every 15 mins to check a database. Is there some sort of event/notification API in .net that I can use? I'm guess...more >>

regex high cpu utilization
Posted by rh at 5/18/2006 1:32:24 PM
hi all, take the following 2 c# lines: 1) str = Regex.Replace(str, ".*AAA", ""); 2) str = Regex.Replace(str, "^.*AAA", ""); notice that the only difference is that the pattern in line 2 has a starter marker (^). if str is large and does not contain the pattern, line 1 takes much much longer...more >>

Where is permview.exe?
Posted by Brett Romero at 5/18/2006 1:26:27 PM
I've downloaded the 2.0 SDK but still can't find permview.exe. Where is it located or where can I download it from? Thanks, Brett ...more >>

Off programming but related question ...
Posted by Jacek Jurkowski at 5/18/2006 1:22:16 PM
I'm looking for an icons for my application. As I'm not an Picasso and I can not draw it by myself I would like to download/buy some icons pack. I would like it to be a good quality, true color, XP style icons. Any ideas? ...more >>

Validating size of image before uploading to database
Posted by Charlie NO[at]SPAM CBFC at 5/18/2006 12:05:26 PM
Hi: I'm working on an application that uploads images into binary fields on SQL Server. Before submitting, I would like to validate size of image (ie, 75 pixels by 75 pixels) so that images are always correct size. How do I programmtically validate image size? Thanks, Charlie ...more >>

Enum.TryParse() substitute
Posted by John A Grandy at 5/18/2006 11:39:05 AM
Primitives like Int32 provide a Parse() method , and TryParse() method -- which is very useful. Enum provides a Parse() method, but not a TryParse() method. Other than wrapping the Enum.Parse() in an exception handler , can someone recommend a technique similar to TryParse() ? Thanks. ...more >>

Adding Controls At Run-Time [Win #C]
Posted by MikeY at 5/18/2006 11:08:46 AM
Hi everyone, I have built a user control "keyboard" and I am trying to figure a way to add this control at run-time. I have also tried creating a Inherited user control, which I am able to add this to my form at run-time, but does not have the functionality of passing the data back to the m...more >>

How can I get a bitmap of a Form using .NET 1.1 (ie NO CopyFromScreen)
Posted by Paul_Madden via DotNetMonster.com at 5/18/2006 11:05:40 AM
How can I get a bitmap of a Form using .NET 1.1 (ie NO CopyFromScreen) -- Message posted via DotNetMonster.com http://www.dotnetmonster.com/Uwe/Forums.aspx/dotnet-csharp/200605/1...more >>

Are there __FILE__, __LINE__ macro equivalents for C# ?
Posted by cbro at 5/18/2006 10:27:02 AM
Is there a C# equivalent for the C++ macros __FILE__ and __LINE__ ? They are quite handy for pinpointing where an event log entry was generated. I am using Visual Studio.NET 2003....more >>

C# on multicore
Posted by Padu at 5/18/2006 9:45:32 AM
Hi, I'm a newbie to C# and I haven't dig into multi-threading in .net (I have some experience with MT in delphi and c++). Let's say I have one of these new pentium D multicore. If I start a program that has 2 threads, will they execute each in a different core? Is there any support in the ...more >>

How to reboot at end of deployment
Posted by Dave at 5/18/2006 9:18:01 AM
My deployment contains sevral projects, one of which is a service. The installation does not automatically carry out a reboot at the end of the installation process, which is required to start the service. Is there any way I can put something into the deplyment project to make the target syste...more >>

Import reg files
Posted by RD at 5/18/2006 8:59:03 AM
How can I import a *.reg file in C#? In VbScript, I would use WshShell.Run("regedit.exe /s file.reg",,) Thanks ...more >>

Checked Listbox?
Posted by dm1608 at 5/18/2006 8:34:14 AM
Hi, all. I have a requirement for one of my programs to have a "Checked Listbox" that contains a list of all my local/remote drives. I woudl like users to click one or more drives that I need to search for particular files. Can anyone tell me how to implement this in .NET 2.0 using VB o...more >>

List all classes in .NET
Posted by martin at 5/18/2006 7:00:02 AM
Hi, I have some rather unusual questions? How do I list/enumerate all classes in a namespace? How do I list/enumerate all classes in a assembly? How do I list/enumerate all classes in .NET? For the last part I guess I would enumrate the files in the GAC or something and then work from t...more >>

Protected keyword
Posted by Ant at 5/18/2006 6:20:01 AM
HI, I'm using the protected keyword in a class to make a method accessible to a child that inherits from it so as to be able to call the protected method from the child class. I can't seem to be able to access it from either the base class or the class that inherits from it. Here is a sampl...more >>

Receiving Error eMails...
Posted by dauphian NO[at]SPAM gmail.com at 5/18/2006 4:32:11 AM
Greetings, Is there a way to receive the information that shows on the default error page within .net in an email? I have managed to pull out some pieces using: mail.Body = "Error Description: " + Server.GetLastError().Data.Values + " <br /><br /> " + Server.GetLastError().Me...more >>

Simple Inheritance - An unhandled exception of type 'System.StackOverflowException'...
Posted by daz_oldham at 5/18/2006 4:21:44 AM
Hi everyone As my expedition into OOP takes another shaky step, I now am getting the error: An unhandled exception of type 'System.StackOverflowException' occurred in xxx.dll. In my Visit.cls I have got: public class Visit { public FABInfo Info = new FABInfo(); // Li...more >>

Error converting dd/MM/yyyy to sql server format
Posted by Assimalyst at 5/18/2006 4:05:38 AM
Hi, I am trying to convert a UK formated date in a textbox to sql server format. dd/MM/yyyy -> yyyyMMdd. Here's the code: IFormatProvider format = new System.Globalization.CultureInfo("en-GB", true); DateTime dateUK = DateTime.ParseExact(DOBTxtBx.Text, "dd/MM/yyyy", format); string dat...more >>

string to integer array
Posted by Howard at 5/18/2006 2:35:40 AM
How would I convert a string to an integer arrary or arraylist? example: string mystring = "1, 2, 3"; //convert to int[] myArr = {1, 2, 3}; Thanks in advance, Howard ...more >>

How can i acquire information about the hardware firewall
Posted by jenue at 5/18/2006 2:17:39 AM
Hi evreryone! Is there a way to acquire information about the hardware firewall using wmi or anything? i'm having a problem with this scenario. can anyone you guys help me? thanks, jenue ...more >>

DESPERATE: Focussless form
Posted by Rene at 5/18/2006 1:52:55 AM
Anyone knows what in the world do I have to do to prevent a form from ever getting the focus? I tried using the IMessageFilter interface like this.: public bool PreFilterMessage(ref Message m) { return true; } This stoped pretty much all messages from being processed but the damn f...more >>

HttpWebRequest closes the connection on each request
Posted by Basel at 5/18/2006 1:12:51 AM
Hi All! My code issues Http POST requests in a loop using HttpWebRequest, I set one unique ConnectionGroupName, and I expected from the client to open one underlying persistent connection for all the requests I generate. This is the code: public static void Main() { for(int i=0;i<100000...more >>

Problem passing List<T>
Posted by burrows.stephen NO[at]SPAM gmail.com at 5/18/2006 12:55:31 AM
HI all I have a Method that I wish to pass a generic List as a parameter, [code] public void Test (List<Client> temp) { this.ClaimBindingSource.DataSource = temp; } [/code] The idea is then to bind it for a data report. But upon trying to compile i get ...more >>

Relocating a Control on screen and setting it to top-most
Posted by Udi at 5/18/2006 12:00:08 AM
Hi, I have a listbox and a textbox that are built and shown dynamically. My problem is that their positions and sizes may cause them to be displayed out of the their parent form bounds, and in a worse case out of the screen bounds. 1. How do I make sure my controls will always be displayed insi...more >>

nulls versus ?
Posted by Peter Kirk at 5/18/2006 12:00:00 AM
Hi, does anyone know of a resource which discusses the merits of using "nulls" versus a specific "unknown" value? For example, should I use "null" for an unknown or unset date, or should I use min-value? For a string (eg a name) should I use null or an empty string? And so on. (These sor...more >>

How can i get a object by it name in the class whict create it.
Posted by NO[at]SPAM NO[at]SPAM Worker at 5/18/2006 12:00:00 AM
for example,i create a class as below public class testClass{ private object obj //this is the right object i need public testClass(){ obj = new object(); } public object GetObj(string name){ return this.XXXXX(name);// now how can i get the object with the ...more >>

session variables
Posted by puja at 5/18/2006 12:00:00 AM
hi all, I have a problem. I have a class file name Agent which has Name and SalesPerson as two strings. On below page, am reading session object called agentdetail of class Agent and filling out agency name and salesperson name on page load event public partial class AgentDetail : Syste...more >>

validation of input for text box
Posted by gordon at 5/18/2006 12:00:00 AM
Hello I am just starting off with C# after a long time out of programming. I am developing some test applications for pocket pcs that use the input to text boxes as the source for an equation. However, I cant find any 'out-of-the-box' validation methods to ensure that only numbers are inp...more >>


DevelopmentNow Blog