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# > march 2004 > threads for thursday march 11

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

File/Directory NTFS permissions
Posted by Oleg Ogurok at 3/11/2004 11:37:33 PM
Hi all, Does anyone know how to set NTFS permissions on a file or a directory via C# ? Thanks, -O. ...more >>

auto positioning of buttons on form
Posted by rammohan at 3/11/2004 9:40:21 PM
Hello Is there any control that auto arranges the controls added to it dynammically. My purpose is to add buttons to forms dynamically but has to provide look and feel without changing their size.i.e. What I have to get is similar functionality as layouts in java. With R...more >>

Setup Project
Posted by DMan at 3/11/2004 8:57:36 PM
I am working on creating a VS.NET setup project. Anyone know where to look to find out how to reboot the computer and then have the setup program start up again to continue after reboot? Links, personal knowledge? Thanks ...more >>

Debug Build Hang with vs.net 2002 and C# Application.Exit();
Posted by BM at 3/11/2004 8:35:42 PM
I was just wondering if this was a 'Known problem' or a chance problem with my development system(s). (Ive had this happen on 2 different ones now and now on a fresh install). Im using vs.net 2002 IDE for developing .net windows applications since it came out. I have not upgraded to the 2...more >>

How to capture attribute in xml ?
Posted by C# newbie at 3/11/2004 7:42:23 PM
Hi, This is part of an xml file: <Page PageID="Page12" PageName="AgeGender" StyleUsage="" PageLayout="Flow" Duration="0" AutoSubmit="false" ProtectImages="false" SwapOnMouseOver="true" NextPage="P2" Order="1" HideByCondition="false"> <Params> bluh bluh bluh bluh ...more >>

Enum to int type cast
Posted by MuZZy at 3/11/2004 6:49:29 PM
Hi again, Can anybody help me figure out how do i cast from enum to int? public enum Operator {opPlus=1, opMinus=2, opDivide=3,...}; Operator op = opPlus; int Priority = op; // It gives error So if i want to assign a numeric value of an enum variable to an integer variable ? Thnak ...more >>

Enum type def
Posted by MuZZy at 3/11/2004 6:20:23 PM
Hello, I want to define an enum type, which in delphi would look like: -------------------------------------------------------- Type TOperator = ( opPlus, opMinus, opDivide, opMul, opUnaryMinus ); Var operator : TOperator; ... operator := opPlus -----------------------------...more >>

Data Table problem
Posted by Jerry S at 3/11/2004 6:11:37 PM
Hi I've got a DataSet with one table in it. I want to iterate through all the rows in a particular column in the table, each time doing something with the value that is returned. I can't find out how to do it! Surely it must be easy. Any help greatly appreciated! Many thanks. Best...more >>



Use datagrid in C# window application
Posted by Grey at 3/11/2004 5:44:15 PM
How to catch the event of click each rows of the datagrid?? how to get = the specify cell in the grid? Million thanks...more >>

help in richtextbox.
Posted by Smith at 3/11/2004 5:44:14 PM
I'm using RichTextBoxt control as text editor. In that we are in need of following things: (1) Left Margin with light gray color. (2) If mouse left button clicked at any line, then in it's margin area display one triangular bitmap. (3) If another time mouse left button clicked at differen...more >>

tabcontrols in .net
Posted by SS at 3/11/2004 5:42:15 PM
i have one problem in .NET winforms developement with C#. i am having one tab which is having 10 tabpages.Among that tabpages,one tabpage in turn has 20 grids which i can't put within this tabpage. also i can't put a tabcontrol within a tabcontrol which becomes very complex. Please suggest s...more >>

Class inheritance
Posted by MuZZy at 3/11/2004 5:18:08 PM
Hello, I just started with c# and i am trying to port some java code. Here is a simple sample of what i have on java: public abstract class Element { public Element( Element prev, Element parent, Element child ) { <some code> } public abstract double Exec(); } ...more >>

Instant Messengers & C#
Posted by Kevin Blackwell at 3/11/2004 4:56:48 PM
Anyone have any examples of using C# to write a client to connect to ICQ/AIM/Y!/IRC/MSN messaging servers. I'm actually trying to stay away from jabber. If it was a more popular service, I would include it, but it isn't, so why include the libraries. I'm also trying to obtain individual libr...more >>

WM_COPYDATA Win32 -> C#
Posted by tinnes NO[at]SPAM ecliptictech.com at 3/11/2004 4:48:49 PM
Can someone explain why this doesn't work? I'm trying to send a string from a Win32 dll to a C# winform. The dwData and cbData members are good, but lpData is always garbage on the .NET side. Win32 -------------------- COPYDATASTRUCT cds; char szText[255]; lstrcpy(szText, "testing"); c...more >>

Streams and file poistion seeking
Posted by nevin at 3/11/2004 3:42:14 PM
(having a nightmare with my news client(s) so apologies if this appears more than once) Hi All, I have a text file of 12k that I read the first 5 lines of with a StreamReader.ReadLine() in a loop. The streamreader is then passed to another method to read the last bit of text in the file. I t...more >>

Streams seeking and reading not working
Posted by Nevin at 3/11/2004 3:17:03 PM
Hello, I have a text file of about 12k which I read the first 5 lines using a StreamReader.ReadLine() in a loop, all ok. The reader is passed to another function to read the last piece of text in the file and this is where it's going wrong. I'm doing something like: sr.BaseStream.Seek(-200, Se...more >>

Recognizing sender in form event...
Posted by Hyper X at 3/11/2004 2:59:27 PM
Hi, How do I cancel the event out if the sender is a textbox, combobox, checkbox etc in form level event like Form1_KeyPress?? private void Form1_KeyPress(object sender, KeyEventArgs e) { /// /// Figure out if the event is from Form1... and NOT from the textbox... /// Cancel the...more >>

Recognizing sender in form event...
Posted by hyper_x_43 NO[at]SPAM yahoo.com at 3/11/2004 2:47:55 PM
Hi, How do I cancel the event out if the sender is a textbox, combobox, checkbox etc in form level event like Form1_KeyPress?? private void Form1_KeyPress(object sender, KeyEventArgs e) { /// /// Figure out if the event is from Form1... and NOT from the textbox... /// Cancel the...more >>

StreamReaders and position
Posted by nevin at 3/11/2004 2:45:46 PM
Hi, I have a text file of about 12k long. I'm reading the first part of the file with a readline() and it works ok. Then in a different function (same open stream) I want to move to the bottom of the file and retrieve the very last bit of text minus the trailing spaces. I'm doing something li...more >>

controls class
Posted by johnwadeunderwood NO[at]SPAM yahoo.com at 3/11/2004 2:45:26 PM
Hi. In the following code i'm able to find all Label controls in the controls class, I'm looking for a cleaner way to look for control types (not a specifice control).. I played around with the getType() but was not able to figure out a way to do a test against a Label control.. Thanks for any ...more >>

Type of node ?
Posted by C# newbie at 3/11/2004 2:31:55 PM
Hello everybody, in a code as this: foreach (XmlNode xnode in node.SelectSingleNode(txtPattern.Text,nsmgr)) { switch (xnode.NodeType){ case XmlNodeType.Element: MessageBox.Show("This node is an ement"); break; case XmlNodeType....more >>

Arrowkeys in datagrid
Posted by Lasse Edsvik at 3/11/2004 2:10:00 PM
Hello I was wondering if there is a way to select a row in a datagrid if you navigate in it using arrowkeys. i have this onMouseUp, should do the same with arrowkeys: System.Drawing.Point pt = new Point(e.X, e.Y); DataGrid.HitTestInfo hti = dataGrid1.HitTest(pt); if(hti.Type == Dat...more >>

Calling a javascript function from a codebehind
Posted by Jan Eliasen at 3/11/2004 1:57:32 PM
Hi I have an ImageButton on my webpage. It is on a .ascx-page and I have a .ascx.cs behind this file. I need to be able to call a javascript-function in my codebehind. When the user presses the ImageButton, I want something done, and then if this goes well, a certain javascriptfunction should...more >>

How do know the name of the capture in Regex
Posted by Mark Coffman at 3/11/2004 1:26:51 PM
Lets say I don't know the pattern string ahead of time (ie. it might be entered in a form, not hardcoded like below). How can i get the name of the matched groups (in this case "pagetitle")? string pattern = @"<title>(?<pagetitle>.*?)</title>" ; Regex regex = new Regex( pattern, Regex...more >>

Plugin Capabilities???
Posted by Steve at 3/11/2004 1:19:54 PM
Hi I have 2 questions about plugins 1) If I have a form that lists plugins in a menu. Can I design each plugin to place controls on the main form when it is selected that collect data for the plugin??? 2)If I have a series of plugins that act on some data. Is is best to passs the da...more >>

microsoft c# vs Borland c# builder
Posted by Serdar C. at 3/11/2004 1:15:15 PM
i am about to buy a c# program and i dont know which one to buy. what are the advantages of MS c# and borland c# builder? what do we get when we compare these 2 products? ...more >>

How would I convert this struct?
Posted by Angel at 3/11/2004 12:59:33 PM
How would I convert this struct into C#? typedef struct { char rsvd0[4]; struct { //embedded struct char a; } foot; ADDR_REC stack[10]; //This is the continuous problem } ZIP4_PARM; The ADDR_REC looks like this: typedef struct { char detail_code...more >>

Avoiding scientific notation when casting real numbers ToString
Posted by Dennis Myrén at 3/11/2004 12:54:54 PM
Hi. Is there anyway to ensure that a real number always will be casted to it's exact string, and never use a scientific notation? I always want the format eg: 3.435845793478523458 ...more >>

Newbie help with .config
Posted by raykos at 3/11/2004 12:41:09 PM
Hello all Can't seem to get 'System.Configuration.ConfigurationSettings.AppSettings' to work. What I've done thus far, is jus create a windows app called 'WindowsApplication2'. To this app I used 'Add new Item' and added 'Application configuratio file' and named it 'WindowsApplication2.exe....more >>

Assign Arraylist into Arraylist
Posted by Grey at 3/11/2004 12:20:12 PM
i have succeed to assign one ArrayList into another ArrayList, i.e. PcNameVirusDef.Add (Rec[0].ToString()); PcNameVirusDef.Add (Rec[4].ToString()); arPcNameVirusDef.Add(PcNameVirusDef); But when I try out extract back the value, i.e. arPcNameVirusDef[0][0].toString(); I got error....In fa...more >>

C# along with OpenGl and assembly. How to do that?
Posted by Teis Draiby at 3/11/2004 12:15:18 PM
I am generally new to coding. Anyhow I managed to make a rather complex VC++ application containing SSE2 inline assembly and a OpenGl 3D interface. I haven't yet come to friendly user interface in the manual so the application is a nightmare of key shortcuts that I keep forgetting. Instead of ...more >>

unverifiable assembly directx
Posted by Dave Brown at 3/11/2004 12:07:23 PM
Hi all, Can anyone tell me why I would get a Unverifiable Assembly exception when using directx from a IE hosted user control ? Thanks, Dave. ...more >>

God why can't anyone help me???!!!
Posted by Jim at 3/11/2004 11:51:10 AM
I can't beleive that I'm the only one in the world to run into this, especially since it's SO duplicateable and seems to be impossible to overcome once it starts. This is my second post today on this subject, my third post on this issue as a whole, as it's happened a couple of different times now w...more >>

get/set array properties (followup)
Posted by 2fast at 3/11/2004 11:17:35 AM
What I meant in my original post was the following. For example, with an integer variable, I can make a property in the following way: public class MyClass { public int MyProperty { get {...} set {...} } } If MyPrope...more >>

Best Method?
Posted by Steve Wasser at 3/11/2004 11:14:07 AM
I posted this buried in another thread, so forgive me for being redundant. Maybe someone can point me to the right method of doing this. I'm building a web app that a user will enter a date, and will get daily inventory from month beginning to that date. It calculates inventory for 44 differen...more >>

winmm.dll PlaySound
Posted by Joshua Moore at 3/11/2004 11:05:33 AM
Several locations on the web point to using the dll winmm and use PlaySound using the code below. Can't I include the wav files in my project, and change them to embedded resources, then point to the file name as namespace.filename.extension? Thanks, Joshua Moore static extern bool PlaySo...more >>

error CS0583: Internal Compiler Error on change of namespace
Posted by Rob Agar at 3/11/2004 11:05:27 AM
hi all Another compiler error for you - is there a workaround for this one? error CS0583: Internal Compiler Error (0xc0000005 at address 5315C743): likely culprit is 'BEGIN'. It happens when I try to compile after changing a particular class's namespace. If I change the namespace back ag...more >>

HttpWebRequest problem
Posted by Abhishek Srivastava at 3/11/2004 10:55:11 AM
Hello All, I have written a program to download a text file from a web server. The program uses HttpWebRequest Object. My program runs once at 10:00 AM every day. The problem is that the HttpWebRequest object internally uses the browser cache. So when today my program runs, it doesn't d...more >>

AVI Files
Posted by Lou at 3/11/2004 10:43:40 AM
What namespace do I use for Creating/Reading AVI files? -Lou ...more >>

Why does Win32_Logicaldisk accessing take so long time?
Posted by David Lindgren at 3/11/2004 10:38:40 AM
Hello! I am using some code to find out the logical harddrive's serial number. The code I use is the one you see below. By some reason this code takes quite some time to execute. How come? Is there a faster way to do it? Thanks for your help. /David. SelectQuery query = new SelectQuery...more >>

Include
Posted by Manish Agarwal at 3/11/2004 10:32:50 AM
One common use of C++ #include I am looking for including file with using statements. Typically in a big C# program I have to write around 15-20 using statements on the top every file. like- using System; using System.Windows.Forms; using System.Drawing; using blah blah blah If I put the...more >>

[OT] Whidbey delayed
Posted by n! at 3/11/2004 10:18:47 AM
I just saw this posting: http://www.eweek.com/article2/0,1759,1546151,00.asp I suppose this will effect the eta of the public beta (which was hinted previously at June\July)? I *really* wanted to play with generics, there are even a few things I'm holding off doing while waiting for them :( ...more >>

Bind Textbox back to a Dataset
Posted by Mike at 3/11/2004 9:49:06 AM
I have a dataset that has one table retrieving one row and I have that infromation bound to Textboxes. After the information is changed in the text boxes, I am having trouble updating the dataset. All tutorials relate to datagrids or datalists. What steps do I need to do to get the informati...more >>

"static" variable
Posted by Luc Bolly at 3/11/2004 9:12:16 AM
Hi. I would like to create a variable that allows me to count each pass through a function. Ex. class test { static void main () { DoFunction(); Environnment.Exit(0); } static void DoFunction() { //static MyCounter=0; // this line should allow me to creat...more >>

Fuzzy understanding of asynchronous method calls
Posted by I_hate_spammers NO[at]SPAM spammers_suck.com at 3/11/2004 8:09:21 AM
Hi: My understanding of asynchronous method calls is a bit fuzzy. I know they behave similar to threads in a lot of ways, but I'm not comfortable enough with them to feel ok with what i'm doing. right now, I'm envoking a function (function a) asynchronously (the function is OneWay, so as f...more >>

Exposing Synchronization Issues with the Help of Multiple Processors
Posted by charles.e.wood NO[at]SPAM medtronic.com at 3/11/2004 7:58:53 AM
Hi, I'm fairly new to writing multithreaded C# code and read in Mickey Williams book, "Microsoft C# .Net" the following tip in chapter 10: "It's a good idea to invest in a multiple-processor machine if you're developing multithreaded software for commercial use. This test illustrates the ...more >>

little problem with deployment
Posted by dave at 3/11/2004 7:43:34 AM
hello all, I have created a very simple C# console app for an Active Directory extract, thats runs fabuously on my laptop. When I try move this to a server to run, I keep getting interop errors. What is the simple thing I'm missing on my servers, that is preventing me from running it pr...more >>

Refresh screen during a long process
Posted by BuddyWork at 3/11/2004 7:40:47 AM
Hello, I'm looking for away to refresh the current screen while executing a stored procedure that takes (10 minutes to run), because the code is running under a single thread I cannot do this, if I run the stored procedure on another thread then the user can click on process to run the ...more >>

Copying directories?
Posted by Seth at 3/11/2004 7:35:30 AM
Is there an easy way to copy a directory and its subdirectory structure with all the files. I've not found a method that can do this and seems like I'm gonna have to implement a recurssive function that manually copies each file and creates directories as needed. Anyone got any easier or better i...more >>

ArrayList Problem
Posted by faktujaa at 3/11/2004 6:41:05 AM
Hi All Check the following code ClassOne{object objOne;} ClassTwo{object objTwo; ClassOne objClassOne; Now i wud like the know the best way to assign memory to the objClassOne member 1. Assign it in the constructor: Pros: No error if u try to access it by mistake. Cons: Memory i...more >>

Passing a Array into a com object
Posted by darrenmaddock NO[at]SPAM hotmail-dot-com.no-spam.invalid at 3/11/2004 6:40:53 AM
Hello, I need to pass an array into a com object, however not of type object[]. String[] fileList = new String[1]; object xlFiles = new Object(); Any Ideas? :? Posted Via Usenet.com Premium Usenet Newsgroup Services ---------------------------------------------------------- **...more >>

Client (Pocket) Server (PC)
Posted by thiago NO[at]SPAM opra.com.br at 3/11/2004 6:18:35 AM
I´m trying to do an application that has a client in Pocket PC and need to send and get some information with a desktop. Someone could help, me with that? The Pocket would be connected with Active Sync with the desktop. I need, at least, a start point. Thanks...more >>

Newbie Classes & externals
Posted by raykos at 3/11/2004 5:46:06 AM
Hello all Venturing into the world of C# from MFC. One of the things I used to do in MFC was have a library of classes tha I would use over & over again. I could just pick & choose which class I wanted to have in a new project, copy the to the new project folder, add to project, include ...more >>

Overriding Methods
Posted by Gaijin at 3/11/2004 4:51:11 AM
Can you override a method of a class within a class? Example: ======================================> public abstract class A { public abstract void Method1(); public abstract class B { public abstract void Method2(); } } public class C : A { public override ... } ==...more >>

CanUndo not working in Windows XP
Posted by Abhi at 3/11/2004 4:41:10 AM
I am working with C# windows forms. I use CanUndo to determine if something can be undone and then call Undo(). This is working Fine on Windows 2000. But with Windows XP this Functionality is not working Detail Note: I have two RichText Boxes in my application i do something in one and then move t...more >>

Crystal Reports Invalid Sort Number
Posted by T. Labenche at 3/11/2004 4:18:57 AM
Prefernces: VS 2003, CR 9 (not CR for VS), C# Relating to the article: Re: Crystal Reports Sort at runtime issue I tried the code for a multiple column sorting in a report, but i get an error message like "Invalid sort number". Every sortfield (totally 5) is a column of a parent table that...more >>

OdbcDataAdapter and MySQL
Posted by thorsson_mikael NO[at]SPAM hotmail.com at 3/11/2004 2:29:56 AM
Hello! Here are two pieces of C# that connect to MySQL. The first one works, the second one raises an exception on the Fill call. The Open succeeds in both cases. What am I doing wrong? ************* Works: string MyConString = "DRIVER={MySQL ODBC 3.51 Driver};" + "SERVER=localhost;"...more >>

Sorting
Posted by Vanessa at 3/11/2004 1:24:13 AM
I am aware of the fact that C# has a sort option. However, sometimes it is handy to have a sort e.g. to sort a couple of arrays simultaneously. The sort below works fine, except when I change the < sign to a > sign, then one element gets missorted. Could someone please put that right for me? Pl...more >>

Load Assemblies
Posted by BuddyWork at 3/11/2004 12:45:09 AM
Hello, Is there anyway that I can increase performance when my references (.Net assemblies) get's loaded by my application, for example when an user clicks on a button within my application and the assembly reference has not been loaded than it can take up to 5-10 seconds to load it, th...more >>

Classes Hidden from Main...
Posted by agro_rachmatullah NO[at]SPAM yahoo-dot-com.no-spam.invalid at 3/11/2004 12:40:11 AM
Examine this code... using System; class Foo { public int i = 0; } namespace Joe { class Foo { public int i = 10; } class Start { static void Main() { Foo bar = new Foo(); Console.WriteLine(bar.i); // will print 10 ...more >>

richtextbox scrolling by code
Posted by Larry Hilley at 3/11/2004 12:13:06 AM
I have a richtextbox with a large amount of text in it that has scroll bars to control what is in view. I want to find text and then move it into view. How do I control the document in the richtextbox so that when I find something I want it display I can move it into view by code? Thanks!...more >>

add button in Datagrid
Posted by Grey at 3/11/2004 12:08:54 AM
I need to add DELETE button in each row of the datagrid. When user click the button, the row will be deleted out and the beneath rows will be shift up automatically. Is it possible to do that ?? IF so, how to ?? ...more >>


DevelopmentNow Blog