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# > november 2003 > threads for tuesday november 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

More basic questions
Posted by p988 at 11/25/2003 10:22:35 PM
Learning C# is much tougher than I expected...Please help me by answering the following questions! Thank you in advance! 1. Are all Enumerations type Value type? 2. The line, RegistryKey Reg = new RegistryKey(); gives the error: "No overload for method 'RegistryKey' takes '0' argumen...more >>


how to simulate key being pressed
Posted by Mike at 11/25/2003 9:45:58 PM
I have a form with a textbox and a button. If I press the button, I want to type the letter q into the textbox. What would I put into the event handler of the button in order to simulate the q key being pressed? Thank you for your reply. Mike...more >>

Monitor my Printers
Posted by Kevin at 11/25/2003 9:23:17 PM
Hi All, I am fairly new to C#, but I do have Programming experience in VB, and the best way to learn C# is by doing, so I want to create an application that can monitor printers connected to my PC, via USB,LPT and possibly COM ports. What I want to do is be able to run my app and after ...more >>

Multiple listeners on a TCP/IP port?
Posted by Paul A. Steckler at 11/25/2003 8:31:37 PM
I need to write a TCP/IP server in C# that can handle multiple connections. My first try was to use TCPListener instances in multiple .NET threads. Of course, I got an exception from System.Net.Sockets about multiple sockets on the same port. This happens even with a single listener in multiple...more >>

Embedding a file into a project...
Posted by Andrew Connell at 11/25/2003 7:06:19 PM
I have the need for a few XSLT files that I'd like to embed within my = DLL. I don't want to be forced to have to deploy each of these XSLT = files as well as my DLL... because if one file was missing, it could = cause major problems. How would I go about adding an XSLT file to an assembly an...more >>

"Cannot run program" error with Web, Web Services apps.
Posted by Chris at 11/25/2003 6:33:02 PM
I built small C# Web and Web Service applications in a training class last week. The applications worked in the class, but when I tried to run them again over the weekend, they both bombed. Instead of getting my Web page, or the Web Service page, I get a page full of error text (below). ...more >>

Object reference not set to an instance problem
Posted by Abdessamad Belangour at 11/25/2003 6:04:45 PM
Hi, I have a method to sort an array. The sort method header is : private void sort(ref string[] t) { string c; if (t.Length>0) {.....} } I call it as follow : sort(ref myArray); Is there any error in that? thanks. ...more >>

Array Equality
Posted by Tony Nassar at 11/25/2003 5:54:21 PM
Hello, all! There's no documentation of an overriden Equals() method for arrays, and there does not seem to be one in fact, since any of these assertions will crash: int[] x = { 0, 1 }; int[] y = { 0, 1 }; // System.Diagnostics.Debug.Assert(x == y, "Arrays equal?"); // System.Diagnostics....more >>



Reading MS Access Tables
Posted by princeh8 NO[at]SPAM cox.net at 11/25/2003 5:45:21 PM
I can connect to SQL Server and read any table data but can't do so with MS Access 2000 (9.0.2720) Here is a sample code. on the webForm.aspx page I have the following web server control: <asp:dropdownlist id="roomList" runat="server"> </asp:dropdownlist> In the webForm.aspx.cs file...more >>

how can i create an Image Object with a string or barcode
Posted by Mullin Yu at 11/25/2003 4:52:22 PM
now, i want to create a Image object, which is a white rectangle with a specific size of area, and a black string or barcode will be on it. any api or sample code or ideas? thanks! ...more >>

Calling Win32 DLL -Data Missing
Posted by Badrinath Mohan at 11/25/2003 4:35:45 PM
Hi Guys I am calling a simple win32 dll from a C# application. Say the function is GetLastErrorString(BSTR *pstr) the C#client calls it as [DllImport("..\\..\\..\\ClientDll\\Debug\\ClientDll.dll",EntryPoint="?GetLas tErrorString@@YAHPAPAG@Z")] static extern int GetLastErrorString(ref strin...more >>

Monitor MEM usage programmatically
Posted by John Spiegel at 11/25/2003 4:35:34 PM
Hi All, How (if possible) can you monitor the amount of system memory used, e.g., that displayed as MEM Usage under the Task Manager? I've got an app (non ..NET) that tends to leak memory and I'd like to keep an eye on it--maybe through a C# dll??? TIA, John ...more >>

free place in RAM
Posted by Yossef at 11/25/2003 3:40:24 PM
I'm looking for a way to get information about a size of a free RAM (how much free place i have in RAM) by using visual c function...more >>

Split on multiple chars
Posted by MDB at 11/25/2003 3:11:07 PM
Hello all, I have having problems figuring out how to split on a string rather than a char. Any help would be appreciated. Here is what I am trying to do. string[] strMessages=sData.Split("\r\n"); I basically want to split on a new line. ...more >>

DirectorySearcher Pagination
Posted by Jason S at 11/25/2003 2:21:09 PM
Group, I'm hoping someone can shed some light on active directory search pagination for me. For the DirectorySearcher class there are several methods for paging (.PageSize, .ServerPageTimeLimit) but there are no examples or explanation. How do I implement pagination with these properties? I...more >>

Edit and continue
Posted by discussion NO[at]SPAM discussion.microsoft.com at 11/25/2003 2:19:52 PM
Hi, Will Vsnet IDE and C# ever get "Edit and continue" in the debugger? Thanks ...more >>

Microsoft.Data.OleDb & windows 2000 server
Posted by Simon Parker at 11/25/2003 2:07:18 PM
Hello, I was wondering if anyone here could assist me. I've developed a small app in C# which connects to an Access 2000 Database and converts it to mySQL which will go open source when I've finished error testing. I've successfully deployed this application on a number of Windows XP and ...more >>

Q about conditional
Posted by AP at 11/25/2003 2:03:47 PM
Why do I get a conversion error with this line of code? (Type of conditional expression can't be determined because there is no implicit conversion between 'int' and 'System.DBNull') object o = (1+2 ==3) ? 3 : DBNull.Value; when object o; if (1+2==3) { o = 3; else { o = ...more >>

protection error
Posted by Rustam Asgarov at 11/25/2003 1:43:34 PM
I have a structure like this : public struct index_struct { static char [] IP = new char [16] ; int port; static char [] FileN = new char [50]; int ID; int Bnum; long m_DataSize; int Version; } then i have an array of this struct: public index_struct [] ind...more >>

can I create a batch file & run it on user's PC?
Posted by Jason Shohet at 11/25/2003 12:59:41 PM
A user runs a .NET application that authenticates them against active directory (they're coming in over VPN so they don't log on to the network normally). Once they log in, I want to take their user id, & run a batch file on their PC with that user id actually inside the batch file. (The obje...more >>

Debug-Assembly in other Language
Posted by Jazper at 11/25/2003 12:54:40 PM
hi got a foolish question. - when i add to my csharp-application a debug-compiled-assembly also written in csharp, i can step into it when debugging my app. - when i add my debug-compiled-assembly written in csharp to a vb.net-application, i can't step into the assembly, albeit i have also ...more >>

dynamic load of DLL
Posted by Alex S. at 11/25/2003 12:52:15 PM
Hi, It's possible to load dynamically a Dll and later to unload it ? Thanks Alex ...more >>

access DV cam (firewire)
Posted by Dirk Reske at 11/25/2003 12:37:24 PM
Hello, is there a way to access my DV cam using firewire? Is there something in DirectX? I want to read and write to the cam. Or do I have to use other ways?which? thx *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it!...more >>

Spawning a new (input) form
Posted by Rein Petersen at 11/25/2003 12:03:28 PM
Hi All, I'm just playing around with Windows Forms (haven't had too much use for them otherwise) and I'm just trying to make sense of how an event in one form (like a user-click) can spawn a new window (form). I haven't encountered any examples so far and hoped someone might post a URL or two....more >>

Management console for Active Directory in .Net C#
Posted by Florent at 11/25/2003 11:58:49 AM
Hi all, We announce you the release of Power AD 1.3 , an OpenSource management console for Active Directory. What's new : -you can now see the users logged in your domain through the "Computer" builtin OU -"Status" option in the users properties, allowing you to see the last connection da...more >>

Exceptions in C#
Posted by Ohad Young at 11/25/2003 11:48:13 AM
Hi, In Java each method contains an optional throws statement with a list of exceptions thrown by the method. Is there something similar that can be done in C#? Ohad -- Ohad Young Medical Informatics Research Center Ben Gurion University Information System Eng Office Phone: 972...more >>

serialization and circular references
Posted by Eric Eggermann at 11/25/2003 11:45:40 AM
I'm having a problem with really large file sizes when serializing the classes that describe my little document. There are some circular references which result in the same object getting written to disk multiple times. Now I'm using just basic serialization as described in MSDN. Clearly, I need ...more >>

Paint onClick
Posted by Tamir Khason at 11/25/2003 11:33:44 AM
How I can paint something onClick event? I need PaintEventArgs event in order to paint and raise Graphics, but onClick I have only EventArgs Event... Thanx ...more >>

Bug In System.TimeSpan Object?
Posted by dnlwhite NO[at]SPAM dtgnet.com at 11/25/2003 11:19:27 AM
Is it possible there is a bug with the System.TimeSpan object in .NET? I am using it to track times and am seeing an unusual situation. From what I understand, there are 1000 milliseconds in a second. I have a test I ran using the TimeSpan object which when I use TimeSpan.Milliseconds I got ...more >>

Decrypt Files with certificate
Posted by Jens Süßmeyer at 11/25/2003 11:18:42 AM
Hello, we want to build a solution to receive mails with encrypted content (XML-Files,etc). A Service will collect these mail from one Inbox, will decrypt the attachment and store them in a SQL Server Database. But the point is, that i didn´t find anything about the decryption of files with...more >>

DateTimePicker Date Format Weirdness
Posted by Ed Crowley at 11/25/2003 11:16:08 AM
I have a DateTimePicker control on my form that is displaying the date format in UK format (dd/mm/yy). However, in my code dtpStartDate.Value gives a date in US format, but dtpStartDate.Value.ToString() gives the date in the required UK format! Any ideas? All system locale settings are set ...more >>

Double Processing within C# asmx
Posted by Stevenson at 11/25/2003 10:57:42 AM
Hello. If have written a webservice within C# that is called from an aspx and processes incoming data correctly. The problem is that the ASMX runs twice before returning. I have debugged the application and can see the ASMX duplicate the processing effort. In debug I can see it hit the ...more >>

File Versions
Posted by Dennis C. Drumm at 11/25/2003 10:41:42 AM
I have a strong named Windows Form application that save and opens files using a BinaryFormatter. The formatter is set to FormatterAssemblyStyle.Simple and I use the IFormatter interface to serialize and deserialize the stream. The problem comes when I need to change the structure of the objec...more >>

SQL instance Listing in ComboBox
Posted by John Barr at 11/25/2003 10:41:07 AM
Does anyone know how to search for Instances of SQL Server running on your network through code to populate a drop down like is done in the SQL Server Query Analyzer, and then once an instance is selected, list the databases on that Instance?...more >>

Some kind of pipes in .NET?
Posted by EdgarBM at 11/25/2003 10:27:59 AM
Hi, does anyone know any kind of class from the .NET framework which works like unix pipes? Thank you in advance, Edgar...more >>

HTTP request in C#
Posted by Benoît_Touron at 11/25/2003 10:16:59 AM
Hi ! I am a newbie in C#. I am developping a web service in C#. I need to perform an HTTP request to another server, get the result, analyze it and return it to my client. How can I do this ? I did not find any sample in the MSDN, nor on the net. Thanks Ben ...more >>

Fetch data from Oracle database to data grid
Posted by Hai Ly Hoang [MT00KSTN] at 11/25/2003 10:06:24 AM
I'm using Oracle 9i I drag OleDbDataAdapter from toolbox to create 'adapter' object. Click Generate Data Set on Property to create DataSet 'dataSet'. Drag DataGrid from toolbox to create dataGrid object. Set dataGrid.DataSource = dataSet. When I have my application run, the dataGrid show no row...more >>

Configuration Management Application Block woes
Posted by gilmorehatesspam NO[at]SPAM cob.osu.edu at 11/25/2003 9:54:43 AM
Hi, I'm trying to integrate Microsoft's Configuration Management Application Block (CMAB), and have run into a bit of trouble. Would appreciate any input anybody could provide at this point. I simply keep running into exceptions when trying to integrate the block into my app. Here's what I've...more >>

MDI vs Tabbed
Posted by Darryn Ross at 11/25/2003 9:13:02 AM
Hi... I was just wondering if there is any advantage to creating a MDI project = over the default project type in VS.NET 2003 ? Regards Darryn...more >>

Binding events to dynamic controls
Posted by Jeremy Ames at 11/25/2003 8:59:32 AM
I am trying to bind a click event to a check box control that I create during page load. I have tried using the this.controlname += new System.EventHandler (this.controlname_Click); but it tells me that my form does not contain a definition for that control. I create this control for infoma...more >>

Databound Enum?
Posted by Ernie.Taylor NO[at]SPAM uhn.on.ca at 11/25/2003 8:28:30 AM
I have enums in a .cs class that have Ids which I manually match to correspond with PKs (primary keys) that exist in an "Admin" database table. Right now I just make sure the enum Ids match the corresponding PKs. Is there a way to bind an enum to a dataset so that on application load the enums a...more >>

Screen Print to a Printer HELP.........
Posted by Chris Calhoun at 11/25/2003 7:38:48 AM
Does anyone know how to with an event like on_buttonclick send a screen shot of the active window to the printer. Explanation and\or code samples would be helpful. Thanks in advance!!! ...more >>

EngineExecutionException
Posted by n_o_s_p_a__m NO[at]SPAM mail.com at 11/25/2003 7:19:20 AM
This exception is not even listed in MSDN, and my program threw it. Anyone have any clues as to why? The program is a multithreaded background process (Windows Application) that runs constantly. It makes heavy use of ADO and has a GUI window which is updated as the process does its work. ...more >>

How do I center an application on the desktop when starting?
Posted by Bill Gates at 11/25/2003 7:10:33 AM
On opening, I would like my application to be centered on the desktop rather than set randomly. Can someone tell me what I need to do to accomplish this? ...more >>

Window with progress bar.
Posted by cmombo71 NO[at]SPAM hotmail.com at 11/25/2003 7:05:55 AM
I have an application that can take several seconds to launch. What I would like to do, is have a window or something with a progress bar appear to the user while the app is loading, so that the user knows something is still happening. Once the app is loaded I would like the pop up to close. ...more >>

TripleDes Data error.
Posted by james_crane NO[at]SPAM btinternet.com at 11/25/2003 6:48:03 AM
Hi, I have created 2 methods, one the encrypts a string using tripledes and one that decrypts that string. THis works fine if i pass the string directly to the decypt function. However, when I then save the encrypted result in a varbinary field (128 length) in SQL, then pull it back into the ...more >>

Getting Network User Name
Posted by Dave Bailey at 11/25/2003 6:45:35 AM
I am trying to obtain the Windows logon user name from my local machine for use in a web app. I have added <identity impersonate="true" /> to the Web.Config file. This returns the IUSR user name. I am using the following code to obtain the user name: return System.Environment.UserName; ...more >>

Validators with dynamic form controls
Posted by Jeremy Ames at 11/25/2003 6:44:44 AM
I am trying to create required field validators for controls that I create dynamically. I am pulling information from a database and building controls based on that information and creating the IDs for the controls using a simple counter to reference them with the required field validators...more >>

DataBase file may be corrupt and unusable (pdb, i assume)
Posted by Jax at 11/25/2003 4:19:34 AM
Is that it? Can I do nothing more, it will not allow me to compile or see the designer fo some of my forms due to this metadata error. Am i totally screwed? Is there anything I can do to fix this, problem it just wont compile, if I transfer all the code to another project my objects wont d...more >>

C# and DLLs
Posted by DBfromMN at 11/25/2003 4:14:54 AM
I'm trying to call unmanaged functions in a DLL from a C# client program. I've been over an over the tutorials and samples, but still I'm missing something. When one of these functions is called from the client program, an unhandled exception is thrown stating that there is no entry point ...more >>

How to get c# object pointer?
Posted by violin at 11/25/2003 3:51:15 AM
I want to use c lib to store c# object address, like this: In c lib, I wrote a structure, and two method operate on it. typedef struct { void *csharp_obj; }c_struct; void set_c_charp_obj(c_struct *cstr, void *csharpObj) { cstr->csharp_obj = csharpObj; } void *get_c_charp_obj...more >>

advancing with the asp:datagrid
Posted by timasmith NO[at]SPAM hotmail.com at 11/25/2003 3:44:02 AM
In my .cs code I populate set the DataSource appropriately and I can get my DataGrid to appear, though sorting throws an error 'dgDataGrid1__ctl1__ctl0' of type 'DataGridLinkButton' must be placed inside a form tag But ignoring that, with my asp:DataGrid how can I have a column of values each...more >>

C# and casting
Posted by SS at 11/25/2003 3:41:20 AM
I have a strig which represents an object. I have 3 Browser objects on my form and each one has a unique name in the form I want to say: String CurrentBrowser CurrentBrowser.Navigate(.....) how can I convert CurrentBrowser (String) into a WebBrowser Object (in C#) Thx SQ ...more >>

Windows Shortcut key
Posted by jonny at 11/25/2003 2:39:46 AM
Does the Windows Short cut key use an Ascii value?? If so which one? If not how can I capture when the key is used?? Thanks, Jonny...more >>

How can I just draw a 1x1 pixel in widow app with C#?
Posted by ClearWater at 11/25/2003 2:15:15 AM
Please explain in detail include needed code....more >>

System.Activator.CreateInstance
Posted by Guy at 11/25/2003 1:32:53 AM
im running some code to instantiate a form, based on the name selected at runtime. Im using System.Activator.CreateInstance to load a form by its fully typed name, here is the code.... string fName = "frmToLoad"; Form myForm; myForm = (Form)System.Activator.CreateInstance (Type.GetTyp...more >>

Focus Issue with RadioButton
Posted by Buddy at 11/25/2003 12:02:02 AM
Hello, When ever I call the Focus method of the radio button the Click event of the Radio button gets called, how can I either stop this happening or check in the Click event if the code that triggered this event was a Focus method call. Please help, ...more >>


DevelopmentNow Blog