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 2006 > threads for thursday march 2

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

PropertyBinding an ApplicationSetting to a combo box's members?
Posted by Joel Thornton at 3/2/2006 11:41:06 PM
Is it possible to use C# 2.0's (VS2005's) PropertyBinding properties to automatically load an ApplicationSetting (presumably of type System.Collections.Specialized.StringCollection) so that it auto populates the drop down list on program startup? Also, what is the easiest way to save a new ite...more >>


.net types to sqldbtypes
Posted by Roy at 3/2/2006 9:11:28 PM
The SqlCommand.Parameters.Add(..) function takes an paramter for SqlDBType. Is there a generic way in .NET framework to convert .net types to SqlDBTypes? Or I have to mapping manually with a big switch statement? ...more >>

simple inheritance question
Posted by relient at 3/2/2006 9:03:53 PM
Hi, I have three classes: Animal, Dog and Cat. Dog inherits from Animal and Cat inherits from Dog. My question is: is Cat now also a Animal even though it didn't inherit directly from Animal? ...more >>

Windows Forms communicating with Services
Posted by Gianmaria at 3/2/2006 8:52:07 PM
Hi, i've wrote a windows service that handle incoming tcp connections. Now i need to let him communicate with a windows form.. but without remoting. My service fires events too that i subscribe in my win form... is it possible? regards....more >>

Problems with memory at WTS/Citrix Servern
Posted by Alexander Overmann at 3/2/2006 5:16:49 PM
Hello, currently we encounter several huge memoryproblems running .NET C# Applications under Windows Terminal Servers/Citrix. Sometimes the program claims 100 MB which is not very much at a single PC but a pain in the ass at a Terminalserver when 20-25 Users start the program (25*100 = 2500...more >>

How to properly exit an application from the Main Form?
Posted by ESmith at 3/2/2006 4:51:01 PM
When a user starts up my application, I want to check for some prerequisite conditions, and if not met, the exit the application. Example: public Form1() { InitializeComponent(); if ( MandatoryConditionsNotPresent() ) { MessageBox.Show ("So Sorry! Unable to run."); ...more >>

Not able to load 23 MB PNG File in Bitmap Class
Posted by Anand Ganesh at 3/2/2006 4:32:43 PM
Hi All, I am trying to load 23 MB PNG file using the Bitmap Class, but I am getting an out of memory exception. My computer has 1 GB RAM and 1.5 GB Virtual Memory but still I am getting this error. The Image file is not corrupted and I am able to see the Image in the Windows Picture View...more >>

convert int to bool
Posted by John A Grandy at 3/2/2006 4:12:08 PM
Often in dbs , tinyint is used instead of int (because tinyint cols may be indexed , whereas int cols may not). What is the best way to convert integers to booleans ? The following fails: bool myBool; tinyint myTinyInt = 1; myBool = (bool) myTinyInt; If you have restricted your i...more >>



Is this a Bug ? Image and NumericControl
Posted by Anand Ganesh at 3/2/2006 3:51:58 PM
Hi All, I just have a simple Windows Application with one Windows Form and one button. In the Button Click event I have the following code. Bitmap TheImage = new Bitmap(@"C:\GV7TestService\SIDSpot\mrsiddecode_win\TestImage.png") ; bool ImageLoaded = true ; TheImage.Dispose() ; When ...more >>

HTML Email Question
Posted by akylitis at 3/2/2006 2:59:23 PM
Hello: Anyone have an opinion on the best way to formulate a dynamic HTML email? Thus far I have figured out that the only way to "build" the HTML prior to the email (I'm using System.Net.Mail) is to manually build the HTML string in code or "screen scrape" a stream from a WebRequest. I'v...more >>

business objects
Posted by Rudderius at 3/2/2006 2:30:53 PM
Hey folks, I have a toppic I would like to discuss: Many authors write that business objects should have the CRUD behavior implemented (create, read, update, delete). Which means that a class Customer has a method Load() etc... In my opinion this is not the right way, because this means...more >>

Data binding with enums?
Posted by David Veeneman at 3/2/2006 2:29:56 PM
I want to data bind a user control and a business object, using a BindingSource control. The control has a 'Priority' property that takes a 'Priority' enum (High, Normal, Low). The business object has a property with the same name, which takes an identical enum. Data binding isn't working, ...more >>

Using an unmanaged c++ dll
Posted by Torben Laursen at 3/2/2006 2:29:32 PM
Hi I have a function in a c++ dll that I need to use, but I do not know how to pass the arguments. This is the function in c++: extern "C" __declspec(dllexport) void __stdcall Info(char *Label, const int &ID, char *Message, int &StatusCode, int &ErrorIndex, char *ErrorString) Can anyone ...more >>

Dynamic updates of remote object without service interruption
Posted by lk at 3/2/2006 2:26:29 PM
I need some help regarding the mechanism to put in place to be able to dynamically update a remote object when the assembly where it is defined is modified, and this whitout having service interruption. Basically what I'm missing is how do we re-expose a remote object when assembly has cha...more >>

Trouble with DataGrid and adding Rows
Posted by Flack at 3/2/2006 1:58:31 PM
Hey guys, I have a DataGrid and DataTable field in my class : private ImageDataGrid dataGrid1; //ImageDataGrid extends dataGrid and just overides OnMouseDown private DataTable dt = new DataTable("MyTable"); In the classes constructor, after InitializeComponent() I call the following ...more >>

Configure a console application to a Windows Service
Posted by tdavisjr at 3/2/2006 1:53:05 PM
Can anyone give me any hints on how to do this. I already have a console app that I have to start manually but I want to configure it to run as a windows service. ...more >>

Windows service design question
Posted by deko at 3/2/2006 1:50:36 PM
I'm trying to finalize a windows service design any would appreciate any comments - I'm new to windows services. Essentially my UI app relies on a service to schedule IO tasks. The service does nothing but keep track of elapsed time. The reason I need a service is because the IO tasks are...more >>

Could someone please write Design Patterns in C# for Dummies?
Posted by Carlo Stonebanks at 3/2/2006 1:13:17 PM
I have the infamous GoF Design Patterns boo - it's been sittin gon my shelf for years. I have a huge reading list and find this book a rather dry read and am always putting it off. I have recommendation for "Head First Design Patterns" book, but it's aimed aimed at Java developers. I'd rath...more >>

How to get only the first file in a directoy without reading the entire directory file collection first
Posted by MSDN at 3/2/2006 12:59:26 PM
Hello, I have the following code below that does not work for me because the directory has millions of files. foreach (string ofile in System.IO.Directory.GetFiles(strMyDir)) { System.IO.FileInfo oFI = new System.IO.FileInfo(ofile); oFI.Delete(); } How can I get the first file...more >>

(Slightly OT) deploying C# applications and Windows Installer
Posted by Bart Simpson at 3/2/2006 12:30:55 PM
I am about to deploy a C# application which requires a third party database to be installed and ready at the client machine. The third party database has its own .msi file, complete with expected user interaction etc. My question is, is posible to create an installation package that does th...more >>

DataAdapter.update not updating
Posted by RSH at 3/2/2006 11:54:30 AM
Hi, I have a situation in where i have two instances of SQL server, the first is our Production Environment, the second is our Development environment. Both servers contain the same databases but I need to write a utility that can transfer a row of data from the Production to the Developme...more >>

Converting COBOL code to C# ?
Posted by dm1608 at 3/2/2006 11:45:09 AM
We have a number of COBOL programs, and some were currently developing, that simply read TEXT based reports and scrap the reports for various information. I'm curious to know if anyone has attempted to do this sort of thing using C#? I would love to get rid of my COBOL programmer and esp...more >>

Question about ListView
Posted by Roy at 3/2/2006 11:43:08 AM
I have a ListView on a dialog with Detail view. (1) How do I select the whole line instead of the 1st column? (2) How do I hide a column so that user would not be able to see it? (3) How do I programmatically adjust the column width to show all the text in each column?...more >>

why does adding 2 bytes together result in an int?
Posted by moondaddy at 3/2/2006 11:10:01 AM
my understanding is that the max value of a byte is 255. Therefore, why does the following code get a compile error? byte val1 = 10; byte val2 = 23; byte ttl; ttl = val1 + val2; //this line wont compile compile error: Cannot implicitly convert type 'int' to 'byte'. val1 + val2 = 33 w...more >>

Tab page event handling
Posted by Jan Smith at 3/2/2006 10:50:17 AM
I have a C# project with tab control with eight tab pages. I would like to allow the text or the text color to change when an event occurs, then have the text or text color change back when the tab is clicked. However, I don't find a click event handler specifically for the individual tab pa...more >>

Design Question
Posted by Lee at 3/2/2006 10:42:18 AM
I am in the beginning stages of rewriting an application from Delphi to C#/VS2005. In the current application, we cache much of the static data on the local work station in memorydatasets. This works nicely because it reduces network traffic and the app is very responsive. There's an inita...more >>

Open Unconnected ADORecordset
Posted by Brent Rogers at 3/2/2006 9:48:27 AM
I am trying to open an Unconnected/Disconnected ADORecordset. Using VB I would use the following function call rs.Open() However C# requires a Source and Connection. What do I pass in? I have tried null, the null string, zeros, empty objects but I keep getting a runtime error when I try...more >>

I thought this wasn't allowed in C# - invoking static members from a subclass
Posted by Larry Lard at 3/2/2006 9:39:27 AM
Today I discovered that a syntax that I thought was forbidden in C# but allowed in VB.NET (and I _don't like_ that it's allowed in VB.NET) is actually allowed in C#. Which confused me. The syntax in question is referring to static members of a class *from a subclass*. (Now, I know for sure the...more >>

SQL Connection String using Domain Account
Posted by Tim Sapp at 3/2/2006 9:35:48 AM
Folks, I am working on a .Net web site that connects to SQL Server 2000 on another box. The DBA has given me a Domain user account with rights to the database and table. I have confirmed with Query Analyzer that the user ID and password are good and can access the correct tables. How...more >>

Cool Windows controls
Posted by brosembob NO[at]SPAM yahoo.com at 3/2/2006 9:13:37 AM
Currently I'm working on a Windows application (C#) where I'll need to create controls, like VU Meter, Sine Meter, switches, etc. What's the best technology to use to create those controls? Is GDI+ good for it? Also I'm looking into possibility of buying such controls. Can someone send me into t...more >>

mouseover...please help
Posted by new_sense at 3/2/2006 9:11:30 AM
Basically I'm creating a map application. When a user selects display all accomodation, the accomodation icon appears painted over the map(in picturebox). Is there anyway to display info eg name of hotel when user uses the stylus to mouseover the icon?? ...more >>

Using The Remove Method with a Custom Object
Posted by a at 3/2/2006 9:11:27 AM
If the code to insert a new Student is: Profile.Teachers[tId].Classes[cId].Students.Add(new TCS.Student(id,teacher, class, name)); what is the code to Remove a student? I tried the code below, but I don't understand the syntax: Profile.Teachers[tId].Classes[cId].Students.Remove(new TCS.Stu...more >>

Event Problem
Posted by Willy_At_Work at 3/2/2006 9:03:31 AM
I want use a different signature for a base class event and also override the On... protected method. It's not working. What am I doing wrong? Here's the code. public partial class UCBase : UserControl { public event EventHandler IWasClicked; public UCBase() ...more >>

Showing comments of a class in ObjectBrowser
Posted by Lee at 3/2/2006 9:03:26 AM
When looking through the object browser, I see comments that are shown for each property, method, etc. What is mechanism for doing this? Thanks, -- Warm Regards, Lee "Upon further investigation it appears that your software is missing just one thing. It definitely needs more cow ...more >>

finding a specific child node
Posted by apandapion NO[at]SPAM gmail.com at 3/2/2006 8:39:04 AM
I'm new to programatic manipulation of XML, and I'm sure I'm not doing everything in the best way. In specific, I have a number of pieces of code that look like this: string foo=""; foreach (XmlNode xnii in xni.ChildNodes) { switch (xnii.Name) { case "foo": foo = xnii.InnerText; ...more >>

Automated process hanging waiting for dialog
Posted by Benny at 3/2/2006 8:03:20 AM
I have an automated application that opens and manipulates Office documents. Every time a document triggers a dialog to pop up, the process waits for the dialog before it continues. After a little research, it seems like I will need to use hooks and messages in the Win32 API. Does anyone know...more >>

Naming a Setup Project
Posted by Bry at 3/2/2006 7:35:28 AM
Is there any way of modifying the ProductName in my setup project dialogs that doesn't involve me having to rename my setup project? I have an application named 'Foo', and the main project within the soloution is 'Foo'. I'm trying to make my setup project use the name 'Foo' for product name, b...more >>

Converting int seconds to datetime or formated string
Posted by Pat Brown at 3/2/2006 7:26:56 AM
I am pulling an integer value of the amount of seconds since 12:00 am from a SQL Server DB. I want to convert this integer into a formated string or datetime to display a legible time of day. Are there any built in methods in the .NET framework that will accomplish this. If not, any other s...more >>

Conditional statement to display asp:textbox or asp:label
Posted by maflatoun NO[at]SPAM gmail.com at 3/2/2006 6:35:51 AM
Hi, I have a datagrid and based on a condition I like to display either a asp:textbox or asp:label. How would I do that? I have the following <asp:TemplateColumn HeaderText="Qty"> <ItemTemplate> <% if (DataBinder.Eval(Container.DataItem, "DynamicAttribute") = "No") {%> <asp:textbox ...more >>

sysytem analysis and design practical question?!!! help plz
Posted by apple at 3/2/2006 4:54:03 AM
hello all, i have a question about system analysis and design, i tried to solve it but i could not .. choose a relaively small organization that is just beginning to use information systems. what types of systems are being used? for what purposes? to what extent are these systems integrated...more >>

Running only 1 application instance in a machine
Posted by anonieko NO[at]SPAM hotmail.com at 3/2/2006 4:37:10 AM
Avoid running several simultaneous instances of the same application on a single machine. ( Checking if application is already running) (Book Excerpt Practical C#2) Thanks to the static methods named GetCurrentProcess() (which returns the current process) and GetProcesses() (which returns a...more >>

Casting question
Posted by tom NO[at]SPAM vandeplas.com at 3/2/2006 3:17:28 AM
Hi All, I'm stuck whit an issue I can't seem to resolve in C#: I have an arry of bytes which I would like to "recast" to an array of structs with an Explicit layout. I tried the Buffer.BlockCopy method, but that one complains my struct is not a primitive type. Any Suggestions ? In de...more >>

Serialization, XSD to class, and deep copying?
Posted by jjkboswell NO[at]SPAM yahoo.com at 3/2/2006 2:27:29 AM
I have an XSD which I have generated a class from using the xsd.exe tool. My XSD contains complex types within it, so that the generated class has member variables which are of types that are also defined in the XSD. I deserialize XML data into instances of that class, and serialize back to ...more >>

Data Binding with object array
Posted by kin at 3/2/2006 1:52:07 AM
After a I read Walkthrough: Connecting to Data in Objects (http://msdn2.microsoft.com/en-us/library/ms171892.aspx#Mtps_DropDownFilterText). I still have project on that. My School project provided me an array of objects - News, but VS 2005 seams only accept Collections like IList<News> for Dat...more >>

Explain the '?' in: int? a = null;
Posted by moondaddy at 3/2/2006 12:31:19 AM
I'm learning c# and see a code example where a value of null is assigned to a variable: int? a = null; I could not find this in the docs. can someone please explain exactly what the '?' is? and where-all it can be used? Thanks. -- moondaddy@nospam.nospam ...more >>

Rational for not supporting optional arguments
Posted by Nick Hounsome at 3/2/2006 12:00:00 AM
Can anyone tell me what the rational is for not supporting optional arguments. It is obviously a trivial thing to implement and, since C++ has them, I would not expect them to be omitted without a good reason. ...more >>

VS 2005 and VSS 2005
Posted by Dragon at 3/2/2006 12:00:00 AM
VS2005 not integraged with Visual Source Safe 2005 ? ...more >>

Want to autogenerate data manipulation classes.
Posted by jens Jensen at 3/2/2006 12:00:00 AM
Hello, I want to auto generate the data acces classes from my database(sql server 2005/2000) . I use visual studio 2005 and c#. Can someone tell me where i can find relevant documentation on this matter? Many thanks in advance JJ ...more >>

Design Pattern
Posted by Dragon at 3/2/2006 12:00:00 AM
Where can I find the suggested Design Pattern ? ...more >>

Remoting; firewall warning
Posted by Marc Gravell at 3/2/2006 12:00:00 AM
I am using remoting to talk between separate apps *on the same machine*; currently my server startup code is as below, but it throws the XP firewall warning dialog. Since I only need to connect locally, is there any way of preventing this - i.e. can I tell it that I only want to accept local ...more >>

Socket: Webcam broadcasting
Posted by Islamegy® at 3/2/2006 12:00:00 AM
Hiiiiiii I'm working on a client server application which work like messnger.. I was able to capture the camera with no problem but now i want my my program to listen to incoming connection and start sending.. I'm using UPDClient (I think TCP is not the right protocol to send video stream)...more >>

Min/Max Buttons on a toolwindow - help
Posted by Julie-anne at 3/2/2006 12:00:00 AM
Hi, Is there a way to get minimize and maximize buttons on a sizable tool window? Or maybe just a minimize button? :-) Thanks everyone! Julie ...more >>

Basic DataGrid Question
Posted by Ian Semmel at 3/2/2006 12:00:00 AM
Am I correct in assuming that grid.Controls.Count is 1 less than the count of the number of rows ? Is there some other property which gives the actual count ?...more >>


DevelopmentNow Blog