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 > dotnet windows forms > may 2007

Filter by week: 1 2 3 4 5

Call system application to open a specified file.
Posted by zlf at 5/31/2007 11:31:36 PM
Hi, In my program, client is allowed to select a image file from open file dialog. And I am required to provide a preview button, when clicking it, system program like paint should be called to open that file. May you tell me how to implement that. Thx zlf ...more >>

Label Printing Application
Posted by deciacco at 5/31/2007 2:48:50 PM
I need to convert a label printing application from Froxpro 9 to c# 2. The application is a simple sdi app with a small preview window of the label on it. I'm not sure where to even begin to do this with c#. Any ideas? Here is the screenshot of the current application written in Foxpro 9. http:/...more >>

DateTimePicker.Value
Posted by mahesh.nimbalkar NO[at]SPAM gmail.com at 5/31/2007 6:27:05 AM
Hi, I have DateTimePicker control on a winform. When user selects a date in that control, I am getting proper value using DateTimePicker.Value. But I want to know in case user does not select any date and closes DateTimePicker control by pressing escape key. Here in this case also I am gettin...more >>

sending message to parent form
Posted by Tarscher at 5/31/2007 2:48:21 AM
Hi all, I have a usercontrol I place on different parent forms. When I double click on something on the usercontrol I want to invoke a method on those parent forms. I also need to pass an object from the user control to the parent control when calling that method. how can I do this best? ...more >>

How to print a panel?
Posted by zlf at 5/31/2007 12:00:00 AM
Hi, I have many content panels in my application, client asks me to add a print button in those panels. Once clicked, the content of panels will be printed out. There is a control in .NET 2.0 could meet my requirement? Thx ...more >>

Form proprties - Is it a bug or .. ?
Posted by Tamer Ibrahim at 5/31/2007 12:00:00 AM
Hi, I have a simple winform with a background that work fine. When I set both the RrighTtoLeft to Yes and RightToLeftLayout form proprties to True, the form background disappear. How can I solve this ? Thank You. ...more >>

Backup database from code: Access denied on user specific directories
Posted by Robin at 5/30/2007 6:03:17 PM
I want to backup a sql express database from my windows forms C# code. I can do this by running a sql command "BACKUP DATABASE TO..." (or using SMO) and I can save the backup file to any subdirectories of C:. The problem I have is that I want the user to be able to save the backup file to any...more >>

using DateTimePicker with null entries
Posted by Ross at 5/30/2007 4:23:02 PM
Hi I have a windows form that includes a datetimepicker control. The form gets its data from a ASP Web service. The database field that supplies the data to the DTP control can have null entries. Unfortunately the DTP control either displays the correct date when there is data in th...more >>



Missing characters when reading from a file
Posted by Gaël_Rosset at 5/30/2007 3:41:40 PM
Hello, I have the following reader function : public static string[] fileReadAllLines(string strFileName) { ArrayList content = new ArrayList(); using (StreamReader sr = File.OpenText(strFileName)) { string input; while ((input = sr.ReadLine(...more >>

DateTimePicker
Posted by mahesh.nimbalkar NO[at]SPAM gmail.com at 5/30/2007 3:04:59 PM
I am using DateTimePicker control in my form and I wanted this control to be shown in open state (like user clicked it to open) when form loads. Any idea how to do that? Thanks! ...more >>

Cancelling Form.Load event
Posted by Mark Baldwin at 5/30/2007 2:36:29 PM
I load some data from the database during the forms load event. If this load fails, then I need to bring up the error message and abort loading the form. How do I do this in .NET 2.0? There doesn't seem to be a way of cancelling the forms construction from within the load event. Also if an er...more >>

Problems with the Windows Forms Designer
Posted by ewpatton NO[at]SPAM gmail.com at 5/30/2007 1:39:14 PM
Hello all, I've been working on a project in VC++.NET 2005 which contains a form with a custom control. Today when I opened the project, the designer complained: Could not find type 'VIAWorkspace.Toolbar'. Please make sure that the assembly that contains this type is referenced. If this typ...more >>

Controls Hide/Show display performance
Posted by jweizman at 5/30/2007 2:39:46 AM
Hi I have a quite complex GUI in C#, where i save space by using many Panels, Pictures which hosts controls. When the user needs a function, i hide the "olds" panel, pictures.. then show the necessary ones. All these visible=true/false are killing my app in terms of display performance a...more >>

Display html page in winform(.NET 2.0)
Posted by zlf at 5/30/2007 12:00:00 AM
Hi, I have some html codes, and I need to present the rendered html page to user in winform program. I cannot find a helpful control in .NET framework. How to do that in .NET 2.0? Thank you ...more >>

combobox with command items
Posted by Abhishek at 5/29/2007 11:12:08 AM
Hi I want to have a combobox with some commands in it and a data source. Basically the list should look like command1 command2 ----------- data1 data2 data3 To solve this problem i decided to derive my own combo box form standard ComboBox control. I exposed 2 properties in this clas...more >>

Shown method for User control
Posted by mahesh.nimbalkar NO[at]SPAM gmail.com at 5/29/2007 11:01:35 AM
Hi, Is there any event like Shown for User Control? I am instantiating User control once and adding and removing to and from parent form panel dynamically. I wanted a event which would fire every time the User control is shown (when added to parent from panel) like Shown event is for Form....more >>

Anchoring issue.
Posted by BennyEz at 5/29/2007 11:00:37 AM
Lets say I have a control at the bottom of my form and I have it set to anchor Top, Bottom, Left, Right That does exactly what I want it to do.... Ok here's my issue. I have recently taken the contents from that form and placed them on a user control instead. I set the output type to dll fo...more >>

need help on regex
Posted by AVL at 5/29/2007 8:08:04 AM
hi, i'm a newbie to regex.... i need to check if a given string has more than two occurences of . in the begiining of string for ex, if string has value .test is valid but ..test is invalid Can you help me out with the pattern for such strings?...more >>

How can I use C++ codes with .NET Framework codes?
Posted by Allen Maki at 5/29/2007 2:58:02 AM
I would be pleased if someone gives me a general idea; how I am going to do this. I am using visual C++ .NET 2003. I made a simple program using conventional C++ code. This program accepts data from the user, does some calculations and outputs the result back to the user using th...more >>

How to tell if file is text based
Posted by Elmo Watson at 5/28/2007 8:03:43 PM
I want my application to load any file that is text based (php, txt, rtf, asp, etc) - - just not any binary file In the Open file dialog, that's easy, but I want users to be able to load the files by drag/drop - - so therefore, I will need to check for the types of files. I could go through ...more >>

PNG as Form background
Posted by Gaël_Rosset at 5/28/2007 7:21:37 PM
Hi, Do you know how to enable the use of a PNG as a form background and hence enable per pixel alpha transparency ? I have found some code on the code project but it either does not work with Visual Studio 2005 (the form editor stops working because I need to inherit from a Form derivate...more >>

WPF Picture drag/scroll like Google Map
Posted by James at 5/28/2007 3:21:02 PM
Hi Guys, Just wondering if the WPF has a control to move picture on a form like google map? I know in .net 2 the picturebox doesn't have scroll function... Thanks James...more >>

How to get mouse button state at any time?
Posted by Buddhist.CHinA NO[at]SPAM gmail.com at 5/28/2007 8:44:22 AM
I mean, to know if mouse button is pressed, especially, at any time. thx. ...more >>

How to completely prevent captured mouse from getting grabbed by others?
Posted by Buddhist.CHinA NO[at]SPAM gmail.com at 5/28/2007 8:20:42 AM
If one control has already captured the mouse, how to completely prevent the mouse from getting captured by any other controls (objects), even if a dialog popups, for example. thx. ...more >>

TreeView control
Posted by AVL at 5/28/2007 7:28:01 AM
Hi, I need bind a Treeview control in my windows form with xml file and also,,, display icons for each tree node.... how can I acheive it? ...more >>

Value in ListBox.Items.Add
Posted by cerebellum at 5/28/2007 12:47:55 AM
Hi, How do I add items in ListBox in VB.NET with the value; ListBox.Items.Add("Text") only assign the text instead of the values. Thnx ...more >>

MDI Child Window Toolstrip does not go away
Posted by Fallen at 5/28/2007 12:17:29 AM
Hi, I have an MDI child window with a toolstrip contained in a ToolStripContainer. The MDI parent also has a Toolstrip contained in another ToolStripContainer. If I drag my ToolStrip onto the parents ToolStripContainer and then close the child window, the toolstrip does not go away. This is n...more >>

BeginInvoke failing when executed in a form that was created in a worker thread...
Posted by Ian Mac at 5/27/2007 10:13:20 AM
I previously posted this in the VB.General forum, but thought that this one might be a better place for it...sorry about the double post. I have created a simple form with code that looks like this: '****************************************************************************************** ...more >>

Dbl-Click to load a file when app is already running
Posted by Elmo Watson at 5/26/2007 9:22:37 PM
I'm using the GetCommandLineArgs (VB.Net 2005) in my form load event GetOutsideFile(Environment.GetCommandLineArgs()) so that, when I have files associated with my app, and double click on a file, they will run the app and load the file in it. However, when the app is already loaded, double-c...more >>

ListBox crash when accessing SelectedIndex property.
Posted by Valerie Hough at 5/26/2007 3:50:02 PM
Can anyone please tell me how it is possible to get the following crash when accessing ListBox.SelectedIndex property: Message: Index was outside the bounds of the array. Stack Trace: at System.Windows.Forms.ListBox.ItemArray.GetEntryObject( Int32 virtualIndex, Int32 stateMask) at System.W...more >>

weird problem with ComboBox - DataSource contains data, but the Items collection stays empty
Posted by nphc67 NO[at]SPAM gmail.com at 5/26/2007 2:32:17 AM
I created a custom control which simply is a data-bound ComboBox. It has a custom property that causes an ArrayList of KeyValuePair elements to be passed to the DataSource property. It also sets the DisplayMember and ValueMember properties. What's weird, is the fact that my control sometimes w...more >>

How can I copy to the clipboard the contents of cells in a DataGri
Posted by Juan Dent at 5/25/2007 4:36:00 PM
Hi, I have a DataGridView from Windows.Forms and need to be able to copy the contents of the current cell to the clipboard, yet have not found the way to do so. Any pointers will be very appreciated. -- Thanks in advance, Juan Dent, M.Sc....more >>

HttpWebRequest and Vista Business
Posted by David W at 5/25/2007 3:35:55 PM
I am using the following code to send a request to a web site. It works fine on XP and Vista Home, but on a machine running Vista Business it gives the error, ConnectFailure. I can browse to the site in IE7 on the same laptop with no problem. This code works fine on other computers on the s...more >>

Expired certificates in the clickonce manifest.
Posted by Wally at 5/25/2007 12:32:00 PM
My VB apps written in Visual Studio 2005 are starting to have their certificate expiration date older than the current date. If I create or use a newer certificate I have to uninstall the app and reinstall. Is there a way to fix an expired certificate without uninstalling?...more >>

No more type ahead searching for treenodes in VS 2005?
Posted by Kevin at 5/25/2007 11:50:52 AM
In Visual Studio 2003 one of the default treeview behaviors I relied on was the ability to do type ahead searching for treenodes. Like if my treeview had nodes for the fifty states, typing "ark" would make the treeview select the Arkansas node. But, now that I've upgraded my project to VS 2005...more >>

Installing VS 2003 after VS 2005
Posted by Flack at 5/25/2007 8:53:01 AM
Hey guys, Is it possible to install VS 2003 on a machine that already has VS 2005 installed? I am not sure what the ramifications would be. Would VS 2003 overwrite newer components that VS 2005 installed or mess up file associations, etc.? Are there any other things that I need to loo...more >>

Settings for Windows Service
Posted by Demetri at 5/25/2007 8:13:01 AM
I have a requirement to create a windows service application that will need have settings (e.g. list values, connection settings, etc.) stored externally (i.e. not hard coded). To allow administrators to manage the settings I'll be creating a windows form application, very simple one, that ...more >>

Teredo tunnelling pseudo interface
Posted by johnmcg at 5/25/2007 3:28:02 AM
I just checked in 'Device Manager' to see if everything was OK, and saw a question mark against Teredo tunnelling pseudo interface. When I clicked on properties I got the message - 'Windows cannot start this hardware device because its configuration information (in the registry) is incomplete...more >>

UserControl inheritance and the designer
Posted by Bill E. at 5/25/2007 2:55:03 AM
I've created a base class from which many usercontrols will inherit. The base class contains declarations for controls and event handlers. A derived user control contains the actual form controls (labels, textboxes, etc.). Everything seems to be working fine at run time but at at design time, t...more >>

seems pretty simple but..
Posted by Harold Demure at 5/24/2007 10:54:39 PM
maybe not. (if this is the wrong ng, plz point me to the right one).. i'm trying to add simple text find capability to a tool at work and am having problems. i want it to work just like Notepad - that is the Find dialog remains in focus after clicking the Find button and at the same time, t...more >>

Running ReportViewer report in another thread using BackgroundWorker
Posted by Charlie NO[at]SPAM CBFC at 5/24/2007 4:27:25 PM
Hi: I'm trying to give user something to look at while a ReportViewer based report runs. It takes a while because app connects to data over the internet. Problem is report locks-ups when launched in DoWork event. Backgoundworker seem to work with non-visual stuff. Is the problem because ...more >>

Application type question
Posted by John at 5/24/2007 1:57:39 PM
Hi My vb winform app updates between site sql server and in house access db. The app needs to always run and is in the start-up of client's sbs 2003 (windows 2003) server. Problem is if client restart server and forget to login the app does not run. I am resisting doing it as a service ...more >>

Dynamic Control Example for 2.0?
Posted by lucius at 5/24/2007 8:04:21 AM
Could someone provide a quick example for .NET 2.0 WinForms of how to dynamically add a control "btnDynamic" to a form when button "btnStandard" is clicked. I don't want to hardcode "btnDynamic" to the form and make it simply visible, I don't want it to exist at runtime until "btnStandard" is ...more >>

regarding robohelp
Posted by Kamal at 5/23/2007 7:56:49 PM
Hi all , can any body tell me what is robohelp and how to use it in asp.net for displaying it like some help file. Its very urgent. Regards, kamal. ...more >>

Drag and drop image?
Posted by Richard Lewis Haggard at 5/23/2007 3:43:49 PM
Environment: VS05, C# I'm trying to come up with a good way to create and handle drag and drop images like those that are created by the File Explorer. My first attempt was to use ImageList but this only seems to work within a single control. Drag images are limited to the control in which ...more >>

ListBox SelectionMode None ??
Posted by Q. John Chen at 5/23/2007 2:43:00 PM
I have a ListBox only to display list of data and do not want user to select anything. I set the SelectionMode to None. It worked as expected. But, when I close the window. The generated Dispose method raises an ArgumentException: Cannot call this method when SelectionMode is SelectionMo...more >>

cross-thread UI updating?
Posted by spacemarine NO[at]SPAM mailinator.com at 5/23/2007 2:20:55 PM
hello, i am a long time asp.net developer, but new to winform programming. in the application ive been assigned, the mainform spawns a new thread to fetch a bunch of data from a method. this takes time, which is why its been placed into its own thread, allowing the rest of the ui to be usab...more >>

Confusing Error - Please Help!!!
Posted by mahesh.nimbalkar NO[at]SPAM gmail.com at 5/23/2007 9:07:07 AM
I have a line like resources.ApplyResources(this.label1, "label1"); in Form1.Designer.cs. But because of this line my form load event is not firing. When I comment this line, everything works fine. Any idea why this is happening and what happens if I comment this line? Thanks! ...more >>

Using EventLog
Posted by Micro-Active at 5/23/2007 12:00:00 AM
I'm trying to write to the eventlog but unfortunately I keep getting the error at the bottom of this post. The code snippet is as follows: string source = "My Program"; // Create the source, if it does not already exist. if (!EventLog.SourceExists(source)) ...more >>

Event Log
Posted by Micro-Active at 5/23/2007 12:00:00 AM
Sorry if this appears twice ... I sent it two hours ago and nothing appears in the newsgroup ... I'm trying to write to the eventlog but unfortunately I keep getting the error at the bottom of this post. The code snippet is as follows: string source = "My Program"; ...more >>


DevelopmentNow Blog