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# > january 2007 > threads for friday january 12

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

WinForms.NotifyIcon doesn't vanish when program ends
Posted by ForrestPhoto NO[at]SPAM gmail.com at 1/12/2007 9:51:37 PM
I would think it should disappear on its own when the application ends - if you have a main form and others, they'll all close when the user kills the main form. In any case, I override the OnClosing method and set notifyicon1.Visible = false, but still, after my program ends, the icon is left ...more >>

Validating an XML file
Posted by Jack White at 1/12/2007 8:00:15 PM
Hi there, I've created a strongly-typed "DataSet" using VS. If I save the data via "DataSet.WriteXml()" and later prompt my users for the name of the file in order to read it back in again (using "DataSet.ReadXml()"), how do I validate that the file they enter is valid. That is, while "Da...more >>

updating a textbox on a form from another class
Posted by Peted at 1/12/2007 7:32:59 PM
Hello i have a textbox on a form1. I want to pass the name of that textbox as a paramter to another class (not a form class) and once gotten this paramter i want to update the textbox on form1 and display text data as data is retrieved via this other class. can anyone point or provide so...more >>

Blog
Posted by Champika Nirosh at 1/12/2007 6:51:21 PM
Hi All, Can some one explain me how these blog servers keep blog content? Is it via a database? Is it via a XML file which save in a local directory? I was asked to develop a back end service for a blog/ wiki. Thanks, Nirosh. ...more >>

VisibleRowCount number question
Posted by Jason Huang at 1/12/2007 6:04:59 PM
Hi, I think this is an odd situation. Sometimes the VisibleRowCount is correct while sometimes it is 1 more than the correct number. Especially after I did the DataTable.Rows.Remove, DataGrid.DataSource=DataTable. Would someone give me some advice? Thanks for help. Jason ...more >>

Setting focus on a form
Posted by avanti at 1/12/2007 5:04:22 PM
Hi, I have a few forms in my application. One of the forms is to confirm some action done on the other form. I want to make sure that the user clicks this form (by choosing 'yes' or 'no') before continuing to do anything else. In other words, I want to keep the focus of the user on this form ...more >>

Boxing and Unboxing ??
Posted by Peter Olcott at 1/12/2007 4:43:08 PM
According to Troelsen in "C# and the .NET Platform" "Boxing can be formally defined as the process of explicitly converting a value type into a corresponding reference type." I think that my biggest problem with this process is that the terms "value type" and "reference type" mean something ...more >>

Newb Question....Database Entry Form
Posted by uluvale96799 NO[at]SPAM yahoo.com at 1/12/2007 4:35:04 PM
Hi, I'm very new to programming so forgive me for asking the dumb question. I'm trying to develop a database application using c#, and I'm using the northwind database. I'm currently using visual c# express edition 2005 as well as sql 2005 express. Here's the thing I've been trying to figur...more >>



Designer throws Excepion : [System.ComponentModel.Browsable(false)] seems not to work as expected.
Posted by Sagaert Johan at 1/12/2007 3:47:22 PM
hi In a componenet class i have a property with the attribute [System.ComponentModel.Browsable(false)] public int Vsetting { set{....} get{...} } When i use the component on a form, the property is not visible in de peoperties window of the designer (thats ok) B...more >>

How to find what was connected, when?
Posted by J at 1/12/2007 3:17:08 PM
Hi I've seen a couple of applications which produce a list of all of the devices which have ever been connected to a PC (via USB and FireWire at least), what they were, when they last connected, if they're still connected and so on. I'd like to have a go at implementing something like this ...more >>

File Attachements from database
Posted by Sehboo at 1/12/2007 3:03:38 PM
I have a table with field of type image which has binary data in it. data could be of image/doc/text/etc type. I need to send this data as file attachments in emails. I should read the data, store it in some temp file and then attach that file? Is there any code? Thanks ...more >>

Custom color option
Posted by VBA at 1/12/2007 2:51:00 PM
Hi All :) Well this is not only for C#, but in VS2005 the color properties of the controls (like backcolor,forecolor...) are limited to what they have by default in the System, Web and Custom palette.. but in Custom i only see squares with colors by default and some in white... don't th...more >>

Combo box API trickery
Posted by Frank Rizzo at 1/12/2007 2:45:07 PM
I have a Combo Box, with DropDownStyle=DropDownList. I have a requirement that a user not be able to click certain items in the dropdown, e.g. the dropped part of the combo box should act like nothing happened. To that end, I inherited the from IMessageFilter interface and implemented ...more >>

Newbie question - User Controls and Events
Posted by Mr Not So Know It All at 1/12/2007 1:46:05 PM
thanks for taking the time to review my request. i have a user control with a radiobuttonlist. i would like to click on one of the buttons and raise the event from the button and catch it with page (eventually pass the event results to another user control). i found an article on the web that ...more >>

Retrieve Values from a ListBox
Posted by dudis3 NO[at]SPAM netzero.net at 1/12/2007 12:59:44 PM
Hello, I have this problem, I have populated a multiselect ListBox, but now I need to retrieve selected values, and use them as a parameters on the url e.g http://www.aaa.com/Dynamicpage.aspx?states=(value or values) - which will be selected from this ListBox, how do I separate multiple values ...more >>

So long, farewell, auf Wiedersehen, goodbye.
Posted by Jon Shemitz at 1/12/2007 12:54:30 PM
After 23 years as an independent programmer (most of them with Turbo Pascal, Delphi, and C#) I'm taking a full-time job, doing straight C on embedded Linux. I start a week from Monday (Jan 22) and will probably stop monitoring the .NET newsgroups, as I'll have to find time for a two hour round t...more >>

How read from Active Directory?
Posted by Ronald S. Cook at 1/12/2007 12:41:30 PM
I have no experience with Active Directory and need to programatically read which user is logged into the domain, the groups they are in, and any other pertinent information. Can anyone get me started? I.e. what's the namespace, what does the masic code look like? Thanks, Ron ...more >>

Determining project and file types in preexisting code
Posted by jeffc at 1/12/2007 11:28:51 AM
I'm maintaining some older code, apparently created in Vis Studio 2003. I have Vis Studio 2005. When I open this solution, it says it has to convert all the projects. There are some problems with the application and what I'm trying to do is recreate the original application from scratch in ...more >>

Dataview sort
Posted by Cindy Lee at 1/12/2007 11:25:44 AM
This sort is sorting on strings, but I want to sort on an integer value. How can I tell it to sort by number? ...more >>

Generate a unique random string
Posted by Robert Mago at 1/12/2007 10:48:02 AM
Is there a way to create a 10 characthers or less, alph-numeric string which is unique. I can't use the guid since its longer then 10 characthers. Also i cannot use a random number, since being random does not mean that its unique. ...more >>

Placing images in external DLLs
Posted by Brian A. Cline at 1/12/2007 9:49:26 AM
After placing several images in an embedded resource file, the size of my program's executable has jumped considerably. I don't need these images until a specific dialog pops up, and it's possible that may never happen in the majority of cases. What would be the best way to go about placing ...more >>

pure scope and try catch scoping idea
Posted by John Rivers at 1/12/2007 7:58:04 AM
try catch blocks create a new scope i don't think that they should for example, to add error handling to this statement: int x = 1; you have to rewrite it as a seperate declaration and assignment: int x; try { x = 1; } catch {} maybe if try catch used different braces to show n...more >>

stored procedure have no results
Posted by chessitguy NO[at]SPAM yahoo.com at 1/12/2007 7:24:41 AM
my stored procedure: create procedure ps_title @Title nchar(15) AS SELECT ,Title FROM books Where Title = @Title this is my code. i'm passing variable to sp and getting no results. protected void Button1_Click(object sender, EventArgs e) { SqlDataReader rdr = ...more >>

WinForms - Setting TabIndex Properties (Quickly)
Posted by alexkail3 NO[at]SPAM gmail.com at 1/12/2007 7:07:42 AM
In VB6, there was an "easier" way to set the tab index properties of all of the controls, which was to start at the last control, and work your way to the first control, setting each controls tab index property to zero, which would increment the controls you just set by one. Obviously, it was so...more >>

Eletronic Serial Number
Posted by Marcelo Muzilli at 1/12/2007 6:04:35 AM
Howdy all, I'd like to know how can I get the Eletronic Serial Number of my handheld. Which API do I have to access? I'm developing using MS VS2003 C# (Compact FrameWork) for a Intermec CN3 handheld. I don't know if I can access via Windows API or if I have to access using Intermec API. ...more >>

Test connection in Enterprise Library
Posted by Jac at 1/12/2007 5:42:26 AM
Hey, How can I test if there is an connection-exception when using database application block from the enterprise service? I stopped the sqlserver. I do now the following : Database db = null; IDataReader reader = null; try { db = DatabaseFactory.CreateDatabase("Logging"); } ...more >>

Marshalling: How to delete dynamic array from managed code.
Posted by Ananas at 1/12/2007 5:39:10 AM
Hi, My native C++ function creates a dynamic array. I'm marshalling it to managed code and got to delete after. How to make it: c++ code: void CreateArrayInside( pTestStruct &TestStruct, unsigned int &size) { size = 5000; // test structure TestStruct = new CTestStruct[s...more >>

How read file properties like Keywords, Comments?
Posted by Ronald S. Cook at 1/12/2007 5:26:51 AM
Right-click on a file (e.g. a .wmv file) in Windows Explorer and there's the "General" tab with Date Created, Attributes (i.e. whether the file is read only or and.or hidden), and other properties. I can get at these values programatically via the System.IO namespace and the FileInfo method: ...more >>

Problem in validating Form1 Controls in Form 2
Posted by Suma at 1/12/2007 5:26:50 AM
Hi, i have a problem with the controls .i have to validate Form1 Radio button option is checked or Not in the Form2. even after checking the radio button also in FOrm2 it is always taking as "False" only. please see the following code where i did wrong. I ahve created A Visual C# .Net project...more >>

A nasty trap - Class Properties Changing Value Whilst A Program Was Paused !!
Posted by pigeonrandle at 1/12/2007 4:16:02 AM
Hi, I thought i should give a better explanation to my second 'bug' in my previous post (Bugs in VS2003 SP1) because it's taken me ages to figure out what was going on. Basically, one of my project classes 'Tokenizer' had a property '_Token'. When i hovered my mouse over a line of code with ...more >>

Checked Combo Box.
Posted by saurabhnsit2002 NO[at]SPAM gmail.com at 1/12/2007 3:47:00 AM
Can anyone help me about how to create combo box with its items as checked boxes or radio buttons. This has to be done in C#. I have seen something similar to this named custom combo boxes but they are in MFC I have to remain constrained only in C#. ...more >>

Bugs in VS2003 SP1
Posted by pigeonrandle at 1/12/2007 3:30:26 AM
Hi, Has anyone else experienced weird errors after installing SP1? These 2 are starting to really get on my nerves: 1) If i have a watch set on an expression rather than a variable, when i launch a debugging session the watch window flickers and the program takes ages to launch (due to th...more >>

Interprocess Communication
Posted by DC at 1/12/2007 3:08:26 AM
Hi, I am using a windows service. Now I need to access some data inside this service with a windows forms application. As an alternative I could use a web project to get what I need from the windows service. That windows forms app or the webapp will sit on the same machine. Am I right in th...more >>

Quick question - formatting the way time is displayed
Posted by Gary at 1/12/2007 2:52:05 AM
f.CreationTime.Hour.ToString() + ":" + f.CreationTime.Minute.ToString() + ":" + f.CreationTime.Millisecond.ToString(); Which produces a format like 9:30:124 Now I'd like to change this slightly. Firstly I do not need to know the creation time of the file accurate to the thousandths of milis...more >>

Web page size
Posted by marss at 1/12/2007 2:49:25 AM
Hi all, With the advent of Service Pack 1 for Visual Studio 2005 we at last get a possibility to convert our old ASP.Net 1.1 web application to ASP.Net 2.0. We converted it. And we were unpleasantly impressed. There are many just praises about reduced ViewState but what about another controls? ...more >>

typeof(enum) as argument to method
Posted by Jesper, Denmark at 1/12/2007 2:40:01 AM
Hi I need to parse strings to enumerated types for several different enumerated types. Im doing this for each of them, bu I wonder if there is a way to write a generic method that also takes the specific enumerated type as an argument. Is it possible to pass the typeof(enum) as an argument...more >>

Screen capture of a Form
Posted by jcmag at 1/12/2007 2:13:05 AM
I would like to take a "screen capture" of just a Form. I've done the following: internal void CaptureScreen() { Graphics g1 = CreateGraphics(); Image MyImage = new Bitmap(ClientRectangle.Width, ClientRectangle.Height, g1); Graphics g2 = G...more >>

problem updating database
Posted by dani kotlar at 1/12/2007 1:35:25 AM
I use a table adapter to add rows to a database, using Update(); After adding a row to the database and closing the application, if I run the application again, and call Fill(), I can see the new data, as if it appears in the database. However, if I open the database itself in the server browser...more >>

Serialize and deserialize against interface??
Posted by TheMadHatter at 1/12/2007 12:24:01 AM
oop Q: If I serialize an interface array, then later deserialize it, do I need the original assembly to deserialize it??? Eg: // Inside of "globaly assembly" public interface Ianimal { string myColor { get;} } // "Dog Assembly" Inside of dynamicaly loaded assembly. //...more >>


DevelopmentNow Blog