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# > july 2004 > threads for tuesday july 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 31

Export datagrid to excel
Posted by Benny at 7/20/2004 10:52:42 PM
Hello Experts, I am currently working on a web application using vs.net 2002 with c#. Assume I have a page with 3 datagrids, how can I export these 3 datagrids to an excel file with 3 sheets, where each sheet contain 1 datagrid data? Thanks, Benny *** Sent via Developersdex http:/...more >>

Specifying command-line arguments w/WinForms mangles Form
Posted by David Adams at 7/20/2004 9:59:20 PM
Hi, I have seen a million examples of using command-line parameters in the following manner: [STAThread] static void Main(string[] args) { Application.Run(new frmMain(args)); } public frmMain(string[] args):this() { if (args.Length>0) { if (args[0].ToUpper(...more >>

language choice
Posted by mk at 7/20/2004 9:39:02 PM
Hi, A client of mine is moving towards .net as their common dev platform. They have a mix of components written in VC++ and VB (Visual Studio 6). Primarily they write com+ based applications, i.e. distributed systems. We intend to almost completely redevelop their existing systems, which have ...more >>

byte[] to char[]
Posted by C Learner at 7/20/2004 9:18:01 PM
I'm new to C# and I wondered how to convert an Array of byte to array chars? Provided that I have this array byte[] a = new byte[50]; Thx....more >>

System.Exception
Posted by Ivan A. at 7/20/2004 7:37:05 PM
Hi Is there any method to change System. Exception. Message property in derived exception's constructor? I need runtime class' information to initialize this property, but it's readonly. Thaks. ...more >>

SP and C# problem
Posted by Viktor Popov at 7/20/2004 7:35:26 PM
Hi , I have the following SP: CREATE PROCEDURE prSVUSERINFO @USRNAM VARCHAR(20), @USRPSW VARCHAR(20), @NAME VARCHAR(64), @ADDR VARCHAR(74), @EML VARCHAR(64), @ROLE VARCHAR(6), @RCOUNT INT OUTPUT AS IF NOT EXISTS( SELECT * FROM BLEK.USERS A WHERE A.USERNAME=@USRNAM OR A.USEREMAIL=@EML) ...more >>

LLBL DataGrid sorting question
Posted by aaa NO[at]SPAM bbb.hr at 7/20/2004 7:29:39 PM
I am considering buying LLBLGen Pro for my Windows.Forms application. I want to use DataGrid control to present data in my database tables. One of features I rely on is easy data sorting based on different attributes shown. In the LLBL documentation I can see that it is not possible to cli...more >>

line drawing error in GDI+
Posted by Alan at 7/20/2004 7:21:07 PM
Hi all, I'm using DrawRectangle method in Graphics namespace to draw one rectangle. When the scale of graphics is 1, everything is okey.However, if i set the scale is more than 1, the four lines have different width, some is thick, other is thin. Is this one GDI+ bug? Why? Thanks Alan ...more >>



Wirless with .Net?
Posted by Java Boy at 7/20/2004 6:49:12 PM
Hi there... Is is possible to develope wireless application with .Net (C# or VB.Net) Thanks1 ...more >>

Help with splitters!
Posted by Derrick at 7/20/2004 5:00:16 PM
I have a form with 3 sections in a vertical arrangement. It's starting to get a little tall, so I want the user to be able to resize the form (using the border), and have the middle section scroll. Right now, I have 3 panels: the top panel I want fixed at 75 pixels high, and docked Top. The ...more >>

using C# library in VB 6.0
Posted by Nabeel Moeen at 7/20/2004 4:40:17 PM
hello, I have a library created in c# which i'm trying to use in a VB ActiveX DLL. i was able to generate an interOp assembly ... but having problems accesing a property whcih is defined as a SortedArray in C#. How do i index the property in VB? i get an "Invalid number of parameters specified"...more >>

Redirecting stdout/stdin in running process without P/Invoke
Posted by Jacek at 7/20/2004 4:34:16 PM
Hello! My application has to use external native library writing to stdout and stdin. My goal is to redirect output within running process (no chance to do that in child process - Process class redirection is useless in that case) and I would like to do it without reverting to C-run time libr...more >>

Form.Close problem
Posted by Rob Agar at 7/20/2004 4:26:34 PM
hi all, I have a problem which I believe others have experienced before, but as far as I can see has not been resolved. Basically, the form refuses to close. Neither clicking the 'X' button nor calling Form.Close works. The Closing event is not thrown. The form contains a number of contro...more >>

regex options
Posted by Bas Hamer at 7/20/2004 4:15:02 PM
how do you set multiple options on a regular expresion ? I have the following code, and I would like to have both run w/ the compiled option, but the (Optioni==TRUE) version needs to ingore case. is there a way to do this ? if (Optioni) { RegexPattern[i]=new Regex(Pattern[i],RegexOptions....more >>

DataGrid exchanging a DataSource, but Columns are added...
Posted by johns1111 NO[at]SPAM gmx.de at 7/20/2004 4:14:01 PM
Hi, I am using a DataGrid and assign a DataTable as a DataSource to it: void ShowData() { DataTable myNewDataTable = new DataTable(); ... // fill table this.m_DataGrid1.DataSource = myNewDataTable; this.Refresh(); } I create the DataTable from the scratch of some XML data an...more >>

Compact Framework
Posted by Robert F at 7/20/2004 4:02:01 PM
Just bought C# after having been a full Visual Studion user. Where do I find the Compact Framework SDK or should I have bought Visual Studio? -- Robert F...more >>

the best class design
Posted by Mojtaba Faridzad at 7/20/2004 3:56:17 PM
Hi, my question is about OO design. imagine we have 2 classes with some common members and some different members. which one is better and why: 1) design class A completely and B as a drived from A with the different members. 2) design a super class with common members then design class A...more >>

How to use treeview.selectednode.tag property in program?
Posted by yfzhu at 7/20/2004 3:38:14 PM
I want a filter: "menu_id = " + treeview1.selectedNode.tag? why it can not run? ...more >>

blending images
Posted by dugald NO[at]SPAM gmail.com at 7/20/2004 3:03:20 PM
I've been trying to find a way to combine two images such that they are "blended" i.e. that the top image is a semi-transparent overlay on the bottom image. Many code examples show how to do this on the screen (using the Graphics class), but not how to create an actual image with this feature. ...more >>

pass delegate as arg to method?
Posted by VM at 7/20/2004 3:00:42 PM
How can I pass a delegate to another method? In my code (win app), i update my datagrid with the datatable after the method loadAuditFileToTable is finished executing. Instead, I'd like to be able to to update the grid continuously (while the table's filling) and someone suggested I pass a callb...more >>

A window on top of another window
Posted by Sean at 7/20/2004 2:45:53 PM
Hi, Say that I have 2 windows A and B. If I want A to be always on top of B, how can I do this in C# WITHOUT having to set the TopMost property of A to TRUE. Thank you very much in advance. regards, Sean...more >>

C# Binary File Replacement
Posted by Jeffrey D. Gordon at 7/20/2004 2:39:55 PM
I'm wanting to replace Field Values in an existing PDF, I've done this with PHP by doing a replace in the file. I've been able to read the file in a byte array in c# but all my attempts to replace strings in a binary file have led to failure for the last couple of days. I've stared at th...more >>

FromBase64String Problem
Posted by SRLoka at 7/20/2004 2:27:46 PM
I am not sure if it is a problem but, if you look at the help file, it = says=20 Exception is thrown if : The length of s, ignoring white space characters, is less than 4.=20 -or- The length of s, ignoring white space characters, is not an even = multiple of 4. The valueless chara...more >>

Wierd Problem - Operation Timeout - Urgent Please
Posted by Niloday at 7/20/2004 2:21:01 PM
Hi All, I have developed a web service and deployed it on the Win2000 box. I can access the web methods of this web service when my client application is debugged from VS.NET studio. But it fails with an 'Operation Timeout' exception when run from the compiled version. The client applicatio...more >>

Displaying Chinese, Russian, and English chars in the same tree view?
Posted by Derrick at 7/20/2004 2:15:53 PM
Is it possible? I installed all the language scripts on my XP box, can see russian chars in unicode xml file, but not chinese chars. See the same thing in tree view as when i look at xml file in notepad. Thanks in advance!! Derrick ...more >>

System.IO.Port not active after installing .net 2.0
Posted by AlirezaH at 7/20/2004 2:07:04 PM
I installed .Net 2.0 but I can't get System.IO.Port in VS C#. ...more >>

vs2003 - project - working directory
Posted by news.microsoft.com at 7/20/2004 2:01:15 PM
Hi NG, I want to start my vs2003-project in the solutionfolder of the project and not in /bin/debug because there are external files i wand to load. If i goto project-prefenences-Debug-"Working Directory" an add a relative path like "." i get at runtime different working paths in my app (Syst...more >>

CTADE, Intel Dialogic, C#
Posted by Jay Douglas at 7/20/2004 1:52:06 PM
I have a client that currently owns 250 licenses for the CTADE product using Intel dialogic boards in multiple VRUs. I'm in the processes of rewriting an application for this customer in c# .net. I would like empower the CTADE scripts with the .net framework and custom object types created in c...more >>

Bit masking a byte with an enum
Posted by Jim H at 7/20/2004 12:40:47 PM
I have an enum that is derived from byte and a member that is of type byte. The compiler complains when I try to OR the one of the enum values with the byte. Why? [Flags] public enum eDataPosition : byte { ePosition1 = 0x08, //00 001 000 ePosition2 = 0x10, //00 010 000 ePositi...more >>

System. TimeSpan
Posted by Ivan A. at 7/20/2004 12:30:06 PM
Hi! Why I can't serialize TimeSpan structure with XmlSerializer? This is what I do: using System; using System.IO; using System.Xml; using System.Xml.Serialization; namespace ConsoleApplication1 { /// <summary> /// Summary description for Class1. /// </summary> pu...more >>

Hide the Taskbar
Posted by Ken Beauchesne at 7/20/2004 12:19:23 PM
Can someone tell me how to disable and hide the taskbar using C# Thanks Ken Beauchesne ...more >>

Runtime Type casting
Posted by MattC at 7/20/2004 12:16:03 PM
Hi, How can do runtime casting? MyCollection derives from ArrayList I will store lost of different objects that all derive from the same parent class. I then want to be able to pass in the object type and collection type I have a number of classes that derive from ArrayList and have if pi...more >>

Modeless Form not repainting
Posted by Phil at 7/20/2004 12:08:02 PM
I have a .net/C# com object that creates a thread and a window to output results obtained in the thread (the thread is reading a com port). Everything seems to be working correctly (I don't get any errors), but no results are displayed in the window. If I move the window it is not repainting itsel...more >>

ISAM not installable
Posted by Guly at 7/20/2004 12:01:59 PM
Hi, i' ve the follow problem: the code below generate an exception.... private void btnElabora_Click(object sender, System.EventArgs e) { File.Copy(FileName, @"C:\\Paesi\\Paesi.xls", true); OleDbConnection objConn = new System.Data.OleDb.OleDbConnection( "Provider=Microsoft.Jet.OLE...more >>

Sequence Number generator on the server
Posted by Kamran K at 7/20/2004 11:37:04 AM
Hello I have created a client server application using C#. Existing application is using random number on client side to generate sequence numbers that are then assigned to transactions. This results in duplicate sequence numbers across multiple users. Solution to this problem is to gener...more >>

Sorting a listitem by a custom field
Posted by Simon at 7/20/2004 10:43:20 AM
Hi everyone, I need to sort a list item collection by a sort order value taken from a database. The first thing that occured to me was that I could inherit from ListItem and add a sortOrder field to it. Unfortunately this isnt working because listitem is sealed. Does anyone know another ...more >>

AxWebBrowser control problem
Posted by Chuck Bowling at 7/20/2004 10:17:30 AM
I have a problem and frankly i just don't know enough to understand what it is. I have a control wrapper that wraps the IE browser control. The wrapper complies fine as a UserControl. I did have it working but i made some changes to it without backing up the original. Now i'm stuck. When i try...more >>

Access to Outlook Express using C#
Posted by Ricardo Lezana Bastante at 7/20/2004 10:12:53 AM
Hola a todos: ¿Como se puede acceder a Outlook Express desde un programa c#? Gracias Ricardo. ...more >>

SMTP Mail
Posted by jljungman NO[at]SPAM hotmail.com at 7/20/2004 10:05:49 AM
Hey, I've built a small email application(I use the System.Web.Mail namespace), when I send the email/emails with attachments they work very well, my network technician says its works pretty well, expect that there is no disconnect, my program simple just shuts down. I was wondering if there ...more >>

how to compile web service in command line
Posted by mei xiao at 7/20/2004 9:54:35 AM
Hi, there, I have a small web service project written in c sharp, I would like to know how to compile it in command line instead of using visual studio.net environment. Thank you very much. -May ...more >>

RegEx question
Posted by Vai2000 at 7/20/2004 9:50:14 AM
Hi All, I have a file which has some lines starting with value 50. xxx xxx 50 vvvv 50 I have a solution by which I read line and filter the ones which I want... Is there a way I can get it via Regular Expression,. Somehow this expression is not working...please correct. Regex reISA = new...more >>

Console program questions?
Posted by nick at 7/20/2004 9:44:18 AM
I am using C# do write a console program. Can I do the following tasks: 1. Detect if a key on keyboard is pressed? and get the typed ASC II code? 2. Catch and handle the event of the Control-C? 3. Catch and handle the event when the close button of the command prompt window? Thanks...more >>

Overriding properties of child objects in a C# class
Posted by helen NO[at]SPAM helephant.com at 7/20/2004 9:38:13 AM
I have a person class with a name object. The name object has several fields including one called "title". The two classes look something like this: public class name { public string title { // get set code here } } public class person { private gender; private m_name...more >>

Never ending console app?
Posted by Kristoffer Persson at 7/20/2004 9:18:50 AM
I have a small console app that has a Run method like this: public void Run() { m_Timer = new System.Timers.Timer(1000); m_Timer.Elapsed += new System.Timers.ElapsedEventHandler(OnTimer); } The problem is that the code obiously exits the Run method immediately. What I want is for ...more >>

Passing by ref or by value
Posted by Just Me at 7/20/2004 8:47:49 AM
PARAFORMAT2 is a structure that SendMessage will return stuff in. Is the "ref" correct or since only a pointer is being passed should it be by value? Suppose I was passing data rather then receiving it, would that change the answer to the above? [DllImport("user32.dll", Entry...more >>

Choosing object type
Posted by philgoogle2003 NO[at]SPAM yahoo.com at 7/20/2004 8:35:28 AM
Hello everyone, any help with this would be appreciated as I have spent the past afternoon trying to sort it out. I have two questions based on the followiung information. I have two classes: - Class A { Method 1() {} } Class B: A { Method 1(){} Method 2() {} Method 3...more >>

Stop form from closing
Posted by John S at 7/20/2004 8:27:20 AM
When the user clicks the "X" in the upper right-hand corner of a form, how can I stop the form from closing? ...more >>

TreeView - MouseDown at BeforeExpand
Posted by Jürgen Müllder at 7/20/2004 7:36:47 AM
Hi! I have a TreeView in my Application. I have the MouseDown Attached to the TreeView. When i click at a Node it makes that what it should. But when i Expand a Node by clicking at the Plus Sign the MouseDown gets fired and it runs the routine, what i don't want. Is there a way to find o...more >>

DateTime problem
Posted by nic at 7/20/2004 7:14:02 AM
hey, I always struggle with the following: I have an object obj with a property paydate (type = DateTime) Now, after instantiating the object and do several things, I want too check if my paydate is still empty. How can I do this? I tried several things like (all with errors): if (obj.pa...more >>

I can't extract string data from a type object
Posted by Chris at 7/20/2004 6:41:54 AM
I am calling a COM object that returns a type Object and it contains two strings but I can't get them out. Here is the command: object ParamNameObj= localxPCCOMOBJ.xPCTarget.GetParamName (1); ParamNameObj shows up as a System.Array in the watch window with the following elements. -[0] ...more >>

Int to Hex
Posted by Nick at 7/20/2004 5:42:51 AM
Consider this //I want myVar to equal 0x41 int myVar; int otherVar = GetItsValue; //returns a decimal 65, 65 is 41 in hex //now i want to do something like this, obviously doesnt work myVar = otherVar.ToHex(); //which would ideally be myVar = 0x41 //and then i want to pass myVar to a m...more >>

Does the C# FCL implement a Listener interface or methods?
Posted by Roger Helliwell at 7/20/2004 4:23:42 AM
Hey guys, Subject line says it all. I have many presentation layer objects that need to be notified when a specific business-tier class has been modified. Thanks, Roger ...more >>

string problem
Posted by Rosario at 7/20/2004 4:09:31 AM
Hi at all, I hope that someone can help me. I have two string A="abcxxxdef "and B="xxx" and I would want to know if into the A string exist one or more occurrences of B string. In this case would serve me a function that, taken in input the two strings, gives back 1 to me. It exists? ...more >>

Convert.tostring vs obj.tostring
Posted by Mike at 7/20/2004 4:00:40 AM
Hi, I was wondering whether a difference existed between the = Convert.ToString() method and the method ToString() that is sometimes = available in some classes. Is one method preferred over another? Thanks. Mike...more >>

Binding to assembly
Posted by Avi at 7/20/2004 1:35:01 AM
I have a c# .NET application. V15 & V16 I have a DBAccess DLL assembly. V15 & V16 I want the .Net Application V15 will work with V15 DBAccess.dll I want the .Net Application V16 will work with V16 DBAccess.dll Is there a way to do it without SN key's ? is SN key is the best way to han...more >>

Cursed Cursor
Posted by pindlebot at 7/20/2004 1:33:03 AM
Every time I set the cursor using Cursor.Current = MyCursor it appears until I move the mouse at which point it reverts back to whatever it was before. Is there any way to preserve it? PS setting it every time the mouse moves looks horrible....more >>

salted md5 hash
Posted by Sýfýrýncý Murat at 7/20/2004 12:08:05 AM
How can I get hash value for a specified string with specified salt? There are some md5 implementations under System.Security.Crptography but I could not find anything about salted md5 algorithm. ...more >>

How to creating an a array of class objects
Posted by cadaniel NO[at]SPAM tpg.com.au at 7/20/2004 12:02:21 AM
I have an array like this: MyClass[] myArray; In a method I allocate it depending on how many rows in the DataTable: myArray = new MyClass[myDataTable.Rows.Count However, when I try to access them in a foreach loop, they aren't instantiated. foreach(MyClass tmpClass in myArray) ...more >>


DevelopmentNow Blog