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# > june 2004 > threads for wednesday june 9

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

For C# Interop, how to deal with pointer field in struct in IDL?
Posted by Lawrence Li via .NET 247 at 6/9/2004 11:49:33 PM
How to deal with pointer field in struct in idl So that C# can call C++ COM? e.g. in C++ COM Server IDL: typedef struct { long *xPos; long yPos; } MYPOINT; ... ... interface IIDraw : IUnknown { HRESULT DrawALine([in,out] MYPOINT* p1, [in,out] MYPOINT* p2); }; in C#...more >>


Memory costs for declared but not used objects
Posted by Barbara at 6/9/2004 11:29:20 PM
Hello If I declare an object, ie "private TextBox tb;" and then do not use it in program, is it using same memory as "private TextBox tb=new TextBox();"? ...more >>

Another simple XML question
Posted by joink_ NO[at]SPAM hotmail.com at 6/9/2004 10:54:20 PM
I was just wondering how can I retrieve and modify the xsl processing instruction (<?xml-stylesheet type="text/xsl" href="..."?>). VB...more >>

Extending the definition of an Enum
Posted by Hans De Schrijver at 6/9/2004 9:39:18 PM
Is it possible to extend the members of an Enum defined in an abstract class in a derived class? For instance: abstract class class1 { protected enum MyEnum {A, B, C} } public class class2 : class1 { //in this class, the MyEnum should have two extra values D and E so it becomes...more >>

regular expression xml help please
Posted by patrongp NO[at]SPAM yahoo-dot-com.no-spam.invalid at 6/9/2004 8:24:52 PM
hello, anyone know how to return any quotes used inside a text node? for example: <node1>This is my text node, my quote "quote" is here</node1> what i want to do is escape those " with &apos; through the use of regular expressions the string i will be operating on is an xml docu...more >>

Class vs. Interface accessibility question
Posted by Hans De Schrijver at 6/9/2004 7:19:17 PM
I'm pretty new to C# development, so here's a newby question regarding accessibility: Scenario: class1 contains some basic properies and methods class2 inherits from class1 and adds some properties and methods class3 inherits from class2 and adds some properties and methods class1 and clas...more >>

String Conversion question
Posted by KA Kueh at 6/9/2004 7:00:55 PM
Dear all, I have a requirement to replace the ' character with ASCII character (146) in C# but it seems that when I do the following the conversion is lost. char t = Convert.ToChar(146); string s = t.ToString(); The trouble now is that the s object now contains the ASCII character (63) n...more >>

string.split question
Posted by senthil_tamil NO[at]SPAM yahoo.com at 6/9/2004 6:44:35 PM
Code ---------------------- string Line = "\"A\",\"B\",\"C\",\"D\""; string Line2 = Line.Replace("\",\"","\"\",\"\""); string [] CSVColumns = Line2.Split("\",\"".ToCharArray()); I expect 4 values in my CSVColumns Array ("A", "B", "C", "D"). But it returns me 18 values with lot...more >>



Removing NTFS Folder Permissions On Win2000 In .NET Without using WMI
Posted by Ram at 6/9/2004 6:09:10 PM
Hey, I'v managed to find a way of adding NTFS permissions to a certain folder, But the problem is, the folder has a couple of inherited permissions which I want to delete. How can I remove the folder's NTFS permissions WITHOUT using WMI or special XP features? Thanks ahead! --Ram ...more >>

saving images fro mpicturebox..
Posted by Serdar C. at 6/9/2004 6:07:13 PM
hi again.. i wrote a simple "paint" program which u can paint a picture on a picture box and then save it to a bmpof jpg file.. my problem is whenever i try to save the file program throws "'System.NullReferenceException". i save the picture like this: "picturebox1.image.save("temp.bmp",image...more >>

counting lines of code in project/solution?
Posted by VM at 6/9/2004 5:17:06 PM
How can I know how many lines of code are in my solution (which consists of two projects)? Thanks. ...more >>

Question of JAVA programmer to C# programmers
Posted by Xandau at 6/9/2004 4:48:30 PM
hello all, i wotk with java every day but last time i have interested in C#. everything goes great except one thing... in java everything is a reference (except plain types) so i thought that in C# will be the same - i was wrong.... or if in C# is the same as in java please tell me ;-) I h...more >>

How to convert System.Drawing.BitMap to Byte[]?
Posted by david at 6/9/2004 4:40:46 PM
As Title. Thanks in advance. David ...more >>

automate Excel in C#
Posted by Michael Wu at 6/9/2004 4:35:47 PM
I wonder if anyone can shed some light on how to automate Excel from a C# program. What I like to do is this, 1) Find if an Excel spreadsheet is alreay opened (identify the Excel file path) 2) if that particular Excel is alreay launch, get the Excel Object 3) run a macro on the Excel Object ...more >>

HttpWebRequest and ClientCertificate
Posted by Curtis Justus at 6/9/2004 4:23:28 PM
Hello, I tried posting this in the aspnet.security group, but it seemed like some posts in this group are closer to what I'm looking for. In any event, I apologize in advance if this isn't the place to post this... I have a winform app that is using HttpWebRequest to connect to a site using...more >>

Setup & file association
Posted by Peter at 6/9/2004 4:21:40 PM
I have created a Setup project wich includes couple of text file and it also includes file association of .tsrx. After the application is installed if I happen to delete any one of the text files the Setup runs automaticaly and installs those text files back when I double click on the any of t...more >>

Parse Double Conversion
Posted by Herb Stevenson at 6/9/2004 4:14:46 PM
Hello. I have a very large string reprentation of a number, for example "1000001002003004005006007008009010". If I user Double.Parse, I get something like 1.0000010020030041E+33 as my output. I need to do a mod 900 conversion on this long string value (i.e. loop thru the number consistently d...more >>

How to release memory used by application
Posted by Mullin Yu at 6/9/2004 4:13:35 PM
I write a Windows Application which uses db connections and some COM dll. After running consecutively for 12 hours, the memory of the application increased from 30MB to 130MB. How can I trace the main cause of the memory used and how can I release them? Thanks! Mullin ...more >>

How to use MsgBox ?
Posted by pronto at 6/9/2004 3:58:49 PM
Hi all, C#. I create form with single button. On button push I want to get MsgBox("Hello world"). What I should do to make compiler understand "MsgBox" ? regards pronto ...more >>

Floating Number and Files
Posted by Hector Y. Martinez at 6/9/2004 3:48:02 PM
I have a number 0,00001 and when I call the ToString() method to write it to a file a get 1 * 10 ^ -5 , how can I get in the file the number with the exactly same signature....? Thank in advantage. -- "The best way to predict the future, is to invent it"...more >>

How can I create a 2D ArrayList? String usually.
Posted by Dan V. at 6/9/2004 3:39:16 PM
I would like to create a 2D string list (2D ArrayList ???). I would like to pass in a table or query as a parameter and have both columns transform into a 2D ArrayList. When I sort the one 'column' in the ArrayList, the other is automatically sorted and so I can use IndexOf without fear. This ...more >>

Show a Messagebox
Posted by rkmoray NO[at]SPAM aol-dot-com.no-spam.invalid at 6/9/2004 3:26:36 PM
How do I show a Messagebox in asp.net(C#)? Posted Via Usenet.com Premium Usenet Newsgroup Services ---------------------------------------------------------- ** SPEED ** RETENTION ** COMPLETION ** ANONYMITY ** ---------------------------------------------------------- ...more >>

Marshaling a string (and struct) for call to SendMessage
Posted by Adam Clauss at 6/9/2004 3:05:51 PM
I am attempting to set the text on a richedit control in another application using EM_SETTEXTEX: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/richedit/richeditcontrols/richeditcontrolreference/richeditmessages/em_settextex.asp I have the following: ...more >>

Regional settings made at the operating system level
Posted by Karunakararao at 6/9/2004 3:04:29 PM
Hi All regional settings made at the operating system level. For example, Canada uses a dd/mm/yyyy format while the US uses mm/dd/yyyy. how can i get this type date format : iam using this code in C#: System.DateTime.UtcNow.Date.ToString(); Regards Venu. ...more >>

combibox font.bold
Posted by freddy at 6/9/2004 2:51:02 PM
I am new to c#. I would like to set the text in a combobox to bold if the user check off a radiobtn something like thi if radiobtn = true the combobox.font = new combobox.font.bol I know this is not the correct code, but I'm trying Aslo can any one recommand any C#books....more >>

compare 2 files
Posted by kids_pro at 6/9/2004 2:29:43 PM
What is the best method for comparing 2 file? I want to create a utilities to syncronize 2 folders that perform function similiar to robocopy.exe Thanks, kids ...more >>

How to create Intellisense?
Posted by soni29 NO[at]SPAM hotmail.com at 6/9/2004 2:25:35 PM
Hi, I would like to create the intellisense feature in an editor I'm working on, any pointers on how to do this? Basically the keywords preceeding the . (period) to invoke the intellisense box will be user defined, I know how to get those, just need to know how to create that feature of knowing...more >>

Uninstall application
Posted by Grant at 6/9/2004 2:04:29 PM
Hi there, How would I get my installer to give the option of uninstalling any existing instances of my application? Currently I get an error message if I try to install over an existing installation and have to manually uninstall from the control panel. Thanks, Grant ...more >>

Setting a ComboBox's Value
Posted by Fred at 6/9/2004 1:52:46 PM
Hi, I am having a problem setting a combobox value in code on form load using comboBox.SelectedValue method. The code below when debugging show the combobox equal to an undefined value. The value I am trying to set is present the items collection. I also have tried using .SelectedItem metho...more >>

START CD Program
Posted by A at 6/9/2004 1:42:41 PM
Hi, all! Just a thought.... I know this is a bit dummy but I want to ask something... I would like to ask whether I could get some information about creating a startCD program when installing an application. I was kinda curious on how they do it, having those flashy thingys on the screen,...more >>

no postback
Posted by MA at 6/9/2004 1:33:36 PM
Hi! I have a database-driven web user control. On this control i have a grid with a datatable inside, getting info from db. Lets say it looks like a sheet in ms excel. My problem is that every time I push a button (ex save), the page reloads. This takes a while and feels like overkill when I ...more >>

Using variables across multiple Web Forms
Posted by Brian Conway at 6/9/2004 1:13:53 PM
I am trying to use a variable from a login page web form (username) to build a select statement in another web form. How do I pass the variable from one form to the other and then insert that variable into my select statement? I thought setting it as a public variable would do it, but that is n...more >>

Problem with digital Signature in a Xml document
Posted by Marco Moioli at 6/9/2004 1:06:32 PM
Hi, I have a problem with a X509 digital signature. I want to sign a Word 2003 document saved in .xml format. the problem is that after the signature, Word 2003 don't want to open the document. If I apply a standard W3C signature to an Xml file wrote in Word 2003 I obtain: <?mso-applicat...more >>

change color of a control's border
Posted by Paiam Salavati at 6/9/2004 12:08:01 PM
I have to change the color of the border in a Control whose BorderStyle is "Fixed3D" (for example Label). I could change the color of a Label only if its BorderStyle was set to "None" but I havent't found a way so far that allows me to set the color for a control with BorderStyle "Fixed3D". ...more >>

control....top urgent!
Posted by at 6/9/2004 11:43:33 AM
Hi: I want to show the info in a control.Please tell me I should choice which control? TIA. ...more >>

Controling Media Player
Posted by NewDev at 6/9/2004 11:38:51 AM
Need to control Media Player 9 from my C# app. Already seen method to do this through PInvoke. Is there a way to do this directly with .NET ? Thanks ...more >>

Can I raise a keydown event without using the keyboard?
Posted by bdean NO[at]SPAM itamar-medical-dot-com.no-spam.invalid at 6/9/2004 11:22:40 AM
I use a touch screen and I want to simulate a keydown event every time the user starts typing. Is it possible or I have to use API calls? Posted Via Usenet.com Premium Usenet Newsgroup Services ---------------------------------------------------------- ** SPEED ** RETENTION ** COMPLETIO...more >>

User Controls and <form runat="server">
Posted by Hai Nguyen at 6/9/2004 11:13:50 AM
Hi all I have a several User Controls which require this tag: "<form runat="server">. I tried to have all of these user user controls on the same web page. It kept giving me an error :""A page can have only one server-side Form tag" Is there a way to go around this? Thanks ...more >>

Returning strings in web services
Posted by Randy at 6/9/2004 10:48:44 AM
Hello, I have a web service in which I'm doing a query to an Access database and returning the resulting XML data when I do the return from the service... public string AOS_Data(string sql) { CDFDBSoapService.DBWebService dbws = new CDFDBSoapService.DBWebService(); Do the connection stuff...more >>

GraphicsPath border question (DrawPath)
Posted by Tim Bücker at 6/9/2004 10:39:54 AM
Hello. I have a question concerning the Graphics.DrawPath method. Where is the border drawn using a pen with the size of 3? It doesn´t seem that the border is drawn outside of the path (just a rectangle in my case) or completely inside the path. For me it looks like this with b=border and p...more >>

Integer sorting in C#
Posted by Jack Black at 6/9/2004 10:31:02 AM
Hi Guys What is the fastest way of sorting a huge list of Integers in C# I was thinking of using the Array class. Is there a better way of doing this Regards Jack....more >>

Formating a double value into a string
Posted by Daniel P. at 6/9/2004 10:23:14 AM
How do I do this in C#? // C++ and MFC code double fMyValue = 17.25; CString fMyValue; fMyValue.Format( "%012.2f", fMyValue ); Thanks! ...more >>

disk size, space with UNC
Posted by andrewcw at 6/9/2004 9:31:03 AM
If I have a drive letter I can get the the drive info from WMI like this string ltrDr=theSharePath.Substring(0,2); // must be in form of "E: string wackyQuery =string.Format("Win32_LogicalDisk.DeviceID=\"{0}\"",ltrDr) ManagementObject DIdisk =new ManagementObject(wackyQuery) DIdisk.Get() qc...more >>

how-to find the file type of a file?
Posted by Pierre Drapeau at 6/9/2004 9:28:26 AM
I am looking at a way to get the file type of a given file. The Windows API has GetFileVersionInfo which will retreive that info, burried into a structure. I tried to find the equivalent in C# and found System.Diagnostics.FileVersionInfo. I see that the class has pretty much all the information ...more >>

Button + image
Posted by Bjorn at 6/9/2004 8:21:05 AM
Hi, I placed a button with an image on a form When I click on the button only the frame is pushed. Anybody got a good idea //Bjorn...more >>

Scope confusion -- compilation issue -- please help me understand
Posted by Bill at 6/9/2004 7:51:07 AM
When I compile the following code fragment, the compiler errors saying the variable connection is not initialized. As I understand C#, I thought it would be initialized. Please help me and explain what I am missing Bil static void Main(string[] args SqlConnection connection try // to ope...more >>

Conversion from java to c#
Posted by daniel li at 6/9/2004 7:47:34 AM
I am working with some java/.net conversion project and I need to convert the following method into C#. private java.sql.Date convertDate( Calendar calendar ) { // calendar .getTime() returns a util.Date and I need to // construct a // sql.Date object. So call getTime() on the util.Date ...more >>

C# newbie
Posted by Wayne A. via .NET 247 at 6/9/2004 6:32:49 AM
Hi All, Not sure if I post this in right place. I wonder that if I can use c# create an editor like VS.NET editor, I don't know what has been used, can anyone give me some detail info/reference? Thanks a lot? -------------------------------- From: Wayne A. ----------------------- ...more >>

IndexOutOfRangeException with BindingContext
Posted by stephen.haeney NO[at]SPAM tellermate-dot-com.no-spam.invalid at 6/9/2004 6:25:50 AM
I have a datagrid bound to a strongly typed custom collection. I have a Delete button on my form that calls the following code: if ( this.BindingContext[myDataSource].Count > 0 ) { myDataSource.RemoveAt( this.BindingContext[myDataSource].Position ); } I was expecting the button press t...more >>

How i can fill an XmlDocument object with this SQL select using XmlReader, SqlCommand ?
Posted by terrorix at 6/9/2004 6:07:38 AM
I also posted this article at: microsoft.public.dotnet.framework.aspnet -------- Hi, I Have this sql select(MS SQL): select a.ID, b.ID from Table as a left outer join table AS b on a.ID = b.Parent_ID where a.Parent_ID is null order by a.ID ...more >>

Error when Instanciating the Clerk object in a CRM Worker Derived class
Posted by Chamith at 6/9/2004 5:41:51 AM
HI all, When i try to instanciate a Cerk object in the Activate Method of the Worker Derived Class, It gives the following exception System.Runtime.InteropServices.COMException (0x8000FFFF): Catastrophic failure at System.EnterpriseServices.CompensatingResourceManager.CrmLogControl.Regi...more >>

Problems with static events? (Or is there another way?)
Posted by Colin Cashman at 6/9/2004 4:34:49 AM
In a program I'm writing, I have a class that generates a certain event. However, there may be dozens or even hundreds of instances of this particular class, which makes adding and removing handlers to each instance a pain. Rather than go down that route, I was thinking of making the event stati...more >>

Converting given no. to words
Posted by Converting Numeric to a word at 6/9/2004 4:16:03 AM
Hi, I have little experience in C#, Can anyone help me with this sproblem. " I want to convert a given number in a text to a word on a lable" for eg if we type 25 in text box , i want to display it as 'Twenty Five' on a lable. pls send any related code sample. ...more >>

URGENT:Displaying a Web Page in a Windows C# forms application
Posted by Mustafa Rabie at 6/9/2004 3:55:31 AM
Dear All, i have a web application that registers my users to my site, i have a SQL backend and a webservice to interact with SQL. I need to write a WINDOWS FORMS APPLICATION using C# to register the users. Something like the MSN Explorer setup & register application. In other words a Window ...more >>

How can I stop a form from closing & wordrap a singline
Posted by prelugejunk NO[at]SPAM hotmail-dot-com.no-spam.invalid at 6/9/2004 3:24:45 AM
I'de like to ask users if they are able to save their work before they close using the normal "Save? Yes, No, Cancel" type of message box. I've got this so far: private void Form1_Closing(object sender, System.ComponentModel.CancelEventArgs e) { if(unSaved) { DialogResult result ...more >>

ASP/C# Problem...please help oh wise programming people :)
Posted by Corey Dyke at 6/9/2004 2:55:17 AM
K here's what happened. For my English project at DeVry, I had to design a website for a company of my choice. So since my dad has been after me for years to do one for him, I decided to finally do it. So I decided to do most of the pages in HTML, which i'll be doing soon. And since he's a F...more >>

Regex Help
Posted by shearne NO[at]SPAM tssg.org at 6/9/2004 2:01:04 AM
Hi, I have an array of strings e.g. "one","two","three","four","fourteen" From the following string "onethreefourteenten" I would like to know that strings have been matched; strings [0],[2],[4] but not [3]. What i'm trying to get is the longest word beginning at a particular position,...more >>

Sending RTF-formatted emails with SMTP/MAPI
Posted by ian.taylor NO[at]SPAM targetfour.com at 6/9/2004 1:59:16 AM
Hi all... Is it possible to send RTF-formatted emails using the .NET SmtpMail implementation? I can only find provision in the BodyFormat property of the message to send plain text or HTML emails. I also have a similar problem in sending HTML/RTF emails via MAPI and would appreciate any ...more >>

A way to make my application look like Visual Studio
Posted by Mike at 6/9/2004 1:20:14 AM
How do I make my c# app have the more modern looking menus and controls, like the ones you see in Visual Studio? Mike ...more >>

Where is the COM object?
Posted by Ron Weldy at 6/9/2004 12:43:41 AM
After I add a reference to a COM object to my project, I would like to be able to return the path and filename of the dll in my C# code. How can I do that? ...more >>

USB programming
Posted by EdgarBM at 6/9/2004 12:22:16 AM
Hi all, I want to get some sample code or good tutorial to program the USB port. I just want to use the USB port like I could make with a serial port or an ethernet port (I think that with USB it will be the combination of both), just to send and receive information in an assyncronous wa...more >>

Handling _VIEWSTATE in a Web Server
Posted by suresh NO[at]SPAM dynu-dot-com.no-spam.invalid at 6/9/2004 12:21:15 AM
Hi all, I'm writing a Webserver in C# with ASP .NET support.I could able to execute simple ASP .NET pages.But i dont know how to handle QueryString and hidden data(such as username and password's) coming with _VIEWSTATE object in the webserver. Can any one tell me how to handle this? Is ...more >>


DevelopmentNow Blog