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 2005 > threads for sunday march 27

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

Help with PictureBox and graphics
Posted by Keith Smith at 3/27/2005 11:53:39 PM
I am making a program that needs to put a copy of a certain small image wherever the user clicks with the mouse. I am using a pictureBox as my main area (although I can change this if necessary). How can I paste my image in various places on the pictureBox? I thought it might be something...more >>


C# & GC
Posted by Maxim Kazitov at 3/27/2005 11:05:58 PM
Hi, I create application which transform huge XML files (~ 150 Mb) to CVS files. And I am facing strange problem. First 1000 rows parsed in 1 sec after 20000 rows speed down to 100 rows per sec, after 70000 rows speed down to 20 rows per sec ( I should parse ~ 2 500 000 rows). For me it ...more >>

How does this Regex work? -- Example from msdn.
Posted by Ryan Learns Sharp at 3/27/2005 10:43:03 PM
It is used to match a url: Regex r = new Regex(@"^(?<proto>\w+)://[^/]+?(?<port>:\d+)?/", RegexOptions.Compiled); My question is , what does the pair of '?' mean? Since [^/]+ will match all the tokens except the '/' token, which means it will also match the port, how does this pair of '?' ...more >>

Emailing using SMTP
Posted by Ganesh at 3/27/2005 10:23:02 PM
Hi All, Right now I am bogged down by an error message which I am not able to fix as there are no straight forward solutions to be found in the Internet. I thank you all in advance for your precious time. I apologize if this is not the correct place to put my query. I have an ASP.Net (...more >>

windows service automatic but don't start
Posted by Tom at 3/27/2005 9:45:54 PM
Hi I've created a windows service and it is set to run under local system account. But after its installed and after reboot when I check in the services its still sitting there and have not automatically started ? but next to it the start mode does say 'automatic' instead of manual. so h...more >>

Detective work on Application.Idle event.
Posted by Frank Rizzo at 3/27/2005 9:31:59 PM
Hello, I have a dozen 3rd party controls on my form. I am trying to detect when the application is idle. But even after the mouse and the keyboard are no longer moving, something is still triggering the Application.Idle event. There are no Timers on the form (i removed them all after r...more >>

Why can't cast
Posted by ad at 3/27/2005 6:10:19 PM
I have a field name SexID, it store 1 for male, 2 for female. I want to present male/ female in the DataGrid. I convert the field to a template column and then use a tmeplate expression like this: <%# ( (int) DataBinder.Eval(Container,"DataItem.SexID")) == 1 ? "male" : "female" %> Bu...more >>

Sinking Events and handling synchronization in a worker thread proc. (RESEND)
Posted by Bill Davidson at 3/27/2005 5:30:56 PM
(RESEND: I added a little more code to the sample for clarity) Hello All: I've got a question about synchronization requiremements in a C# worker thread procedure that, among other things, sinks events from outside sources. I realize the worker thread will be interrupted to handle an inco...more >>



Sinking Events and handling synchronization in a worker thread proc.
Posted by Bill Davidson at 3/27/2005 5:06:39 PM
Hello All: I've got a question about synchronization requiremements in a C# worker thread procedure that, among other things, sinks events from outside sources. I realize the worker thread will be interrupted to handle an incoming event (and the flow of execution subsequently diverted to the ...more >>

Why all Female
Posted by ad at 3/27/2005 4:47:57 PM
I convert the field to a template column and then use a tmeplate expression like this: <%# (DataBinder.Eval(Container, "DataItem.SexID"))=="1" ? "Male":"Female"%> Why the value always equal Female (This method is from Rick Strahl) ...more >>

chat
Posted by mark at 3/27/2005 4:24:42 PM
What's the logical way to build a .NET based chat program? .NET Remoting? MSMQ? Something else? Thanks in advance. Mark ...more >>

Can't use delegate in attribute
Posted by Paul E Collins at 3/27/2005 4:11:25 PM
Hello. I want an enum where each member corresponds to a method call - which seems reasonable enough. I tried something along these lines: internal class MyAttribute : Attribute { public delegate void MyDelegate(int i); MyDelegate m_d = null; public MyAttribute(MyDelegate d) ...more >>

How do you call a method common to several user controls?
Posted by Byron at 3/27/2005 2:27:01 PM
I have several user controls that have a few methods in common, such LoadFromForm() which populates an object from controls on the form. I want to call that method from the form in which the control is contained regardless of the type currently displayed without having to use a huge switch ...more >>

Which socket to use?
Posted by Joachim at 3/27/2005 12:07:03 PM
This is the code example on the MSDN page for the Socket.BeginReceive function: allDone.Set(); Socket s = (Socket) ar.AsyncState; Socket s2 = s.EndAccept(ar); StateObject so2 = new StateObject(); so2.workSocket = s2; s2.BeginReceive(so2.buffer, 0, StateObject.BUFFER_SIZE,0, ...more >>

Memory Streams and Struct Pointers Revisited
Posted by _TR at 3/27/2005 12:04:49 PM
I love C# and I've been porting a lot of my older C++ code, but there is one app that I haven't quite figured out yet. I suppose I could re-engineer the app from the ground up, but I've already accumulated a lot of data files, so the format is set for now. Basically, the data format consists ...more >>

System.InvalidCastException
Posted by Kini at 3/27/2005 11:44:00 AM
Howdy! Code ----- string dtsSearchReq =""; while (myReader.Read()) { for(int j=0;j<myReader.FieldCount;j++) { if (myReader.IsDBNull(i)) dtsSearchReq += myReader.GetString(i); } } Background ---------- In the above code, I am using an OdbcDataReader to read the fields of ret...more >>

VB.NET to C#
Posted by freddie at 3/27/2005 11:07:27 AM
Guys; could someone please tell me the equivalent for the Static keyword in C# public function testFunc() as Integer '---------------------------------------- ' Is it possible to do this from inside ' the function in C# Static Dim count as Integer = 0 coun...more >>

pdf to jpeg
Posted by smilly at 3/27/2005 9:31:07 AM
I need a way to convert just the first page of a pdf document to a jpeg using C# so I can thumbnail these out is there something free that will allow me to complete this task?...more >>

Overriding Controls
Posted by Deepesh at 3/27/2005 9:29:02 AM
Good day, I need to override many different types of controls: RichTextBox, Image, TextBox, among others. I'm override just a few event handling methods for them so they all have common event handling code. Basicaly I'm just adding some event handling code that allows the control to be drag...more >>

Problem with named groups using Regex
Posted by Edgardo Rossetto at 3/27/2005 8:30:36 AM
Hi, I have something like: string result = null; try { string exp = @"(?'GroupName'<title>.*\(([0-9]{4})\).*</title>)"; Regex r = new Regex(exp); result = r.Match(html).Groups["GroupName"].Value; return result.Trim(); } catch { return result; } The problem is that in theory G...more >>

Accessing Window Components in C# using Literal names
Posted by Bluelace at 3/27/2005 7:53:03 AM
I have a screen which has as number of textboxes on a screen which I wish to initialise using a loop. The textboxes are named textBox1, textBox2 etc. I hoped I hoped that I could address the component as I could in Java, VB6 or JavaScript in the folllowing manner : for (int x = 1; x < max;x...more >>

comboBox value
Posted by juli jul at 3/27/2005 7:31:09 AM
Hello ,I am trying to get the comboBox value but when I am writing: MessageBox.Show(this.comboBoxdb.SelectedValue.ToString()); I get the following result: System.Data.DataRowView instead of the selected value . Why? *** Sent via Developersdex http://www.developersdex.com *** Don't just ...more >>

MSMQ best practices
Posted by Przemo at 3/27/2005 4:07:01 AM
Hi, I want to send messages from one application to another, working on 2 different computers in a no-domain enviroment using private queues. Am I to place queue on the source or on the destination machine? What is the best practice in scope of reliability and cases when one of the computers...more >>

preferred way to access mainform
Posted by Wilfried Mestdagh at 3/27/2005 1:59:06 AM
Hi, I need to access some components on my main form. I found out that making a static public variable it is accessible. It has to be from several forms, so I dont want to pass a reference of main form to all of them. Is thsi a preferred way of coding ? partial class Main: Form ...more >>

comboBox datasource
Posted by juli jul at 3/27/2005 1:47:21 AM
Hello I want to add data to comboBox from a dataset and doing it this way: public OpenDatabase(DataSet ds_db) { this.comboBox1=new ComboBox(); this.comboBox1.DataSource=ds_db.Tables[0]; this.comboBox1.DisplayMember = "name"; InitializeComponent(); } if I am erasing the...more >>

Wite and Read to same file ERROR ?
Posted by Sharon at 3/27/2005 12:53:05 AM
I'm using StreamWriter to write to file and at the same time I'm using the StreamReader to read from the same file. Doing that cause an exception when I'm trying to create the StreamReader when the file is already opened fro writing by the StreamWriter. How can I write and read at the same t...more >>

Quick GDI+ question..
Posted by Brian Basquille at 3/27/2005 12:00:00 AM
Hello all, Just a quick GDI+ related question for you all. I've three ellipses being drawn in my game. I'm trying to smoothen the edges of them out using anti-aliasing. Why is it that my puck (and neither of the paddles) is only looking like it's been affected by this anti-aliasing, even th...more >>


DevelopmentNow Blog