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 wednesday february 18

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

a-life
Posted by Marcel R. Wingate at 2/18/2004 10:50:50 PM
Where is the site that you can create your own artificial herivore/cornivore? I thought I had a link to it but lost it some time ago. -- Thank you ...more >>


Get all connected computers in a network
Posted by Oshadha at 2/18/2004 10:36:05 PM
Hi all I'm developing an application and need to know how to get all computer names which are connected to a network. I found out that system.directorysrvices name space provides a method to get all domain computers, but in my case i need to query for all possible reachable computers in the netowor...more >>

Databinding questions
Posted by Kevin at 2/18/2004 10:01:08 PM
Hi Al When I have a text box, list box, and a datagrid, how does a CurrencyManager relate to all these controls(seeing as though the datagrid uses Complex binding and textbox and list box use simple bound. So for example if I have a text box, list box and a Datagrid on a windows form, and I want t...more >>

Help Please -- ADODB.Command does not work correctly in .NET
Posted by ivanfernandes NO[at]SPAM flashmail.com at 2/18/2004 9:59:52 PM
Hi all, i have been trying this for 7 hrs now !!! How do you call a adodb.command object in .net(c#) code****** ADODB.Connection cn = new ADODB.ConnectionClass(); ADODB.Command cm = new ADODB.CommandClass(); ADODB.Parameter pa = new ADODB.ParameterClass(); ADODB.Recordset rs = new ADODB....more >>

Redemption + get ID from Name in outlook contacts + .net
Posted by v_anushya NO[at]SPAM hotmail.com at 2/18/2004 9:39:54 PM
Hi How to get the id of a name in contact items in outlook. How to do it thru redemption in .net?? i tried the code below. but it shows the error. pls have a look at the code Microsoft.Office.Interop.Outlook.NameSpace oNs; oNs = Connect.oApplication.GetNamespace("MAPI"); //it shows an er...more >>

C# App Development
Posted by Navis at 2/18/2004 9:21:07 PM

Override OnKeyPress Problem
Posted by ~toki at 2/18/2004 7:53:24 PM
How can i take the control of the key events in Class2 ? This is the code snipped that i'd tried (after try some others): public class Main : System.Windows.Forms.Form { protected virtual void OnKeyPress(System.Object sender, System.Windows.Forms.KeyPressEventArgs e) { /* Do Nothing */...more >>

convert double.MinValue to string and back
Posted by Pascal at 2/18/2004 7:31:35 PM
Why does this not work, and how should i do this convert in stead: string x = double.MinValue.ToString(); double y = Convert.ToDouble(x); i get this exception: An unhandled exception of type 'System.OverflowException' occurred in mscorlib.dll Additional information: Value was either too l...more >>



How to create virtual folder?
Posted by Julie J. at 2/18/2004 7:29:02 PM
How do you create a virtual folder in VS.NET? It is simple enough to create a physical folder, but I want to create virtual folders like I was able to do in VS 6. Anyone know how? -JJ-...more >>

Switch on GET/SET accessor
Posted by Tamir Khason at 2/18/2004 7:14:00 PM
Hi, How it is possible to implement such thing: I want some properties will be readonly, based on value of other properties. It should be something like this: public class TEST { int m_int,j_int,k_int; public int INT { get { ret...more >>

Inserting a Progress bar to a Status Bar
Posted by Champika Nirosh at 2/18/2004 6:42:39 PM
Hi All, Is there a way to add a Progress bar or any other control to a Status bar? Nirosh. ...more >>

Vote for a edit/continue function in csharp whidbey
Posted by Wim Bonjean at 2/18/2004 6:08:23 PM
Hi, I recently was at the MS dev days and some speaker mentioned that there is a cool feature that allows edit/continue, so you can debug, edit and continue without recompiling. But, this feature was only for VB, because the development team thinks that c# developers aren't interested in such ...more >>

XML Question
Posted by C# newbie at 2/18/2004 6:05:46 PM
hi, when I open an xml file which starts like: <?xml version="1.0"?> <Survey > some xml code some xml code some xml code some xml code some xml code </Survey> Xpath works fine. But when I open same xml with a starting point as this: (xpath doen't work): <?xml version="1.0"?> <...more >>

change c# console/GUI app to w2k services
Posted by Mullin Yu at 2/18/2004 5:53:04 PM
as subject? how can i do so? i want it to be started automatically when the machine has been rebooted. thanks! ...more >>

Software Design Question
Posted by babylon at 2/18/2004 5:30:19 PM
is it normal to do something like: public MYCLASS { private static MYCLASS defaultInstance = null; public static MYCLASS GetDefaultInstance() { return MYCLASS.defaultInstance; } public MYCLASS(int arg1, string arg2) { // Init... ... ...more >>

Runtime control moving and resizing
Posted by jbmeeh at 2/18/2004 5:26:08 PM
I have an application in which I need to expose runtime moving and resizing of controls. Most of the functionality that I need is exposed by the CRectTracker class in the C++ library. Are there any code samples or tutorials for calling a managed C++ from C#? Any help would be appreciated....more >>

https support for web service client
Posted by vipin aravind at 2/18/2004 4:44:44 PM
Hi, I have a soap .NET client in c# generated using wsdl.exe and I am able to do the communication with the web service and get the information. But I have a question, I have enabled https support on the server and I want to add https support to the client which currently makes use of the...more >>

how to create simple shopping cart in C#
Posted by VM at 2/18/2004 4:32:41 PM
I'm interested in creating a simple shopping cart in C#. Are there sites that show you, step by step, how to create a simple cart? The sites I've found only show you pre-made shopping carts that you can reuse. Those are good but I'd like to learn how to create one from scratch. Thanks. VM ...more >>

Regular Expression
Posted by Gary Brunton at 2/18/2004 4:31:08 PM
Given string s = "name=""jim"""; I want a regular expression that will take the name value pair of s and return a match on the value. Ex. string pattern = <this is some reqular expression pattern>; // this is what I am trying to find Regex re = new Regex(pattern); Match match = re.Match(...more >>

Garbage Collection with Weak References
Posted by Derrick at 2/18/2004 4:21:49 PM
I'm loading a boatload of data into a DataSet. The memory usage grows and grows for the app while loading that data. Calling GC.Collect() reduces the consumption slightly. When I minimize the app though, the usage goes to about 500k, and then grows when maximizing the app and working with Data...more >>

Only allow numbers in a textbox
Posted by Bisley at 2/18/2004 4:04:32 PM
I wish to restrict my textbox to only accepting numbers I have looked the textbox KeyDown event and can inspect KeyEventArgs parameter and interogate which key has been pressed, but I can't work out how to stop then stop the character being added to the text box TIA Bisley ...more >>

Changing Default Install Path...
Posted by Raphael Iloh at 2/18/2004 4:01:24 PM
Hi all, I have a Web Setup Project and would like to change the installation path from the default (i.e. C:\Inetpub\wwwroot\) to some more particular path (e.g. c:\myfolder\). Any ideas on this will be appreciated. Regards, Raphael ...more >>

windows services auto-logon to a computer
Posted by Mullin Yu at 2/18/2004 3:55:06 PM
hi, i want to write a windows service automatically logon to a network computer so that after re-starting the computer without logon, the computer can logon to that computer and can use its resources e.g. printer, files any ideas? thanks! ...more >>

error in web service... please help :(
Posted by Rodrigo Meneses at 2/18/2004 2:44:26 PM
Whenever I invoke a method on my web service I got the following error Client found response content type of 'text/html' Does somebody know something? Thanks ...more >>

using XML to write output files
Posted by Angel at 2/18/2004 2:29:38 PM
How much harder is it to write data to an XML file instead of an ascii file? When I write an output data file, I usually write it as an ascii file. But the client's been thinking of writing it in XML so the files can be used in other processes (eg. displaying data in web). Is writing it in XML f...more >>

IIS management from C# - class library?
Posted by Dmitri Shvetsov at 2/18/2004 2:25:05 PM
Hi All, Did somebody see a class library or something else like that to manage the IIS settings - to backup/restore, to change properties, settings, to add additional or to remove any virtual directories etc.? I need it for a deployment tool, the admin login/password will be knows, its not a p...more >>

design patterns for win payroll application (I always get stuck when classes communicate with each other)
Posted by Angel at 2/18/2004 2:24:47 PM
I'm in the process of working on a Windows payroll application but I wanted some help on what design pattern I should use. For example, if my main Form needs all active employees in the DB, I'd call from within the form, a method called activeEmployees from class Employees. Then I'd have another ...more >>

MDI Question
Posted by johnwadeunderwood NO[at]SPAM yahoo.com at 2/18/2004 2:19:32 PM
Hi.. I have a MDI with three additional child forms.. They can be form1, form2, and form3 for this example.. I understand how to open these three forms from my MDI, that works fine.. What I can't figure out is how to open form2 from form1, or form3 from form1, etc.. instead of only opening them...more >>

StreamWriter: How to format a decimal?
Posted by David Rose at 2/18/2004 2:19:07 PM
Hi All, This has to be simple, I feel foolish asking, but... How do you format a decimal with a StreamWriter? I would like to write a decimal value to a text file in the format xxxxx.xxxx (like 2 would be 2.0000 - don't need to prepend zeros). Never thought I would say it, but I'm starti...more >>

Array of classes
Posted by Chad Z. Hower aka Kudzu at 2/18/2004 2:18:49 PM
I need to store a list of classes, not the instances of the classes. I had planned to use an array, but can use a collection or some other form if more appropriate. The problem I am having is that I cannot find the C# syntax I need to reference a class type. public <class type>[] PowerTo...more >>

DrawString on Bitmap
Posted by Frecklefoot at 2/18/2004 2:17:52 PM
I have a Bitmap image on which I want to render a string. I know about the GDI+ DrawString() method, but I need a Graphics reference to use it. I couldn't find any function to get the Bitmap's Graphics reference. Is there another way to do this? TIA! ...more >>

form controls for relational tables with one-to-one correspondence
Posted by aamirghanchi NO[at]SPAM yahoo.com at 2/18/2004 2:15:57 PM
Hi, What form controls should I use to manage the data thats in relational tables. Each relTable may have no row OR one row corresponding to the row in master table. Probably this is more of a database design question than programming logic....more >>

connection string help
Posted by Mike at 2/18/2004 2:11:51 PM
I'm trying to connect to a SQL db, I have the db setup as a DSN on my machine, here is my connection string that i'm trying to use. string dbConn = "Provider=sqloeldb;data source=Tech;Initial Catalog=Tech;Integrate Security=SSPI;"; on my page I get this error; [DBNETLIB][ConnectionOpen (C...more >>

Any control that has same functionality as IE to display XML
Posted by John at 2/18/2004 2:05:27 PM
Hi, Is there any control (free) that has same functionality as IE to display the XML document without having to create a physical file? if using Webbrowser control (ActiveX control) I have to create a xml file and then use .Navigate(url) ... Thanks! John ...more >>

Free icons for Undo, Redo, Save
Posted by pjflickinger NO[at]SPAM ra.rockwell-dot-com.no-spam.invalid at 2/18/2004 1:28:36 PM
Does anyone know where to get free icons for my program. I need the icons for undo, redo, save. I would like ones similiar to the icons that Microsoft used in Office 97 - but I can not find them... And of course, I don't want to be violating any copyright laws - I don't understand how these ...more >>

SqlInt32
Posted by bonei NO[at]SPAM vafb.com at 2/18/2004 1:22:57 PM
I have now been able to populate a variable of this type by performing 'GetSqlInt32()' from an SqlDataReader. Although I have to check for NULL before doing this. Now I want to perform straight assignment into a field of a DataSet that is of type Int32 as well. And I am having to check for NUL...more >>

Regular Expression Help
Posted by andrew.ross NO[at]SPAM racingworld.com at 2/18/2004 1:22:32 PM
I am a newbie to C# and would appreciate any help converting the following javascript function to C# function fxnParseIt() { // Note: sInputString code for demo purposes only, and should be // replaced with user's code for getting in string value. var sInputString = 'asp and database'...more >>

C# Deployment Issue
Posted by Sunny at 2/18/2004 12:56:09 PM
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 some o...more >>

ASP.Net - Opening new windows using C#
Posted by Jeremy Ames at 2/18/2004 12:28:29 PM
Is there a way, without using javascript, to open a new browser window at set the window attributes? I want to set the size, turn off the status bar, address bar, menu bar, and etc. Can someone please help? ...more >>

Mutex problem
Posted by Martin Maat at 2/18/2004 11:49:34 AM
Hi. I want to use the same mutex in different classes (web pages in an ASP.NET application). In global.asax.cs, the class that starts up first, I create a Mutex like this: static private Mutex mtxBezoeken = new Mutex(false, "bezoeken"); which compiles and executes just fine. Then in ano...more >>

Windows Service or not
Posted by Anony at 2/18/2004 11:41:24 AM
Hi All, After trying the Windows Service sample from MSDN, I don't get what the windows service class is better than a class handling and raising events itself. If using the System.ServiceProcess.ServiceBase, I can't get events in other classes, but only in Event Log. I'm trying to build a...more >>

Network speed
Posted by Abubakar at 2/18/2004 11:08:33 AM
Hi, I have a small sockets application and I'm adding a feature in it to transfer files. Since I also want to give it a transfer resume feature so this means I'll be transfering in specific bytes per pass. I want to know the local LAN or, if or internet, internet connection speed like 5k/s or 5...more >>

Thread safety of readonly members
Posted by Michi Henning at 2/18/2004 11:00:52 AM
Hi, I can't find a statement about this in the threading sections in the doc... Consider: class Class1 { Class1() { _val = 42; } public int getVal() { return _val; } private readonly int _val; } In a threaded environment, is it necessary ...more >>

Changing form Icon issue
Posted by David Burkinshaw at 2/18/2004 10:42:45 AM
I have a form and I assigned an icon to it. For arguements sake let's say the icon is a smiley face. I compile, run, and save the program. The icon on the form shows up as a smiley face. At a later date I reopen the project and decide to change the smiley icon to a frown. I edit the icon using th...more >>

C# equivalent for VB.NET's With statement - is there something like that? <eom>
Posted by Jim at 2/18/2004 10:21:12 AM
Thanks! ...more >>

Set ComboBox Position
Posted by Bernardo at 2/18/2004 10:16:06 AM
Hi, Anyone nows how can I read all values in a ComboBox, and set "visible" one of them? Thanks for your help, ...more >>

possible 2 create rules engine w/ XML instead of C#?
Posted by Jason Shohet at 2/18/2004 10:10:21 AM
I have 6 rules for a given 'time' value. if (0 < iTime <= .5) {iFee = 17} else if ( .5 < iTime <= 1) {iFee = 20} else if... else if... yada yada I don't want to code this in C# within my application, or a web service, because then I have to recompile everytime a user decides to twe...more >>

server infrastructure
Posted by Jason Shohet at 2/18/2004 10:05:10 AM
Lets say I have all my web services in a separate project in VS.NET. And by referencing them in a particular web application, the dll's get automatically put into the bin directory. I know that some people split the web services off onto a separate box. How is this best done -- I mean, the dl...more >>

problems with static members
Posted by codymanix at 2/18/2004 9:57:49 AM
Hi I have following weird problem: I Have a class with the Name CustomerListView which contains a static field. Additionally I have a Property in another class which returns a CustomerListView, and its name is also CustomerListView: class CustomerListView { public const int A = 0; } ...more >>

OT: Recommended database for Win Forms App?
Posted by Ed Sutton at 2/18/2004 9:53:18 AM
Anyone have any advice for what sort of database technologies I should investigate for new C# Windows Forms client-side development? I am database newbie with limited experience using ADO to interface to an Access 97 database. It sounds like ADO.NET is a database interface and not a databa...more >>

Re: Nunit question
Posted by Martin R-L at 2/18/2004 9:50:10 AM
Putting the assemblies in a separate assembly however makes tests of private functions impossible. You want to make these functions internal instead of private and have them in the same assembly for NUnint testing purposes, just as Justin Gehtland points out: "...make sure that your tests liv...more >>

Ever used a infragistic ultraToolbarsManager in a MDI child window ?
Posted by Eric B at 2/18/2004 9:25:20 AM
....That's what I did and I'm unable to display tooltips for my buttons (despite they're working fine in the MDI main form menu...). Ever experienced this kind of problem ? -- Eric Bergbauer ebergbauerXXX@XXXpssoft-sophia.com Equipe de développement Consolidated Service Desk ...more >>

System.Security.SecurityException occurred in mscorlib.dll
Posted by MFRASER at 2/18/2004 9:24:56 AM
I am getting a System.Security.SecurityException when I try and laod a dataset from an xml file any ideas on what would cause this? System.Security.SecurityException' occurred in mscorlib.dll Additional information: Request for the permission of type System.Security.Permissions.StrongNameIde...more >>

How to capture console app output?
Posted by John at 2/18/2004 9:24:39 AM
Hi, In Win App, I used Process class to start a new console appliaction, is it possible to capture the console output and display them in a textbox? Thanks very much! John ...more >>

How to stop a vb6 appl from a C# service
Posted by José Joye at 2/18/2004 9:04:19 AM
Hi, For some reason, I have a VB6 appl (that expose no forms) that I mustcontrol using a C# service. I'm able to start it from my service using the Process class. However, I do not really understand how to properly stop it. I thought the normal way was to get send the WM_QUIT to the created p...more >>

ListBox DataSource clear selected items
Posted by richB at 2/18/2004 7:00:34 AM
How do I deslect all items in a listbox? I know that the ClearSelected method will deselect the items however in the displayed list box the first item appears to be selected. Can anyone explain why this is and provide a solution. Many Thanks, Richard My code is as follows (prior to the C...more >>

Converting returned IntPtr to Struct or Reference type
Posted by GazPym NO[at]SPAM hotmail.com at 2/18/2004 4:51:06 AM
Hi all, I'm using a 3rd party Assembly that contains a method which returns bitmap data, however the Return value type is IntPtr and I need to convert it so I can access the Bitmap data: I'm trying to use a Callback function: public delegate My_RETURN STATE_CALLBACK( ...more >>

Windows DLL Question
Posted by Bernardo at 2/18/2004 4:21:06 AM
Hi I have a DLL with some Forms, classes, et I want to see when I call the DLL from a program just one Class, the "Starting Class Is it possible to see from the "outside" just one class?, Exemple: when I call MyClass.[I see just one class Thanks for your help...more >>

Session.AddressBook doesnt find my address lists.
Posted by Kurt at 2/18/2004 4:16:05 AM
Hello. I am writing a C# program that uses CDO 1.21 to access the outlook addressbook as a contact management system The following code gives me the correct dialog box, but the "Show Names from the:" drop down list box is empty I opened the correct default profile (i have only 1 profile) and I ...more >>

XML Comment structure
Posted by james autry at 2/18/2004 4:03:19 AM
When using the IDE, and the XML based auto commenting feature, how does one format an input parameter that is a structure. ie. describing each element of the structure between one <param> block. Is there a way to define a newline within this block so that the format is readable when the tooltip...more >>

Asynchronous Socket Client class problem
Posted by Matthew King at 2/18/2004 3:56:08 AM
Hi all I've written a asynchronous socket client class, but i've found that in order to consume it I have to use events, and cannot simply for example SocketClient client = new SocketClient(110, "some.server.com") client.Connect() client.SendData("Hello World") Instead I have to wa...more >>

Setting focus to an MDI child not working
Posted by PromisedOyster NO[at]SPAM hotmail.com at 2/18/2004 3:01:17 AM
We have an MDI application that is not setting always setting focus to the newly corrected MDI. It is creating the form and it is the topmost but it does not have focus. The code we are using to activate the MDI is something like the following: frmTest frm = new frmTest(); frm.MdiParent = ...more >>

How do I add trailing spaces within a right-justified textBox?
Posted by Stan Shankman at 2/18/2004 12:44:06 AM
How do I add trailing spaces within a right-justified textBox? In order to add a trailing space to the text in a right-justified textBox, I use to just append a space to the end of the text string. But now, textBox seems to have gotten smarter, as it automatically remove trailing spaces. So...more >>

Can't put user control onto form
Posted by Gordon at 2/18/2004 12:36:09 AM
Hi I created a user control by open a window application project, from the project menu, click Add User Control. Then write code to draw the control then saved and built it with no problem. Now when I tried to add the control from toolbox to Form1 of my window application I got the following error...more >>

C# to HTML convertor
Posted by Chad Z. Hower aka Kudzu at 2/18/2004 12:30:56 AM
I need to take some C# files and format them into HTML for display on the web. I need to do this in an automated fashion as the files change often. I googled and found: http://dotnet.jku.at/applications/Cs2Html/cs2html.aspx But the source does not appear to be readily available, at least ...more >>


DevelopmentNow Blog