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# > april 2005 > threads for wednesday april 20

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

question about a C# book
Posted by John Salerno at 4/20/2005 11:02:28 PM
I'm interested in Programming Windows with C# (Core Reference) by Charles Petzold, but do you think that the new version of C# (along with .NET 2.0) will make this book obsolete in any way?...more >>


Faster Webservices?!?
Posted by GeRmIc at 4/20/2005 10:27:02 PM
Hi, I was just wondering if anyone has used either XMill or implemented the Fast Infoset Project specification and have been succesful in reducing the amount of information passed to-fro webservices? Am just trying to do something to the huge xml file transfered between my Java webservice ...more >>

Curious...
Posted by Yosh at 4/20/2005 9:17:20 PM
Does anyone know of a standard Help...About form that one can use in their application? Thanks, Yosh ...more >>

Http post request
Posted by sushi at 4/20/2005 8:59:02 PM
Hello, I have an application which generates reports at some instance of time. I want to post those reports to be posted to a URI which is of following format http://host:port/remainder-of-URL Can I use WEbClient class's UploadData method. What kind of server/applciation wi...more >>

Server.MapPath problems.
Posted by Daniel Groh at 4/20/2005 8:03:30 PM
Hi, I'm trying to use the Server.MapPath in my ClassLibrary application, = but I didn'get it...I tryed already the System.Web.HttpServerUtility... OpenConn(); DataSet dsErrorSQL =3D new DataSet(); HttpServerUtility myPath =3D new HttpServerUtility(); dsErrorSQL.ReadXml(myPath.MapPath("XMLErro...more >>

Drag and Dropping subclassed controls
Posted by Greg at 4/20/2005 7:56:01 PM
I have a custom control called PageBanner which is compiled into a DLL and then put into the toolbox. It shows like I would expect it to in the toolbox, and I can drag and drop it onto a form. However, instead of getting the control on the form, I get nothing. No error message, no control. ...more >>

Tab Questions
Posted by mat at 4/20/2005 6:19:32 PM
Hi all, If I have a main form with a TabControl and this method: protected void NewTab() { TabPage newTab; newTab = new TabPage(); newTab.BackColor = System.Drawing.SystemColors.Window; newTab.Size = new System.Drawing.Size(498, 400); RichTextBox ri...more >>

SqlCommand send '' instead of ' to stored procedure
Posted by Bill Struve at 4/20/2005 6:03:42 PM
You may want to do this, since the first single quote is missing in your e-mail: string sqlCounty = "'"; For (int i=0, i<cblCounties.Items.Count) { sqlCounty += cblCounties.Items[i].Value.Trim() + "', '"; } sqlCounty = sqlCounty.Substring(0,sqlCounty.Length - 3); I don't know ...more >>



Means to use current user's credentials to autoLogon to Remote Desktop
Posted by Bill Struve at 4/20/2005 5:03:38 PM
Need: Auto-logon to a terminal server, start a program, and, when the user is quits the program, auto-logoff. Done so far: Able to use a fixed username/password in a C# program using AxMSTSCLib and MSTSCLib. Everything in the Need, above, works just great. Problem: All users would be logge...more >>

File lock problem
Posted by Grant at 4/20/2005 4:54:25 PM
Occasionally when I try and save a document: ----------------------- xmlDoc.Save(Application.StartupPath + @"\Config.xml"); ----------------------- I get this error saying that the file could not be accessed because its locked by another process or something (I cant get it to do it now - b...more >>

Own implementation of GetHashCode()
Posted by Matthias Kientz at 4/20/2005 4:39:53 PM
I have a class which should override the GetHashcode() function, which look like this: public class A { public string str1; public string str2; //other methods... public override int GetHashCode() { return ???; } } The instance members str1 and str...more >>

Keypress event in Webforms?
Posted by Raul M. Colon at 4/20/2005 4:10:01 PM
Is possible to assign a click event to a button control in a Web form just pressing the return key? Something like windows forms where you can assign this action to a default control. For example, if I press Return, I want to fire the button_click event even when the button is not in focus. ...more >>

ushort math
Posted by ttan at 4/20/2005 3:47:01 PM
how do I do this, what is the easy way to check the version for the prime number 401? Any help are appreciated. I get this error " Operator '>' cannot be applied to operands of type 'ushort[]" and 'int' ..." VERSION version = ((VERSION)Marshal.PtrToStructure(buffptr,typeof(VERSION))); if (...more >>

Implications of circular references.
Posted by Frank Rizzo at 4/20/2005 3:16:34 PM
I have a circular reference between 2 classes in the same project (i.e. each class refers to the other). The app runs fine and I am seeing no issues, which kind of surprised me. Are there any issues that I am not seeing (performance wise or garbage collection wise) with circular references...more >>

MouseHover
Posted by Phenix Smith at 4/20/2005 3:06:39 PM
I am working on the component and would like to change a display when the user stops moving the mouse inside the control. I used the MouseHover and MouseMove to change the status, but the MouseHover does not fire again unless the mouse is moved outside the control. Is there a something I am mi...more >>

Reading numbers from text file
Posted by Millennium Falcon at 4/20/2005 3:03:02 PM
Hi! Help is kindly requested in reading floating point numbers from a text file. File is organized like this : 2000 // number of data -1.00000 -2.000000 -0.008944 // x, y & z-coordinates to the end of file ... ... ... ... I am also including the code snippet in case it may help to fin...more >>

Framework 2.0 SerialPort
Posted by Brad at 4/20/2005 2:43:05 PM
I just downloaded the 2.0 Framework C# express with SerialPort and have problem running some sample code. Compile errors: missing assemblies or name space on the following events, methods SerialDataReceivedEventArgs DataReceived The same error with the following: System.Diagnostics.Co...more >>

Creating ISO ( image) files
Posted by prabhumuthaiah at 4/20/2005 2:22:25 PM
Hi All, How can I create ISO (Image) files for CD or DVD in C#?. An document or ideas will help -- prabhumuthaia ----------------------------------------------------------------------- prabhumuthaiah's Profile: http://www.msusenet.com/member.php?userid=62 View this thread: http://www.msu...more >>

resource not found error
Posted by Trevor at 4/20/2005 2:17:27 PM
I've got a bitmap file I want to use as a resource for an application. I went to the project, added and existing item (the bitmap), and then set it to embedded resource. When I run the app, I get the error: An unhandled exception of type 'System.ArgumentException' occurred in system.drawi...more >>

No parameterless constructor defined for this object
Posted by brian c at 4/20/2005 2:08:04 PM
************************************** //Load the Assembly Assembly a = Assembly.LoadFrom(sAssembly); //Get Types so we can Identify the Interface. Type[] mytypes = a.GetTypes(); BindingFlags flags = (BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Static | BindingFlags...more >>

System.Reflection Activator.CreateInstance
Posted by System.Reflection Activator at 4/20/2005 2:06:01 PM
************************************** //Load the Assembly Assembly a = Assembly.LoadFrom(sAssembly); //Get Types so we can Identify the Interface. Type[] mytypes = a.GetTypes(); BindingFlags flags = (BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Static | BindingFlags...more >>

Justify text in label
Posted by ReidarT at 4/20/2005 1:58:42 PM
Simple question How do I right justify ( right-align) text in a label on a web-form? regards reidarT ...more >>

Justify label
Posted by ReidarT at 4/20/2005 1:54:52 PM
Simple question. How do I justify (right-align) text a label in a web-form? regards reidarT ...more >>

Waiting for a web page to load on shutdown
Posted by mikelostcause at 4/20/2005 1:48:05 PM
I'm new to c# and am currently developing a small login/logout app that runs in the system tray. I am trying to get it to access a website during system shutdown, but it doesn't seem to want to. //catch message from windows on shutdown protected override void WndProc(ref Message m) ...more >>

Command Line Compiler, CS0116: A namespace does not directly contain members such as fields or methods
Posted by Genboy at 4/20/2005 12:54:15 PM
My "VIS" Website, which is a C# site created in VS.NET, Framework 1.1, is no longer compiling for me via the command line. As I have done 600 times in the last year and a half, I can compile to VIS.DLL via Visual Studio, with no problems: ------ Rebuild All started: Project: VIS, Configurat...more >>

Why is StringBuilder changing pipes to "o" umlaut when loading a pipe-delimited string?
Posted by Ray Stevens at 4/20/2005 12:52:25 PM
I am loading a pipe-delimited string from a DataSet into StringBuilder, such as 00P|23423||98723 (etc.). For some reason the pipe character is displaying in the debugger as "o" with two small dots on top (i.e., with an umlaut). Is StringBuilder modifying my pipe character and, if so, how do I sto...more >>

explicit interface implementation does not work with events
Posted by cody at 4/20/2005 12:50:50 PM
it seems to me that explicit interface implementation does not work with events: class Foo : IContentchangeableControl { event EventHandler MyNs.IContentchangeableControl.ContentChanged; } yields to CS0071 and CS1519. ...more >>

Get languages and culture to website?
Posted by trint at 4/20/2005 12:21:02 PM
what is the best way to make a .net (english) website viewable in other languages, cultures? Thanks, Trint ...more >>

GDI+ Drawing in C# application
Posted by espep NO[at]SPAM tiscali.no at 4/20/2005 12:19:15 PM
Hi I have a C# application that should display a chart, the chart drawing is done by a COM object. I have tried to use dllimport with gdi32.dll and created compatibleDC and compatibleBitmap with the hdc from the graphics object. The COM object is trying to draw on the compatibleDC and I try t...more >>

tricky TimeSpan editing
Posted by DKode at 4/20/2005 11:22:07 AM
I have a "Timesheet" application I am building for my company. The way I have the sql tables setup, is each day has a unique record for a specific user, then there is a TimeEntry table, that has multiple TimeEntries for one day. The TimeEntries for a specific day are like so: 7:00AM - 11:...more >>

convert WCHAR in byte[] to string
Posted by centrino at 4/20/2005 10:53:03 AM
hi, I import a funtion fromm dll file: dll function header : DWORD WINAPI Enumerate( HANDLE hWDMHandle, PNDIS_STATUS pNStatus, PWCHAR pBuffer, PUINT pBufferSize ) in C# should be: [DllImport("MyAPIdll", SetLastError=true)] private static extern unsafe ulong Enumerate ( IntPt...more >>

Suggestions for further reading...
Posted by See_Rock_City at 4/20/2005 10:51:25 AM
Hello All, I need some material for the reading room. Specifically, I'm interested in gaining a well-rounded education in regards to OOP and all its associations. I've gobbled up as much as I can about C# and the tactical aspects of the language and can hack together a respectable attem...more >>

how can i tell if a class is instantiated.
Posted by mcruz at 4/20/2005 10:45:01 AM
I am new to C# (from C++). I do: foo = new Client(this); later on I want to check if I actually have done this "new". I use to do: if (foo == NULL) //not instantiated so new it... what do i do in C#? thanks -- Maria Cruz MTC Technologies.com...more >>

Fixed length buffers
Posted by Paul at 4/20/2005 10:35:23 AM
I'm doing some Pinvoke stuff. How do I deal with functions that pass/receive structures that have fixed length char buffers? I see this: public struct MyArray // This code must appear in an unsafe block { public fixed char pathName[128]; } in the docs, but this is upposed to be for...more >>

Referring to controls via loops - comments and suggestions
Posted by Steve Le Monnier at 4/20/2005 10:17:36 AM
If you have a number of controls be they TextBoxes, Combo Boxes or Labels; is there a way to refer to the controls in a loop via their name, given the fact that the names are the same with the exception of a number at the end e.g. Label1 Label2 Label3 I know that you can use the cont...more >>

TabStop Order Confusion
Posted by Bob Cummings at 4/20/2005 9:38:14 AM
Greetings I have a simple form from which I would like the user to make one of two choices, depending on what I am displaying in a text box. I want the use to have to make a choice so I have put the two choices in a groupbox as radio buttons. The problem is they can tab from radiobutton...more >>

C header conversion. Please help !
Posted by MidSilence at 4/20/2005 8:18:29 AM
Hi all, I'm trying to convert a long c header file with a lot of structs to c# and I'm getting the following error: An unhandled exception of type 'System.TypeLoadException' occurred in Unknown Module. Additional information: Could not load type .....because it contains an object field at ...more >>

Should this type of method overload work in C#?
Posted by Dave Raskin at 4/20/2005 8:13:04 AM
public class Base { } public class Derived : Base { } public class Service { public void Send(Base baseObject) { // send baseObject Console.Out.WriteLine("Called public void Send(Base baseObject) signature"); } public void Send(Subclass derivedObject) { ...more >>

Get path for install service
Posted by timburda NO[at]SPAM hotmail.com at 4/20/2005 8:04:53 AM
Scenario: I have a service which has been installed in the service component manager. I am writing a second program (completely unrelated to the service) which will run stand alone. I can find all of the services on the machine with the following line of code: System.ServiceProcess.Servi...more >>

generics and reflection
Posted by Jim Robertson at 4/20/2005 7:46:04 AM
Is it possible to instantiate a generic class when the parametrized type isn't known until runtime? For example, in Indigo you can deploy a web service with something like... ServiceHost<Foo> sh = new ServiceHost<Foo>(myURI); sh.Open(); What if the type "Foo" isn't known until runtime? Can I ...more >>

XML Output
Posted by Andy at 4/20/2005 5:45:01 AM
I am loading XML into my app using the .LoadXML method. If we get an error in this app: I am trying to send the contents of the entire XML document in an email. However: when I go xDoc.ToString() (xDoc is the variable name for my xmlDocument), I get the name of the type instead of the XML ...more >>

CONVERT c# decimal to SQL ???
Posted by trint at 4/20/2005 5:22:49 AM
I have a decimal amount in c#: decimal amounT = 62.75; and I need INSERT it into a SQL record as a money value. string strSQL2 = "INSERT INTO trvlDetail(amountfield) ""VALUES ('" + amounT + "') "; Should I use a CONVERT in SQL (if so, how?) or what would be the equivelent in c#? Than...more >>

WebException Method not allowed
Posted by sushi at 4/20/2005 5:12:03 AM
Hello, I am trying to use WebClient class's UploadData method for uploading data to a particular uri. I ahve created a text file say new.txt in the IISROOT folder. But when I try to upload data to this file using uri http://localhost/new.txt it gives following exception Uploading t...more >>

Transform?
Posted by andy NO[at]SPAM alpha-pc.com at 4/20/2005 4:15:30 AM
Hi there... I wrote some code on C# using .NET SDK,for adding users to AD (looks like form with buttonz :), now our company need it with Web interface (like Outlook Web Access). Do I need to rewrite my program with VBScript or something else?...more >>

MarshalByRefObject
Posted by Atmapuri at 4/20/2005 3:17:53 AM
Hi! My Component contains an object derived form the System.MarshalByRefObject. But when I add this component on the Form, the object inspector does not display the public properties of the MarshalByRefObject. Only those of the component are present and the child object is grayed out. ...more >>

How can I make all characters in a string upper case?
Posted by trint at 4/20/2005 3:13:17 AM
I need to check for 14 possible answers, but sometimes they are different case. Thanks, Trint ...more >>

Transaction Sql Server?
Posted by Iwan Petrow at 4/20/2005 12:25:15 AM
Hi, I have three tables T1,T2,T3 with reletions between them. I want to fill a row as follows: 1. fill T1 2. fill T2 3. fill T3 If any of the operations fail - all fail. Tables have 6,8 and 12 attributes. How could I realize the transaction (or anything else if there is)? Do I create a...more >>

Static classes vs Singletons (pt 2)
Posted by Joanna Carter (TeamB) at 4/20/2005 12:00:00 AM
Following on from the other discussion, I have to just check something out with reference to disposal of resources held in static fields. I have a Persistence Framework that is 'globally accessible'. In Delphi, I would use a class of static methods to enforce the singleton, and I added static ...more >>

Easiest way for controls to share the size of parent
Posted by Martin at 4/20/2005 12:00:00 AM
Maybe I'm tired, but I can't figure out a simple way for two controls to share the size of the parent control. e.g when the parent's height becomes NewHeight the first control's new height becomes 0.5*NewHeight and the second control get the rest i.e 0.5*NewHeight. A picture says more tha...more >>

Is there something faster than .|[\r\n] in RegExp ?
Posted by N k via DotNetMonster.com at 4/20/2005 12:00:00 AM
Is there something faster than .|[\r\n] in Regular Expressions ? -- Message posted via http://www.dotnetmonster.com...more >>


DevelopmentNow Blog