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# > january 2005 > threads for tuesday january 25

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

How to tell if Ctrl is pressed ...?
Posted by Du at 1/25/2005 11:54:53 PM
How to tell if the Ctrl key is pressed without being inside a keypress/keyup/keydown event? I want distinguish between a "click" and a "ctrl+click" on a button. any suggestion? thanks ...more >>


Creating a solution dynamically
Posted by udi.ben-senior NO[at]SPAM intel.com at 1/25/2005 11:29:14 PM
Hi, Does anyone know how do I create a .NET solution dynamically? I have a csharp file I need to wrap in a solution and add some references to it (- all done by another application at run time of course). I guess I need to use the visual studio classes. Can someone drop me a lead on that issue...more >>

Re: DataAdapter problems...
Posted by Paul Aspinall at 1/25/2005 10:52:38 PM
OK I have made a little progress on this.... Seems I was missing: dataset.Tables[0].AcceptChanges(); However, this alone did not fix it.... I needed to manually assign the value from the 'bound' textbox, by doing... dataset.Tables[0].Rows[0]["Name"]=boundtextbox.Text.ToString(); This...more >>

Retrieve instance name using Reflection
Posted by JW at 1/25/2005 10:10:40 PM
Dear NG, I am writing a .NET CF forms app. that needs to dynamically configure buttons on a form. Since the forms designer doesn't like component arrays I am using ordinary instance names for each button (btn0, btn1 etc.) as private members of the form class, but need to reference these from ...more >>

New a object ?
Posted by ad at 1/25/2005 8:57:33 PM
I think we always new a class like below:ClassName1 OjbectName=new ClassName1();But I find some example codes which new a class with different classClassName1 OjbectName=new ClassName2();What is the purpose to do so? ...more >>

Example (sort of)
Posted by CDX at 1/25/2005 8:40:51 PM
The good news: I tracked down this article which discusses a technique for placing objects in the Datagrid. The Bad news: The link to the source is unavailble and I need more to go on. http://www.dnzone.com/ShowDetail.asp?NewsId=227...more >>

Net Send and Messenger Service
Posted by NightHog at 1/25/2005 8:12:54 PM
Is there a way to programatically intercept a Net Send command before the Messenger Service popup appears? I need to log the sender and the message text. How does the Messenger Service works? Has anyone tried to write a program replacing Message Service? To write an application listening t...more >>

Lock tables during SELECT
Posted by Pickles The Cat at 1/25/2005 8:12:14 PM
I am doing a transfer operation from one database to another. During that time, I want to lock some tables so no new data can be written. How can I do this ? -- incognito...updated almost daily http://kentpsychedelic.blogspot.com Texeme Textcasting Technology http://texeme.com ...more >>



Image comparison, from image capture device
Posted by Paul Aspinall at 1/25/2005 7:51:13 PM
Hi I am trying to find some code, or reference docs, to assist in helping capture images from an image capture device (ie. webcam etc etc). I want to be able to compare successive images coming from the device, and be able to detect if the image has changed from the previous one. I have fo...more >>

C# / ASP.NET Question: how to use a class variable without initiate
Posted by Larry at 1/25/2005 7:37:03 PM
how to use a class variable without initiate for example: ClassA { int var1; } ClassB{ ClassA aa = new ClassA(); // omit this aa.var1 = 1; // call this variable directly } I am thinking I may try something like this: ClassA::var1 = 1; hope yo...more >>

service vs console
Posted by Luc E. Mistiaen at 1/25/2005 7:21:50 PM
I have the following line of code, using System.DirectoryServices and System.Runtime.InteropServices towards CDOEXM: ((CDOEXM.IExchangeMailbox) User.NativeObject).MoveMailbox (NewHomeMDB) ; Where User is a DirectoryEntry for a mailbox enbaled user. This line of code works perfectly when r...more >>

Substituting a string in a file
Posted by Daniele at 1/25/2005 6:56:09 PM
How is it possible to quickly substitute a string in a text file? Thanks, Daniele ...more >>

System.Windows.Forms.DataGrid
Posted by scott at 1/25/2005 6:38:10 PM
hi all, hope some one can help iv created a datagrid that points to a DataView. the data view takes in a DataTable. The DataTable then adds the columns using DataColumn. All fine so far. The table is set up and i can add stuff to it (text). however i had made it so that u can't change ...more >>

A Little Help Needed Rotating Ellipses!
Posted by MichaelH at 1/25/2005 5:39:03 PM
Hi all, I am writing a program that has to draw musical notes on a staff. To do this I need to draw Ellispses (representing the notes) on a horizontal line and rotate them slightly (by 15 degrees). So there might be say, 3 ellispses each one seperated from the next by 30 pixals along the x-...more >>

Cannot call Invoke or InvokeAsync on a control until the window handle has been created
Posted by rawCoder at 1/25/2005 5:22:31 PM
Hi I am having this InvalidOperationException with message Cannot call Invoke or InvokeAsync on a control until the window handle has been created This is raised when i try to invoke a method with arguments I need to do this as the method is being called Asynchronously from elsewhere using ...more >>

FTP server
Posted by Abhishek at 1/25/2005 4:38:24 PM
Hi! Everyone I have an FTP server application thru which i am uploading files in my parent application This is working fine. What i want to know is that is there any method thru which i can get to know the amount of data that has been transferred. e.g i have a 10 mb file that is being uploaded...more >>

Accessing the javascript on a webpage using Webrequest/Webresponse
Posted by gizmo NO[at]SPAM consultant.com at 1/25/2005 4:32:11 PM
Hi, I'm using the following code to request the html source from the quoted site. ...... string url = "http://www1.soccerstand.com/"; WebRequest webRequest = WebRequest.Create(url); WebResponse webResponse = webRequest.GetResponse(); beginStr = new StreamReader(webResponse.GetResponseStre...more >>

Threads question
Posted by Frank Rizzo at 1/25/2005 4:23:14 PM
How can I find out how many threads are running inside my application? Either in the ThreadPool or outside of it? Thanks...more >>

Copying a database to emulator at run time
Posted by Claire at 1/25/2005 3:10:20 PM
Im running a demo database application for a pocketpc device. When it runs in debug mode in the emulator I notice that it also downloads the associated database file with it. I'm using c# in Visual Studio .net 2003 How do I do the same thing please? I don't know where to look to find out wher...more >>

Error accessing sql server
Posted by Ricardo at 1/25/2005 2:52:16 PM
I'm getting the following eror when I try to connect to msde in my local machine: System.Data.SqlClient.SqlException: Login failed for user 'CORE-XP\ASPNET'. my connection string is: SqlConnection cnn = new SqlConnection(";Integrated Security=SSPI;database=varired;server=(local);"); S...more >>

Changing a Control's Font Size during runtime
Posted by Jeff N at 1/25/2005 2:27:04 PM
It it possible to change a button's or text box's font size during runtime? When I try to build my application with this code: this.ActiveControl.Font.Size = "8.25"; I get this error message: Property or indexer "System.Drawing.Font.Size' cannot be assigned to -- it is read only I can cha...more >>

Why use "finally"
Posted by Joe Thompson at 1/25/2005 2:05:02 PM
Hi, This is probably a simple question but I'm curious. What is the purpose of the "finally" statement? There must be a good reason to use it that I'm just not getting... How is this: method1 { try { x; } catch { y; } finally { z; } } dif...more >>

how to stop code in usercontrol running at design time?
Posted by Tee at 1/25/2005 1:52:56 PM
Hi, I have a usercontrol that has the onload event. When I drag the usercontrol to form (add it to a form), the code get executed and throw exception. The code run fine on runtime, any idea how can I stop the code running at the VS IDE desgin time? Thanks, Tee ...more >>

C# Object Creation General Question
Posted by Chris Fink at 1/25/2005 1:17:04 PM
I have a general question regarding this piece of code that I wrote. This works fine, however I am confused as to how I am able to pull the sb instance out at the end? When I create the XmlTextWriter class and pass it in sw (which in turn sw was created with sb) how is the sb object being ma...more >>

DoEvents is inconsistant why?
Posted by james at 1/25/2005 1:16:32 PM
In my app I load a control into a Panel, and then I fetch a large amount of data from the database. I am trying to get the Control to display immediately instead of after the Fetch completes. So I added a control.Refresh() and control.Update() but none of that seemed to do the trick. So a...more >>

data in comboBox
Posted by Hrvoje Voda at 1/25/2005 1:03:33 PM
How do I put data from dataSet into comboBox? Hrcko ...more >>

need a component for online testing
Posted by Phil Townsend at 1/25/2005 12:33:35 PM
I need to acquire a component (or application) to integrate into an online testing application. The component should be able to draw its content from SQL Server. Questions will be multiple choice and should have support for exclusive choices (radio buttons) or multiple choices (check boxes). It ...more >>

Why can't my whole .net project see this string?
Posted by trint at 1/25/2005 12:17:37 PM
using System; namespace WindowsApplication1 { /// <summary> /// Summary description for Class1. /// </summary> /// public class Class1 { This string>>>>public string inVoiceNumber; public Class1() { } } } thanks, Trint ...more >>

Private Keyword
Posted by WillNap at 1/25/2005 12:15:03 PM
It seems odd that a private instance member can be accessed by any other instance of its defining class. For example: class A { private int x = 1; public void func (A a) { Console.Out.WriteLine ( "private member = {0}", a.x); } } Rather than limit 'private' to an instance, C# ...more >>

New Line Constant Error!
Posted by Chakkaradeep at 1/25/2005 11:59:09 AM
Hi all, i have a string, str_old="E:\a\b\c.exe", and i want to change to str_new="E:\\a\\b\\c.exe". so now i use IndexOf() function to find the position of '\' , but it is throwing error that a new line constant is present. (i.e); int n=str_old.IndexOf('\'); //error here..new li...more >>

Possible Text Encoding Question
Posted by Mezzrow at 1/25/2005 11:15:41 AM
Hey all. I've seen something that confuses me a bit, and was wondering if someone could shed some light on the issue. I have an XML file as an embedded resource in a C# Windows Forms application. The File is taken directly from a file on the desktop. I load it into a stream... ...more >>

Are collections ordered and other questions
Posted by Rachel Suddeth at 1/25/2005 11:13:26 AM
Every time I read about these things my brain gets muddled and I can't keep them straight. I'm going to give my guesses, could someone confirm or deny? I think a collection doesn't have to be ordered. But you do have to be able to use foreach(), and it will hit every object in the collection ...more >>

OutOfMemory Exception
Posted by Diablo at 1/25/2005 10:55:51 AM
Hi, I'm working on medium size project in C#. The project involves working with an Access database through the Jet engine. I have almost completed the project and now i am doing some testing. I've noticed that when starting the application its memory load its rather small (around 30MB). Afte...more >>

Cookies
Posted by Diego at 1/25/2005 10:43:03 AM
hi my question is if i have a way to change the value of a cookie that i have created in the server with javascript in the client. ...more >>

C sharp # -- AxWebBroswer -- hangs, please help
Posted by gpost at 1/25/2005 10:32:05 AM
Hello, I am building a win form TAPI application using C# The application loads a call control in a web form panel and also an AxWebBroswer control which loads a web page. Here is the bug: When I load the project, make an INCOMING call, and attempt to answer it, the entire applicat...more >>

API calls in the C#
Posted by Bronislav at 1/25/2005 10:31:03 AM
I'm new to C# and have probably dump question - HOW I can use Windows API calls in the C# environment? Particually I need to read and write an .ini file. Thaks....more >>

C struct in C#
Posted by Bob Costello at 1/25/2005 10:17:04 AM
last post sent prematurely. This didn't work. Compile error says I can't have instance field initializers in structs [StructLayout(LayoutKind.Sequential)] public struct cdVersionInfo { public int Size; public char[] = new char[32]; } Thanks in advance....more >>

C structs in C#
Posted by Bob Costello at 1/25/2005 10:13:02 AM
I want to access a dll and one of the arguments is the following C struct: typedef struct { int Size; char chVersion[32]; /* version number. */ } cdVersionInfo; The chVersion parameter is returned by the dll function. How would I represent this struct in C#? I tried the following but ...more >>

Don't start new instance of program when already running
Posted by Trygve Lorentzen at 1/25/2005 10:01:05 AM
Hi, how can I make my exe file open the already running instance of the program instead of starting up a new instance? I'm developing in C# with VS 2003 and ..NET 1.1 Regards, Trygve Lorentzen ...more >>

Turning off XML documentation warnings for a file
Posted by Edward Diener at 1/25/2005 9:43:53 AM
If I set an Xml documentation file in Configuration Properties | Build, a warning is put out for every non-private element in a public class in every file of my assembly when there is no Xml documentation for the element. Is there any way to turn off this warning on a file basis ? Occasionally...more >>

*IMPORTANT* Message for Google Group, Usenet and AOL users!
Posted by google_groups_001 NO[at]SPAM yahoo.com at 1/25/2005 9:22:03 AM
Good News! Do you know how simple it is to go to Heaven after this life has ended? Some people believe that belonging to a local church, temple, mosque or synagogue will get them to Heaven. Others believe that water baptism, obeying the ten commandments or just being a good person w...more >>

Program 1 opens, triggers an event in program 2
Posted by Patrick B at 1/25/2005 8:57:54 AM
When application #1 opens, I would like it to trigger an event in application #2. How do you send a message from one window to another? How can application #1 look to see if application #2 is open, and if it is, notify application #2 that it has started? I know that using the win32 api t...more >>

Removing row pointed to by bound combo
Posted by Paul Aspinall at 1/25/2005 8:42:30 AM
Hi I have a combo which is bound to a datatable. I want to remove the record from the datatable, which the combo points to. Can anyone confirm the correct syntax.... I believe it will be something like datatable.Rows.Remove(.......??how do I find the row that is bound to the combo??); ...more >>

ASP to ASP.NET migration
Posted by Newbie at 1/25/2005 8:19:04 AM
I need to upgrade asp files written in VBScript into C# ASP.NET. I found a tool from microsoft called ASP Migration Assistant but it only converted the asp files into VB.Net ASP.NET files. Is there a tool that will convert to C# ASP.NET? Any suggestions?...more >>

2147483647 + 2147483647 = -2?
Posted by Jack Wasserstein at 1/25/2005 7:57:01 AM
how come when i add two Int32 vars in a try catch statement with the value of 2147483647 it results in -2 instead of an exception?...more >>

ASP DataGrid with C# code-behind question
Posted by Tom S at 1/25/2005 7:23:04 AM
Whenever I put a DataGrid onto an ASP page that has C# code-behind, the code-behind method for DataGrid_SelectionChanged() doesn't fire off unless I've double clicked the DataGrid in design view and had Visual Studio send me to the code. It's as if it doesn't realize that I've coded the metho...more >>

Binding textbox to a fixed dataset row?
Posted by bardo at 1/25/2005 6:55:01 AM
Does anyone knwo how I can bind a textbox to a single dataset/dataTable row? The following will give me only a Column: textBox1.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.myDataTable, "TableNaam")) But in my program I need a textbox (that I can edit) directly bound t...more >>

Disadvantages of Polymorphism, Inheritance and Encapsulation
Posted by enchantingdb at 1/25/2005 6:36:35 AM
I have an exam tomorrow that covers the perceived advantages and disadvantages of object oriented programming, in particular polymorphism, inheritance and encapsulation. I know the advantages but am not clear on the disadvantages. I have had a look on the Web and in newsgroups but couldn't find ...more >>

String.ASC and (int)
Posted by skeamy NO[at]SPAM hotmail.com at 1/25/2005 6:16:39 AM
Hi everybody, Im currently converting an application from VB6 to C# which contains logic to convert EBCDIC to ASCII and vice versa. I have a test app which reads some previously stored EBCDIC from a text file and converts it. I have finally got it all working (Encoding.DEFAULT was the turning p...more >>

MSMQ workgroup and C#
Posted by MSMQ workgroup and C# at 1/25/2005 5:57:06 AM
My MSMQ is in workgroup installation. I tried to add an event handler for the ReceiveCompleted event and to do It I try to use the SetPermissions. but I get an error of “A workgroup installation computer dose not support the operation” The code is: MessageQueue myQueue = new Messag...more >>

Post back events...
Posted by Josema at 1/25/2005 5:47:01 AM
Hi, I have a small application that adds into a database, users. I have a textbox and a button, and when a user enters a name and click into the button i add into the database the username... For other hand i have in the same aspx page a list box. (i would like to use it to put each us...more >>

RegistryKey.GetValue not returning the value for REG_QWORD type
Posted by Abhijit at 1/25/2005 5:13:03 AM
Hi, I am facing problem in retriving value of a registry key where the value is of type REG_QWORD. Below is the code snipet i am trying with: RegistryKey reg = Registry.CurrentUser; regKeyTools = reg.OpenSubKey(@"MynewKey\qword"); object val = regKeyTools.GetValue("qvalue"...more >>

Timing Code line by line
Posted by Nicholas Mayne at 1/25/2005 4:45:01 AM
Hi all, i was wondering if its possible to 'time' every single line of code then output the the results as in a profiler i.e. Time Line of code 22ms If... etc; 32ms i++; ..... .... i know you can time a loop or whatever through the Start -> do loop -> stop proceedure i.e ...more >>

events handeling
Posted by jima80 NO[at]SPAM gmail.com at 1/25/2005 4:14:14 AM
Hello! I would like to know how exactly I should build event,handler to it and to deal with event occurence? (classes,function ,etc..) Thank you very much for your help....more >>


DevelopmentNow Blog