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# > september 2003 > threads for friday september 26

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

Moving a string to char* and viceversa.
Posted by Tim Conner at 9/26/2003 10:19:34 PM
Hi, I am an ex-delphi programmer, and I having a real hard time with the following simple code (example ): Which is the equivalent to the following code ? var chars : PChar; sBack, s : String; begin s := Tim Conner XXXXXXXXX'; chars := AllocMem(20); Move( s[1], chars^...more >>


Socket Send/Receive only works once
Posted by kitchenbin NO[at]SPAM hotmail.com at 9/26/2003 9:51:45 PM
Hi. I am trying to use Sockets to do multiple Send and Receives via HTTP (not simultaneously). A first pair of Send/Receives works fine and sure enough I receive HTML back, but the next Send/Receive pair (even if identically the same as the first pair) returns no data. eg. The following simp...more >>

autoscrollposition and invalidate()
Posted by Jon at 9/26/2003 9:33:35 PM
I am writing a graphics application that supports "zooming". I have implemented some code that forces the zoom to occur around the center of the client window. So, the code recalculates the PageScale, which will be changed when the Paint event is called, then calculates the offset requir...more >>

Problem accessing the newsgroup....
Posted by José Joye at 9/26/2003 9:29:43 PM
Is it only me or does someone else has problem posting/reading news from MS group? On my side, I get news at a really slow rate and the newest I get are already 5 hours old. José ...more >>

Objects and Collections
Posted by Guy Dillen at 9/26/2003 7:53:14 PM
Instead of using DataSets i want to implement an objects collection (in C#). E.g. a class Person and the instances are stored in a collection of Persons. So there is a layer that does the database access and mapping of relatoinal <-> objects. The Persons collections should have all the necessary ...more >>

toolbar
Posted by Trythat at 9/26/2003 6:36:49 PM
Is it possible to tell which button has been clicked, when using the right mouse button (using the mousedown event). I can tell which button using the 'ToolBar_ButtonClick' but I want to tell whether it was a left or right mouse button click. I've searched Google, but surprisingly there isn...more >>

a sorted by field1 then by field2 collection, speed critical, any advice?
Posted by Dan H. at 9/26/2003 6:27:03 PM
Hello, I have an application that requires a collection that is sorted by a double field first, and then by a long field. So, lets say I have an class that has 2 fields called time, priority. I want to put a bunch of those classes into a collection and have that collection always stay sorted...more >>

Threading
Posted by JB at 9/26/2003 6:17:20 PM
I'm wanting a loop that executes threads via BeginInvoke. The user can control the number of threads they want, on the fly. Anybody know a good scheme on how to do this? I was using the Interlocked class to increment when I call BeginInvoke and a decrement when the thread was done, to know wh...more >>



How to execute a C# script from dos ?
Posted by ilPostino at 9/26/2003 4:59:38 PM
Any ideas ? I want a stand alone c# to just run from a command prompt? thanks ...more >>

Search and Replace
Posted by RickN at 9/26/2003 4:23:03 PM
What is the best way to open a file and perform a search and replace for multiple char values. Thanks, RickN ...more >>

Mouse driver for universal and intelligent scrolling behaviour with wheel
Posted by gicio NO[at]SPAM web.de at 9/26/2003 4:21:25 PM
Hi! I develop an application and I need a mouse driver for universal and intelligent scrolling behaviour with wheel. Something like the Microsoft IntelliMouse has. Is something like that anywhere availabel? regards, gicio ...more >>

specifying column to write in ListView
Posted by Vaughn at 9/26/2003 3:56:36 PM
I have a listview with two columns that is supposed to show the contents of two files. I the 1st column, I just display it with listView1.Items.Add ("Test") and a While loop, but how can I tell C# to write in the second Column? Thanks. ...more >>

how to turn a stream to a binary file
Posted by Mullin Yu at 9/26/2003 3:46:41 PM
as subject, what's the normal way to implement? the stream is binary as it may be come from word, images or other objects? ...more >>

Propblem using MS NNTP server.
Posted by 100 at 9/26/2003 3:11:22 PM
Hi everybody, Does anyone has probelms receiving and posting through Microsoft's NNTP server? I trying to find out if the problem is in my newsreader or it is more general. B\rgds 100 ...more >>

Obtaining the working directory
Posted by Tony at 9/26/2003 2:46:17 PM
Guys How do I find the directory that my current application is running in? e.g. if i wanted to find the current working directory of regedit internally (i.e. within the regedit program) it would have C:\Winnt returned. Thanks ...more >>

C# controlling existence of MDAC and .NET runtime
Posted by David Thorzén at 9/26/2003 2:29:22 PM
Hi! Is there anyway to check (in C#) which version of MDAC a client has and which version of .NET runtime a client has installed? /David *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it!...more >>

problem in setting the width of a form to 20
Posted by Paresh Dhakan at 9/26/2003 1:56:48 PM
Hi ! I am facing a wierd problem in setting the width of a form to 20. Suppose I create two forms Form1 and Form2. Form1 is the container, meaning this.IsMdiContainer = true; Form2 is child form meaning, f = new Form2(); f.Location = new Point(200,200); f.MdiParent = this; //Form1 is...more >>

Application Settings
Posted by mevar at 9/26/2003 1:34:50 PM
Hello, I'm using an application file to store my settings.When I compile the project,Visual studio delete the xml setting file(myapplicationname.config) from the directory where it store the executable file.If i copy the file setting after compile, the application doen't see the file. It w...more >>

XML seralization & hexadecimal values
Posted by Damon at 9/26/2003 1:13:01 PM
I'm getting '', hexadecimal value 0x02, is an invalid character when I'm deseralizing XML from a 3rd party XML gateway. How do I get rid of these hexadecimal values before I deserialize? Cheers Damon ...more >>

problem in setting the width of a form to 20
Posted by Paresh Dhakan at 9/26/2003 12:44:13 PM
Hi ! I am facing a wierd problem in setting the width of a form to 20. Suppose I create two forms Form1 and Form2. Form1 is the container, meaning this.IsMdiContainer = true; Form2 is child form meaning, f = new Form2(); f.Location = new Point(200,200); f.MdiParent = this; //Form1 is...more >>

Having a Problem starting an Application from a Service
Posted by Glenn at 9/26/2003 12:40:01 PM
I have used this code successfully in a form application. I tried to add the same code in a service and have not been able to get the application to start. I have the service starting with a local account and the Interact with the Desktop is Checked. Windows media player seems to start but...more >>

VS and doc generation
Posted by styko at 9/26/2003 12:36:52 PM
Is it possible to make VS2003.NET not to generate documentation for a given public class??? Thanks for any help in advance!!! ...more >>

dottifiate
Posted by SvenÅke Andersson at 9/26/2003 12:34:58 PM
Does anyone have any code sample for how to do the dotifiation of a to long filename. I would like to put the path of a filename in the caption of a dialog but if it's to long the end will not be visible. I would like to have the path changed as: c:\a\very\long\path\that\is\not\possible\to\displ...more >>

how do I examine parameters in an exception?
Posted by help NO[at]SPAM work.r.us at 9/26/2003 12:31:58 PM
If I enable debug at C# exceptions, it dutifully breaks and shows me the stack of called procedures. At the top (of my list) is DateTime.ParseExact() and it does through an exception if I proceed. But, how can I examine the parameters to that call to see what it doesn't like? tnx, /steveA...more >>

Replacing strings within a word doc and convert back to byte[]
Posted by Christopher Beltran at 9/26/2003 11:27:49 AM
I am currently trying to replace certain strings, not single characters, with other strings inside a word document which is then sent to a browser as a binary file. Right now, I read in the word file, convert the FileStream into a string using Unicode encoding, then do a replace, then con...more >>

How to...
Posted by Jacek Jurkowski at 9/26/2003 11:23:47 AM
Launch an exe from outside c# application? Access methods of dll file created with c++? Why FolderBrowserDialog stopped me to show folder tree? ...more >>

.Net newbie writing C#-application
Posted by frank NO[at]SPAM langva.com at 9/26/2003 11:22:52 AM
I am an farily experienced developer, but still a newbie on C# and ..Net. I'm planning to write a database-driven web application in C# for training purposes. I am wondering if any of you experienced people out there can point me in the direction of any good places to find templates or good prac...more >>

C# method
Posted by coder5811 NO[at]SPAM yahoo.com at 9/26/2003 10:58:51 AM
Hi, How can you make sure that subclasses cannot override a method. In the java world, the 'final' keyword is used. - thanks...more >>

binary tree and condition parser...
Posted by Daniel Bass at 9/26/2003 10:45:21 AM
Using VC#.Net, I want to take a statement, that loosely follows the rules of an SQL'a "WHERE" statement, and determine whether that statement is true or false. For example: ( ( Head = 'abc') AND ( Type = 'Text' ) ) OR ( Loc = '123' ) I envisioned a binary tree, and using a stack objec...more >>

Legacy Code interface - asynchronous callaback & __pin pointer
Posted by Sai Kit Tong at 9/26/2003 10:44:26 AM
I have to interface managed application with my legacy dll. I have employed the wrapper approach but I have to deal with the asynchronous callback from the legacy dll, which likely goes through a thread other than the initial calling thread. I got the idea from MSDN and other responses from this ...more >>

How to...
Posted by Jacek Jurkowski at 9/26/2003 10:30:17 AM
Launch an exe from outside c# application? Access methods of dll file created with c++? Why FolderBrowserDialog stopped me to show folder tree? ...more >>

cell in ListView - bkgrd color not working
Posted by andrewcw at 9/26/2003 9:52:44 AM
How is it ( or can I ) make each subitem reflect the background color ? In my case the first color is applied across the row - even though I can read the values back out correctly ? Thanks ! snippet can be dropped in intact private void ListViewBroke() { listView.View = View.Details; Ar...more >>

Performance : PrintDocument / PrinterSettings / PaperSizes is very VERY **slow**
Posted by Robert Hooker at 9/26/2003 9:29:35 AM
Hi, I'm curious to know if I'm doing something wrong here, or if this is just mind-numbingly slow for a reason. In a simple WindowsFormsApplication: public Form1() { // Required for Windows Form Designer support InitializeComponent(); PrintDocument printDoc = new PrintDocument(...more >>

Testing for external user
Posted by marc at 9/26/2003 9:28:28 AM
I have a control which uses a server name or ip address as a parameter. I am looking for a foolproof test that I can use in my control to see if the user accessing it is external to our network. If so I will pass the ip, otherwise I will pass the server name. Any help you can offer in the ...more >>

XML serialisation
Posted by M at 9/26/2003 9:27:19 AM
Hi, I have a collection of user defined types called EmployeeCollection which inherits from CollectionBase. EmployeeCollection is a collection of Employee objects. When i serialise the collection, the serialized collection looks like: <ArrayOfEmployee> <Employee> ..... </Employee> </...more >>

How to access struct elements sequentially?
Posted by rbrown NO[at]SPAM allstate.com at 9/26/2003 8:37:58 AM
I would like to be able to access the members of a struct (or class) based on their order within the struct. For example, say I had a struct something like: public struct PhoneTypes { public string work; public string home; public string mobile; } Is there some way I can direc...more >>

adding to "Add Reference" dialog
Posted by Brad Quinn at 9/26/2003 7:44:20 AM
Is there a way to add an assembly to the .NET tab of the "Add Reference" dialog?...more >>

flashing taskbar
Posted by james_crane NO[at]SPAM btinternet.com at 9/26/2003 7:28:45 AM
Hi all! I have written a little Instant messenger application and I want the task bar button to flash when a message is recieved - and herein is my problem - I'm not sure how to make the task bar button flash! Any help woudl be gratefully revieved. Thanks JC...more >>

C# - SQLDriverConnect
Posted by Dale Magnuson at 9/26/2003 6:30:59 AM
Does anyone know what API I need to include to be able to use the SQLDriverConnect function with C#? I was given a code example on how to setup my DSN-less connection and I keep getting a pop-up dialog box to configure my connection. I want to use the SQLDriverConnect function so that I ...more >>

How to run / invoke an application on server.
Posted by Vinay at 9/26/2003 4:04:06 AM
Hi , I am having server and client. Client is a test machine. I want to invoke the application binary which resides on server from client machine. The binary is created using C#. Please note that I know the administrative password for the server. Can some one help? TIA, Vinay...more >>

postback problem in ASP.NET
Posted by Giulio Santorini at 9/26/2003 3:15:39 AM
I've got three controls: a drop down list (ddlClienti) two listo boxes all of them have got autopostback = true when I select a value from the DDL i fill the list box then when I select a value from the first listbox I fill the second list box I've put some code con the: ddlClienti_S...more >>

Error CS0536
Posted by Roland at 9/26/2003 3:15:29 AM
Sorry for Cross-Posting ^O^ Hi All, I'm trying to generate a C# wrapper for a Windows type library using the following command line ... csc /target:library /doc:Interop.MyLibrary.xml /unsafe Interop.MyLibrary.cs >Interop.MyLibrary.log And receiving the following error message ... ...more >>

System.Windows.Forms sizing grip problem
Posted by Andrei Zinca at 9/26/2003 3:06:35 AM
When I resize my window, the sizing grip from the status bar doesn't dissapear. The funny thing is that if i create a graphics object and dispose it before the creation of the status bar everything works fine. Maybe someone can help me with this problem. Thanks! Here's my StatusBar initializ...more >>

Adding characters to a string : Error 'string.this[int]' cannot be assigned to -- it is read only
Posted by jose_groups NO[at]SPAM spamex.com at 9/26/2003 2:41:16 AM
I am attempting to copy a portion of a string into another string. Say I have "abcdef" in string 'a' and want to copy only "bcd" into a new string 'b'. The following function came to mind: public string GetText(string a, int start, int end) { int i; string b; for (i=0;i<(end-sta...more >>

CS0536 Error
Posted by Roland at 9/26/2003 2:30:59 AM
Hi All, I'm trying to generate a C# wrapper for a Windows type library using the = following command line ... csc /target:library /doc:Interop.MyLibrary.xml /unsafe = Interop.MyLibrary.cs >Interop.MyLibrary.log And receiving the following error message ... Interop.MyLibrary.cs(499,18):...more >>

Email Client
Posted by manoj at 9/26/2003 1:11:11 AM
hi, we wrote a small email client which is working sometimes and gives the following exception System.Web.HttpException when it fails The following is the code using System; using System.Windows.Forms; using System.Web.Mail; namespace email { class Class1 { static void M...more >>

End of Line Marker
Posted by KNE at 9/26/2003 12:15:33 AM
I'm writing some code that is formating an output file being generated within a web app. I want to allow the site administrator to configure the characters that will mark the end of each line/record in the file. Therefore, I added a key to my web.config appSettings section similar to the follow...more >>


DevelopmentNow Blog