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# > february 2004 > threads for friday february 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

setting focus
Posted by BillyAnalog at 2/20/2004 10:00:57 PM
I am a newbie to c sharp and I have a problem ! I am trying to set focus on my textBox1 after I click on a button in my form. now in Delphi I Do this with Edit1.Text := setfocus; but in c sharp?? ...more >>


SqlDataReader Type Conversion
Posted by T!LT3D at 2/20/2004 9:44:00 PM
Hi I'm trying to convert data automatically from a SqlDataReader into the correct type for its class property, it goes something like this but is reported syntactilly incorrect.... MyField = (_sr.GetFieldType(i))_sr.GetValue(i) ....it complains at the second _sr (; expected), is there a n...more >>

SNMP Trap
Posted by Bennett F. Dill at 2/20/2004 8:28:58 PM
Hi I'd like help writing a c# console app that can send an SNMP trap. I've seen some documents on writng an SNMP server, but I don't want to receive traps, I only want to send them. Thanks Ben ...more >>

C# Support for ZIP Format
Posted by PeteZ at 2/20/2004 7:14:20 PM
I have a job to create a .ZIP file in C# - I need to create, add files, remove files and be able to view contents of ZIP files using C# etc I have been hunting round for some inbuilt support for the .ZIP format in ..NET bt come up empty I know of some 3rd party products out there but if I we...more >>

strings in .Net
Posted by Miki Watts at 2/20/2004 6:40:00 PM
Is there someting in .Net that is equivalent to the std::string ? i.e. can contain several null characters and dynamic in size. The string object in .Net is Null terminated, so it can't function like that, and byte arrays are fixed size. Miki ...more >>

Combobox in propertygrid?
Posted by Daniel at 2/20/2004 6:38:31 PM
How do I use a combobox in a propertygrid without using enum ? Any suggestions? ...more >>

TraceListener issue
Posted by Mullin Yu at 2/20/2004 6:00:52 PM
i have a problem with TraceListener. when i close the FileStream, i will have the error: "Cannot access a closed file" but, if i remarks the statement => no closing the FileStream, i will have another error: "The process cannot access the file "C:\MyAppsTraceLog.log" because it is being used...more >>

Conversion problem object to array
Posted by wolfgang.baldauf NO[at]SPAM avp-engineering.de at 2/20/2004 5:52:47 PM
Hi there, I use a Custom OPC interface. Aftre reading multiple data I get an object which includes an array. But in design time this is only declared as object (OPC definition, can not change this). I want to assign this object to a DataRow of the same size. The size is fixed. I tryed to assi...more >>



blob or store documents
Posted by Selen at 2/20/2004 5:26:25 PM
which one is good blob or store documents on the server???? Thanks ...more >>

é writing out from a streamreader??
Posted by Jason Gleason at 2/20/2004 4:36:20 PM
I'm having a problem with the streamreader class. When i read out of a file, characters like é are taken out when i do readline. Why does this happen? When i switch the encoding to ascii, it replaces those characters with a question mark. How do i get them to read correctly from a file? So the c...more >>

HttpWebRequest & HttpWebResponse in Windows forms apps
Posted by Mark Rae at 2/20/2004 4:31:12 PM
Hi, Can anyone please tell me if it's possible to use HttpWebRequest and HttpWebResponse in a class in a Windows application? I've tried referencing System and System.Web but there's still something missing. Any assistance gratefully received. Best, Mark Rae ...more >>

DESCryptoServiceProvider used to encrypt a 64 length string, funny output
Posted by admin NO[at]SPAM csharpfriends.com at 2/20/2004 4:21:39 PM
When I run the below method with a 64 character string as input such as: sr.Encrypt("1234567890123456789012345678901234567890123456789012345678904444"); I get square boxes as my output, which means that some characters are not being mapped in the encodings. What could be the problem? Si...more >>

Help with Random Password Class (From VB.NET to C#.NET)
Posted by learning_csharp at 2/20/2004 3:47:13 PM
Can someone help me convert this to c# ---------------------------------------------------------------------------- ----------- Public Class ResetPassword 'Constants associated with check boxes Private Const PASS_UPPERS As String = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" Private Const P...more >>

C# Compiler generating "internal errors"
Posted by David Sworder at 2/20/2004 3:18:34 PM
Consider the following line of code (it's not important what it does): resp.DocItem=Relations.SelectDocItems_BySearchString(req.SearchPhrase); It turns out that this line is in error. The property 'DocItem' should be 'DocItems.' The problem is that instead of notifying me of where the problem...more >>

for loop does not seem to work
Posted by hdiggs NO[at]SPAM star-telegram.com at 2/20/2004 3:07:22 PM
what the heck am I not getting. This little snipet doesn't do what I thought it was going to do. Can anyone tell me why? I expected 2 Hello: 102 All I get is the 2. I had been trying to iterate though a list that was not working... please help! int cnt = 0; cnt = cnt + 1; cnt = c...more >>

Access denied problem
Posted by Chuck at 2/20/2004 3:03:49 PM
Here is a sanitized copy of the compiler warning: H:\xxx\xxxLib\obj\Debug\xxxLib.pdb: The file 'H:\xxx\xxxLib\obj\Debug\xxxLib.pdb' cannot be copied to the run directory. Access is denied. Can anyone explain what is happening? Chuck ...more >>

OleDb Question
Posted by penguinrelief NO[at]SPAM yahoo.com at 2/20/2004 2:49:51 PM
Hi.. I'm making a OleDb connection to a access database.. I can fill the dataset fine and view the data, but when I add a new row and try to update the db I get this error. Any help would be appreciated.. Error: An unhandled exception of type "System.Data.OleDb.OleDbException' occurred in sys...more >>

C# Setup Creation Failure
Posted by Sunny at 2/20/2004 2:41:10 PM
Hi I have a Database Application that i am trying to create a SETUP for. The application uses three custom Ms access Databases. Those database i added in the correct folder in the SETUP Project of my application However, perhaps due to the size of the Databases (appx 500 mb), or some other rea...more >>

Rendering HTML
Posted by Cobus Lombard at 2/20/2004 2:13:18 PM
Hi all I need to create an ASP.NET control that will allow me to do an HttpRequest, parse the HTML and then render it in a thumbnail (sorta like a preview of a site without browsing to it). Managed code would be ideal, but after struggling to find help on doing this in C#, I'm starting to d...more >>

Can't write registry settings in a Windows Service.
Posted by John Hoffman at 2/20/2004 2:01:08 PM
Hello I have a routine that among other things, reads and writes some simple settings to the registry. Everything works fine. I port this program to a windows service and start it and everthing works fine except it won't write any data to the registry. I can read it, but can't write it. I used .ne...more >>

passing a variable from asp to asp.net
Posted by vncntj NO[at]SPAM hotmail.com at 2/20/2004 1:59:26 PM
in index.asp, i'm passing the this variable: <a href="Description.aspx?Painting=<%=RS2("Painting")%>">Painting</a> void Page_Load(Object sender, EventArgs e) { SqlConnection myConnection = new SqlConnection("server=111.111.111.111;uid=;pwd=;database=mdMuseumStore"); SqlDataAdapter myCo...more >>

Help button in title bar
Posted by satishs NO[at]SPAM toughguy.net at 2/20/2004 1:59:20 PM
Ppl, We have a help button on the title bar. Instead of clicking on the title bar and then on one of the controls to launch the help, We want to be able to launch the help file directly on clicking the "?" Is there anyway to trap the click event of the "?". Thanks in advance Satish...more >>

display actual HTML in text box
Posted by Adie at 2/20/2004 1:45:27 PM
I'm actually trying render usercontrols dynamicaly fraom a name stored in a db, but am have problems. My debugging attempts involve trying to write the contents of the .aspx to a label, but this is just giving me the text and actually rendering the html, I just want the raw code. void someMe...more >>

ReadLine and Random Access
Posted by Danny Smith at 2/20/2004 12:53:37 PM
Hi, I need to read a file and be able to: 1. Find the current position in the stream 2. Have access to a handy ReadLine() method. Obviously the FileStream class supports random access, so you have a Seek() method and a Position property to find the current stream position, and the Stream...more >>

restrict inserting number of rows
Posted by aamirghanchi at 2/20/2004 12:26:06 PM
How can I restrict a user from inserting more than certain number of rows into a datagrid?...more >>

unique ID's
Posted by Chuck Bowling at 2/20/2004 12:01:38 PM
is there an easy way to generate unique ID's for a DataSet Table or am I just going to have to generate a random number and search the db to see if it's been used already? ...more >>

Form properties are missing
Posted by Simon Jefferies at 2/20/2004 11:56:02 AM
Hello, I have created a new form within C# and I am unable to get any properties on this form and also unable to add a new controls to it. Any ideas? Simon Jefferies ...more >>

problems with inheritance???
Posted by Darryn Ross at 2/20/2004 11:52:20 AM
Hi.. I have a standard windows app in C#. The project contains a two forms = and one class that i have created. I want both of the forms to inherit = from the class but i am getting an error reading "type in interface list = is not an interface"??? i am not sure how to fix the problem. Is an =...more >>

xp styles
Posted by Cris at 2/20/2004 11:23:07 AM
How can i know if on the computer where is in use my program, are enabled the xp visual styles? ...more >>

extract blob from database
Posted by Selen at 2/20/2004 11:06:21 AM
I would like to be able to extract a BLOB from the database (SqlServer) and pass it to a browser without writing it to a file. (The BLOB's are word doc's, MS project doc's, and Excel spreadsheets. How can I do this? ...more >>

Declaring readonly public property in C#
Posted by Jon Maz at 2/20/2004 10:57:02 AM
Hi, Quick & easy one - why does this code give an error? ===== CODE ===== private int numberOfPages; public readonly int NumberOfPages { get { return numberOfPages; } } ====== ERROR ====== The modifier 'readonly' is not va...more >>

Regular Expressions
Posted by Derrick at 2/20/2004 10:56:07 AM
I see the "or" operator, is there an "and"? I'd like to take an input string, search it for "diabetes mellitus" and match strings that contain "diabetes" and "mellitus", but not care about the order, there may be other words between them, "mellitus" may come first, etc. Thanks! ...more >>

FileSystemWatcher Windows Service
Posted by Craig Thompson at 2/20/2004 10:47:15 AM
I've attempted to write a windows service that creates one FileSystemWatcher for each entry in a XML config file. Everything start perfrectly and runs as I expect for about 5 minutes and then after that the FileSystemWatchers seem to stop monitoring... My theory is that for some reason the Garb...more >>

Why connect refuse?
Posted by zhimin at 2/20/2004 10:16:52 AM
With C#, I had created two threads in one program. One is a TCP listener, and the other is TcpClient. After the Listener thread started, the client thread started try to connect to the listener, but I get a exception: Unhandled Exception: System.Net.Sockets.SocketException: No connection could b...more >>

log file
Posted by Mullin Yu at 2/20/2004 9:57:37 AM
is the following capable of restricting more than one program writing error log to file? in the past, i got error stating the log file is currently opened by another process. private void LogError2File(string errorMessage, string LogFilePath) { FileInfo oFileInfo = new FileInfo(LogFilePat...more >>

Listbox Items Vanish On Postback
Posted by Luke Ward at 2/20/2004 9:24:54 AM
Hi When server side errors occur I need to do a round trip, go back to the page preserving the user entered data, and also inform the user of the error. The page preserves things in textboxes, but not items add to a list box with client side javascript. I understand why this is all happening ...more >>

Fooling Website into thinking Im a browser
Posted by Alan at 2/20/2004 9:20:44 AM
Hi All, I am trying to make a few calls in succession to a website to allow me to login and then perform a search, in a c# windows program. wcResponse = wc.UploadData("http://www.website.com/login?service2&user=joebloggs&blah","P OST", new byte[]{}); wcResponse = wc.UploadData("http://w...more >>

Creating Textboxes on the fly - new ones appear but the old ones do not
Posted by Jason M at 2/20/2004 9:11:06 AM
Hi, Im very new to c#, so forgive me if this is a really stupid question. Im trying to create a form for entering purchase requests. For each line item I have a quantity, a description unit cost and total cost.. all textboxes. Next to this I have a button that will add a new set of textboxes ...more >>

Can I fire another event from within an event?
Posted by OC at 2/20/2004 8:56:22 AM
I would like to trigger another event from within an event that is specific to a forms state at the time of the original event. Is this possible? ...more >>

Newbie: Can Buttons on Form never have focus?
Posted by grayaii NO[at]SPAM netscape.net at 2/20/2004 8:20:54 AM
Hi, I have a simple problem. I have a Form with two buttons. If i click the up or down arrow keys, the buttons get focused. I don't want the buttons to ever have focus, similar to the Windows Accessories Calculator. I've been searching around this forum, and from what i understand i hav...more >>

C# Setup Failure
Posted by Sunny at 2/20/2004 6:11:07 AM
Hi I have a Database Application that i am trying to install on the Clients machine, the application uses three custom Ms access Databases. Those database i added in the correct folder in the SETUP Project of my application However, perhaps due to the size of the Databases (appx 500 mb), or som...more >>

DescriptionAttribute
Posted by zembaliti NO[at]SPAM yahoo.com at 2/20/2004 5:03:54 AM
The description specified by [Description("...")] is displayed in the property browser in the VS.NET Designer. But if the mouse is over the property's text in the VS.NET editor, the tooltip only displays the property's name... Is there any way to make the tooltip also displays the property's ...more >>

Nested classes
Posted by jonathan.fletcher NO[at]SPAM virgin.net at 2/20/2004 4:10:25 AM
Can anyone help with this problem I'm having. What I want to do is to create a class (maybe it should be a struct) which does nothing but hold data. It doesn't have any methods etc.. public class ShippingOptionsDetails { public static class SaturdayDelivery { public decimal Price...more >>

is this a boxing or precedence problem?
Posted by philipl NO[at]SPAM vistatec.ie at 2/20/2004 4:07:25 AM
hello, with the below code, i have been trying to figure for a while whats causing this problem. Is this a problem or feature?? i know that j is incremented below with any temp variables but i uses a temp var. why is i printed as 0? Is it because the one in the heap is being referenced? If so ...more >>

Modifying Embedded Resource
Posted by vnisor NO[at]SPAM yahoo.com at 2/20/2004 2:23:00 AM
Is it possible to Modify Embedded Resource? Like XML File...more >>

Comparing two datasets
Posted by google NO[at]SPAM oid.demon.nl at 2/20/2004 2:03:19 AM
Hello, I am trying to write a webservice to compare 2 datasets, one recieved from a client, and the other taken from a database on the webserver. Sofar, I have had little success in accomplishing that, but that may be due to the fact that I'm a relative newbie on C# :-) Does anybody have...more >>

Embedding XML file
Posted by vnisor NO[at]SPAM yahoo.com at 2/20/2004 12:40:10 AM
hi , any one knows how to embedd an XML file into and EXE file?( While creating exe in Visual Studio.NET). b'cos i have an Application which uses some XML files. so i need to embed the XML files....more >>


DevelopmentNow Blog