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 monday june 14

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

HTTP Requests and Posts
Posted by Richard Beacroft at 6/14/2004 11:43:54 PM
Hi, I was wondering if anyone has seen an example of how one can send an HTTPWebRequest, passing in a schema to define what information your sending and <b>have an application, aspx? file retrieve the information, process the request and send a response</b> Kind Regards, Rik...more >>


WM_PAINT question...
Posted by Kevin Dombroski at 6/14/2004 11:40:10 PM
Howdy - I would like my application to be able to read data from another application. Specifically, I would like my to get the text from the "client area" of another application's window whenever it's processing a WM_PAINT message? Can I do that? I've been searching around MSDN and Google, bu...more >>

Capture cursor location in a TextBox
Posted by Shane Poppleton via .NET 247 at 6/14/2004 10:17:17 PM
I am trying to capture the current line and current column position in a text box, i have successfully created a function that returns the line and column number for display in the status bar e.g. "Ln 2 Col 5", but when do i fire it, i at first tried the TextChanged event, but unfortunately the lin...more >>

Setting "User Cannot Change Password" Flag from ASP.NET/C#
Posted by John Beard at 6/14/2004 9:06:47 PM
I downloaded the attached code from MS. It flips on the "User Cannot Change Password" on a user in AD and works great from a console or windows app, but when put into an ASP.NET app I get a "The security ID structure is invalid." error when trying to assign the new security descriptor. I am ru...more >>

How can i open a new form in center of the screen?
Posted by Benny at 6/14/2004 8:50:24 PM
Hello Experts, Currently I am working on a windows application using vs.net 2002. Assume I have two forms, form A and B, where form A is the main form. In form A, I have a button which will load form B when click. The question is how can I open form B in the center of the screen? Thanks...more >>

Multiple windows services - query
Posted by Sachi at 6/14/2004 8:41:01 PM
Hi, I have a requirement were there will be some 3 windows services will be there. But I want only one of this service to hold the control of start, stop and pause features of all this three windows service. Does any one had this kind of sample?Or clues on how to go with this? currentl...more >>

Socket Collection
Posted by Paul W at 6/14/2004 6:18:29 PM
I have a socket-based app running that spawns a different socket for each user and I was looking for a way to optimize it a little better. Currently I keep a collection of active sockets (300 - 400). My plan was to capture the Socket IntPtr Handle when they connect and then each time I needed ...more >>

Converting sbyte[] to byte[]
Posted by Darrel at 6/14/2004 5:27:01 PM
I am using binary writer to write an array of bytes to disk. However, my data starts out as an array of sbytes. I am currently type casting each array element in a for loop. Is there a faster method for converting an array of sbytes to an array of bytes? Thanks, Darrel...more >>



correct overloaded version for Activator.CreateInstance? I am getting "Constructor on type xxx not found."
Posted by hazz at 6/14/2004 4:30:37 PM
Is Activator.CreateInstance(t,BindingFlags.Public | = BindingFlags.InvokeMethod | BindingFlags.CreateInstance, null, args, = null) appropriate given the following; ************************************** public interface IPasswordProvider { string GetPassword(Token token); }=20 publ...more >>

Viewing your site in Netscape and Mozilla
Posted by Maziar Aflatoun at 6/14/2004 4:22:45 PM
Hi everyone, I just wrote a complete shopping cart using DataGrids...etc with capability to edit each item etc. However, the textboxes become their default size when viewed in Netscape/Mozilla. I thought VisualStudio .Net automatically takes care of that. Any suggestions? Thanks Maz....more >>

Command Line Application
Posted by Bill English at 6/14/2004 4:15:01 PM
Is there a way I could run the MS ping application in my application... without the command prompt appearing? -- I am a 14 year old C# developer, I am completely self taught, so please don't get mad if I ask a stupid question. Thanks....more >>

Integer to Hex
Posted by Al Sav at 6/14/2004 3:10:02 PM
Hi, I want to convert an integer (actuallu the ascii value of a character) to its equivalent Hex value. Can someone suggest, which is the easiest way to do it. Thanks in advance, Al....more >>

Scope in Winforms problem
Posted by Patrick at 6/14/2004 3:07:01 PM
I want to access an object that is instantiated in the frmMain method from within a static method. When I try to access this object, I get errors that state "Object reference not set to an instance of an object." I know this is a scope problem, but I don't know how to solve it. My application...more >>

How to get list box horizontal scroll bar object
Posted by Valerie Hough at 6/14/2004 3:02:22 PM
How do I get at the object associated with a horizontal list box scroll bar? I looked in MyListBox.Controls collection and in MyForm.Controls collection. ...more >>

Filling a multi-dimentional array
Posted by rkmoray NO[at]SPAM aol-dot-com.no-spam.invalid at 6/14/2004 3:01:44 PM
I have created a Multi Dimentional array, but having problems filling it. int mCount=0; mCount=ds.Tables[0].Rows.Count; string[,,] arrayppsa = new string [mCount,1,1]; DataTable myDataTable=ds.Tables[0]; foreach(DataRow myDataRow in myDataTable.Rows) { //Tried thsi to fill, lots o...more >>

Newbie: How to get the handle of a TreeNode
Posted by Jeff at 6/14/2004 2:38:10 PM
IDE: Visual Studio 2003 .Net OS : XP Pro Is there a way to get the handle to a specific node in the treeview based on the value of TreeNode.Tag, without having to travarser through the tree??? to solve the problem, I am trying this (I don't yet know if this is the correct approach): T...more >>

Basic Concept Question Why Interface?
Posted by john_20_28_2000 NO[at]SPAM yahoo.com at 6/14/2004 2:37:38 PM
Consider: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbconwhenshouldiimplementinterfacesinmycomponent.asp // Code for the IAccount interface module. public interface IAccount { void PostInterest(); void DeductFees(IFeeSchedule feeSchedule); } class ...more >>

Sending different number of parms to form constructor
Posted by VM at 6/14/2004 2:13:09 PM
I have a Windows form that may be called with two parameters or three parameters (depending on who's invoking the form). The form was programmed so it received three parameters. How can I create an instance of the form with just two parms? The third parameter is a System.Drawing.Point that is on...more >>

Using the FtpCommand function in wininet.dll
Posted by gbala NO[at]SPAM lutron-dot-com.no-spam.invalid at 6/14/2004 2:05:05 PM
I am writing an FTP client in C# with the help of the functions available in wininet.dll. I was able to get everything to work except the use of the "FtpCommand" function. Basically I am trying to issue the "ALLO" command to a server, but the ALLO command is not availabe in wininet.dll. There...more >>

Get the class member list
Posted by Just D at 6/14/2004 2:05:00 PM
Hi, Does anybody know is it possible to get the list of the public members of the class during run-time using some trick if the class is, say, unknown or I just want to write some universal method regardless of the members of the class and their quantity? Thanks, Dmitri ...more >>

"Cannot control <service name> service on computer '.' " using ServiceController...
Posted by Maksim Chepel at 6/14/2004 2:04:19 PM
I'm trying to use ExecuteCommand method of System.ServiceProcess.ServiceController in my C# service controller app to make a custom call to my service. I'm getting this exception and my service never gets my custom message code? What's wrong? Permissions? Can ServiceControllerPermission help so...more >>

Anchoring a Button on a Webform
Posted by Brian Conway at 6/14/2004 1:53:20 PM
I have a webform that I have a datagrid on that I want a button at the bottom of the grid to maintain its position with the datagrid, if the grid grows large then button needs to move down with it, and if it is smaller it needs to move up. Everything regarding anchoring that I have found is with...more >>

Are compiler #Pragma equivalents supported in C#?
Posted by Gary James at 6/14/2004 1:51:08 PM
I'm looking for a way to suppress the CS0659 compiler warning message about class overrides Equals but does not provide a GetHashCode() override. In C++ VS allows this through the use of the #Pragma statement. Does VS.NET have the equivalent? Gary ... ...more >>

SQL command parameters Advantages of?
Posted by Mark at 6/14/2004 1:45:33 PM
Hi all, a quick ADO.NET question in regards to the command object. What are the advantages (if any) of specifying command parameters when executing a stored procedure over just calling the stored procedure via dynamic SQL? // Pseudo code below using dynamic SQL private void InsertPerson(strin...more >>

Datatable - can we join data
Posted by skrishnan NO[at]SPAM snet.net at 6/14/2004 1:21:30 PM
I have 2 tables each having a date in column1 and value in column 2. I would like to extract out the common date entries from the 2 tables. Ideally I would do a join in SQL, how do I do something like that in datatables/dataviews etc. regards...more >>

RegExp to strip accents while ignoring case
Posted by Jon Maz at 6/14/2004 1:19:59 PM
Hi All, I want to strip the accents off characters in a string so that, for example, the (Spanish) word "práctico" comes out as "practico" - but ignoring case, so that "PRÁCTICO" comes out as "PRACTICO". What's the best way to do this? TIA, JON --------------------------------------...more >>

View a WinWord Doc in a WinForm
Posted by John Mark Howell at 6/14/2004 1:06:47 PM
Does anyone know how I could view a WinWord Doc in a WinForm (other than convert to RTF or HTML)? I cannot convert it to RTF because I have drawn lines and they will not come through when converted to RTF. I would rather not convert to HTML because of the ease in changing the format (doc will ...more >>

C# and Access Query
Posted by Chris at 6/14/2004 12:42:24 PM
New to C# and can't quite figure out how to write my update query correctly...(this is actually ASP.NET using C# trying to work with Access - wasn't sure where to post) UPDATE customer SET last_name = "" + txtLast_Name.Text + ""; Access needs quotes around it's strings. I can't figure ...more >>

File Dialog Question
Posted by George at 6/14/2004 12:31:59 PM
Hi, I need to create a delete file dialog that is similar to open file dialog. Is there a way to do this? Thanks ...more >>

Right click on treenode
Posted by Sean at 6/14/2004 12:21:55 PM
Hi, I have a treeview and user can right click the treenodes, depending on the nodes, different shortcut menu will appear. I want only the shortcut menu to appear if the point of the right mouse click is within the label text of the treenode instead of row-wide. I solved this proble...more >>

DataTable questions
Posted by skrishnan NO[at]SPAM snet.net at 6/14/2004 12:11:19 PM
I am populating date and time into a date time, this is for a intra day price series. Would you recommend that I use "string" data type for both date and time. Also how do I query prices for a given date, I did DataRow[] rows = dt.Select("priceDate = 6/1/2004","priceValue"); Could someone ...more >>

Recent applications
Posted by Big D at 6/14/2004 12:05:16 PM
Does anyone know if there is a place where you can see the most recent applications that have been run in xp? Does this get written to any kind of log? Tnx, D ...more >>

CLR Inclusion
Posted by Guadala Harry at 6/14/2004 11:58:40 AM
Which Windows operating systems and service packs include the CLR? ...more >>

Scroll bar
Posted by [Yosi] at 6/14/2004 11:58:01 AM
can I read and or modify the scroll bar location(value) in data grid?...more >>

Object Casting Question
Posted by Andrea Williams at 6/14/2004 11:52:37 AM
I have two objects and one inherits the other and adds a few more properties. Say I populate the first object with the properties, then want to cast it to be the second object, then I would be able to add the extra propety value proerties and save the data based on the new object. Example: O...more >>

as usercontrol or as form
Posted by Jason at 6/14/2004 11:22:24 AM
Hi I would like a user control/form that can be either called as a dialog (ShowDialog) or embedded in another form (usercontrol). preferably, my dialog/usercontrol accepts an argument that specifies which mode it should be, i.e. embedded or dialog... what is the best way of accomplishing ...more >>

Newbie: 2 questions associated with treeview/treenode
Posted by Jeff at 6/14/2004 11:01:41 AM
IDE = Visual Studio 2003 .Net OS = XP Pro ********************************** treeviews: Below is an illustration of a treeview with som data... ? Root ? .Net ? C# When I run treeView1.Nodes.Count against the treeview example above I get the value 1. But I thought I ...more >>

Calling base for an inherited method?
Posted by Dave Veeneman at 6/14/2004 10:47:47 AM
I'm using inheritance more than I used to, and I find myself calling a lot of base class methods. I generally call a base method from a dreived class like this: this.MyMethod(); I'm finding it somewhat confusing when I look at the code later, because I expect to find a method called...more >>

OOP Question
Posted by Mike at 6/14/2004 10:33:37 AM
Hi, I have always developed in VB, and I usually end up programming all = events and related methods in the form (if I have a GUI application). I = was thinking whether there is a better way of doing this, which is also = more OOP. By reading a Java book, the author said that in Java it is =...more >>

kernel actions???
Posted by Bad_Kid at 6/14/2004 10:10:23 AM
example: want to make 4 buttons on form that represents mouse (move left; right; up; down) - how to process message (button_pressed) to the kernel of windows to move mouse on screen??? (same thing with keybor input? how to perform keybord key_pressed inside the program? (link / idea/ arti...more >>

Looping through a Datagrid
Posted by Brian Conway at 6/14/2004 9:59:57 AM
I desperately need some help in coding how to have a completely ediable datagrid be able to loop through each row and insert into a database table. I am using a stored procedure in the database to do the insert, so I think I just need to figure out how to get it to loop through all the rows on th...more >>

C# and SQL server problem
Posted by mostafa atalla at 6/14/2004 9:56:13 AM
Dear sirs: I'm making an application using C# and i connect through it to a database made by MSSQL server but i have a problem when inserting or updating in the database in arabic that each arabic letter is replaced by a question mark (?) the code i'm using to insert is oleDbDataAdapter1.In...more >>

re.Pattern = "\<p>(.[^\[]*)\<\/div>"
Posted by Bill Yin at 6/14/2004 8:57:13 AM
what's mean? ...more >>

StreamWriter.Write(bool value) --- How many bits/bytes should end up in the file?
Posted by johnfofawn NO[at]SPAM hotmail.com at 6/14/2004 8:03:03 AM
Hi, I need to write out bits that I receive from another process. These are boolean values. I need there to be 8 bits in every byte. I know I could write these bits out as char's using one bit per byte, but that would be space-inefficient. I'm using od (octal dump) to look at a file produce...more >>

How to get datacolumn content to string
Posted by Webgour at 6/14/2004 7:32:45 AM
How to get datacolumn content to string ...more >>

xml serialization
Posted by rjn rjn via .NET 247 at 6/14/2004 7:18:39 AM
Hi I'm using XML Serialization for serializing an object=2E I read a= set of records from the database and populate the members of the= object if the value is not null=2E eg=2E, I have an Employee object= which has its members Id,name and address=2E If the Id is not null= then I will pop...more >>

DLL Import
Posted by [Yosi] at 6/14/2004 6:36:01 AM
Hi, I have a general DLL "genDLL.dll",this dll open other dlls by calling generalDll.openDll("dll1.dll"). I mad a form with got dll name in new,and then this for open the new dll by calling the openDll function. the problem is when I make more than one instance of this Form from MDI the All for...more >>

Question on processes 'n' threads #2
Posted by Beeeeeeeeeeeeves at 6/14/2004 6:29:02 AM
Hi I have a service which starts extra threads which take a long time, this is so it can respond to events while long processes are running. I was just wondering, a) if an exception is thrown in a worker thread and it is unhandled, does it bring the whole application down or just the worker t...more >>

Question on processes 'n' threads #1
Posted by Beeeeeeeeeeeeves at 6/14/2004 6:26:02 AM
HI, I am using Process.RedirectStandardOutput to read the output of a console process, quite successfully. (I am basically just doing "cmd.exe /c dir *.csproj /s /b" to list out all the .csproj files), however, instead of appending >textfile.txt to the end, I can use a StreamReader to read the data...more >>

Improve Performance of UI
Posted by Michael C at 6/14/2004 5:44:46 AM
Anyone have any hints on improving the performance of C# UI? I'm filling a TreeView and ListView with information returned by a SQLDataReader and information read from the Registry. I'm working on improving the SQL Query execution speed, but have no idea how to improve Registry-reading perform...more >>

Inheriting SimpleWorkerRequest
Posted by suresh NO[at]SPAM dynu-dot-com.no-spam.invalid at 6/14/2004 5:06:12 AM
Hi all, I'm trying to inherit the SimpleWorkerRequest class but cant able to do so. I'm getting an error called "System.Web.Hosting.SimpleWorkerRequest.SimpleWorkerRequest()' is inaccessible due to its protection level" I tried my dervived class with public,internal and private acces-sp...more >>

sending mail
Posted by mostafa atalla at 6/14/2004 5:05:01 AM
how to send email by MS outlook express using C# code ...more >>

ListBox
Posted by mostafa atalla at 6/14/2004 4:44:01 AM
please , can any body help me ... I was making an application using c# to retrieve from and update a database , I created two ListBoxes ,ListBox 1 is linked by a table column in the database ,and add the selected values from it in ListBox 2 the code : listBox2.Items.Add(listBox1.SelectedIt...more >>

Elliptical
Posted by suresh at 6/14/2004 4:28:34 AM
Hi All, How to select a Elliptical area from an image in .NET. regards Suresh...more >>

Some quetions
Posted by Mohammed Abdel-Razzak at 6/14/2004 3:35:19 AM
Dear sirs I`ve some questions to ask concerning C# 1) I`m making my DB using MS-SQl server and connecting to it using C# when I try to save data in the SQL server it saves it appending spaces to its end and so when I try to search for some value in my tables I don`t find it, because it i...more >>

sprintf convert help
Posted by William Stacey [MVP] at 6/14/2004 3:26:26 AM
If val is a long, what is the String format conversion of this in c#? TIA! sprintf(retbuf,"%d.%.2d", val/100, val%100); -- William Stacey ...more >>

96 bit binary to hexadecimal conversion
Posted by adbatra NO[at]SPAM hotmail.com at 6/14/2004 2:38:57 AM
hi i want to convert a 96 bit binary number into a hexadecimal number. e.g binary number= 001100010001010000100101011110111111010101110100010110000101011000101010000000000000000000000000 how can i do that in C#. also i want to convert a hexadecimal number (24 digits) into a binary numbe...more >>

How to define void variable
Posted by [Yosi] at 6/14/2004 2:30:01 AM
Why I can't define a void variable ,and how I do that. I waht to define an array[] but I mallock it severals of times and each time with deferent type : byte and word and Duble word. how can I do that? void [] array; got error...more >>

dataGrid1_KeyPress
Posted by [Yosi] at 6/14/2004 2:27:01 AM
Why the following dataGrid1_KeyPress dataGrid1_KeyDown events doesn't generates ...more >>

Finding the HEX value of a file
Posted by Jonny at 6/14/2004 2:12:01 AM
Hi all, I need to find out the hex value of a file. Is this possible? I need to be able to quickly access and confirm its extension against its file type (which is as far as i know defined by its hex value). Thanks, /Jonny...more >>

Get the value of indeces in CheckedListBox
Posted by 0582 at 6/14/2004 2:09:01 AM
Dear helpers, how do I get the value indeces of items checked in CheckedListBox? I have tried to do this but It doesn't seem work?? foreach(int index in caseIssuesCheckedListBox.CheckedIndices) { for (int i = 0; i < caseIssuesCheckedListBox.Items.Count; i++) { if(caseIssuesCheckedList...more >>

ToString()
Posted by [Yosi] at 6/14/2004 12:57:01 AM
in C/C++ I can use printf("%0.2X",t) to add mack the output wit to parameter, for example if t = 0xA after printf I will get 0x0A. How can I do that in C#. I want to print a hexa number but to be 4 carecters 0x000A insted of 0xA. and also I want to print a bin number but to be 8 carecters 000010...more >>

DataView Question
Posted by james_morris1232000 NO[at]SPAM yahoo.com.au at 6/14/2004 12:24:09 AM
code: public void Initialize(short [] A1, string [] A2,short [] A3, short [] A4, short [] A5, short RecNo) { DataTable myTable = new DataTable("myTable"); DataColumn colItem0 = new DataColumn("aaa",Type.GetType("System.String")); myTable.Columns.Add(colItem0); DataColumn colIte...more >>


DevelopmentNow Blog