Psst! Did you know DevelopmentNow is a mobile web site design agency?

Contact us for help mobilizing your site, or to sign up for our beta Mobile Web SDK!


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
May 2008
June 2008


all groups > dotnet windows forms > march 2007

Filter by week: 1 2 3 4 5

How to get arrow keys?
Posted by Richard Lewis Haggard at 3/31/2007 9:38:16 PM
I have a user control for which I'm trying to intercept arrow keys. I've subscribed to both the KeyDown and KeyPress events. Normal keys are delivered through the KeyPress event handler but arrow keys are not delivered here. They do arrive at the KeyDown event but only if the control key is ...more >>

Form inside a panel
Posted by Tiago M. at 3/30/2007 2:10:24 PM
Hi! I have a form inside a panel using: public void CreateNewFormInsidePanel(){ Form form1 = new Form(); form1.TopLevel = false; panel.Controls.Add(form1); form1.Show(); form1.BringToFront(); } Everything goes according plan when I'm creating a new form after a button click event bu...more >>

CheckBoxes based on contents of a db table.
Posted by Mufasa at 3/30/2007 1:33:49 PM
I have a program that will allow a user to select/deselect values for a record. On that record there are multiple check boxes which are defined in the database. What's the easiest way to get the list of checkboxes and display them on the screen. Here's an example: They want to edit a rec...more >>

Shared UI resources
Posted by Andy at 3/30/2007 11:32:10 AM
Hi all, I'd like to create resources in an assembly, which other assemblies may use to get resources from. Whats the best way to do this? Ideally, something like ResourceAssembly.Properties.Resources.OKIcon Thanks Andy ...more >>

Search Treeview
Posted by Tom at 3/30/2007 11:14:04 AM
Ok, I have a simple question but I don't think there is a simple answer. I want to: -search a Treeview node.text property for a value input by the user in a textbox -starting at the selectednode -search all levels -if the end of the tree is reached (and not found), start at the beginning ...more >>

PrintPreviewControl navigate pages problem.
Posted by Chris Dunaway at 3/30/2007 7:11:16 AM
I am using the PrintPreviewControl on a custom form to display a report. The report is multiple pages. I have a NumericUpDown control on the form to navigate the pages of the report. In the ValueChanged event of the UpDown control I change the StartPage property like this: private v...more >>

Security Exception - Deploying Windows .NET Application
Posted by None at 3/30/2007 5:56:49 AM
I am getting security exception when I try to access any network folder or database or when I am trying to create a file on the network share using my .NET Windows application. I know I can make it to work from my machine making the code FULLTRUST. What I need to know is how I would be able to...more >>

How to keep designer from setting property values?
Posted by barker7 NO[at]SPAM yahoo.com at 3/29/2007 6:14:19 PM
I have a user control that has a few public properties. These properties get set in the app at run time with arrays of data, but at design time the designer insists on setting these values. For one property it even tryies to create an entry in the resource file, which cause a build error in the ...more >>



Activiting a tab in TabControl programatically...
Posted by Charlie NO[at]SPAM CBFC at 3/29/2007 3:21:54 PM
Hi: How do you programmatically activate a tab in Tabcontrol so that it appears on top? Thanks, Charlie ...more >>

Data Binding and User Controls
Posted by ncarnal NO[at]SPAM gmail.com at 3/29/2007 10:51:23 AM
I am binding to a UserControl: MyControl.DataBindings.Add("MyProperty",bindingsource,"PropertyOfBindingSource") Within my UserControl, I have setup INotifyPropertyChanged and I raise the event PropertyChanged to tell the binding source I have made a change to MyProperty. But no update is ta...more >>

What is the best approach to keep opened window form info?
Posted by Andrew at 3/29/2007 9:22:06 AM
Hello, friends, In Windows Form applicaitons, it is often that a form window may need to interact with other form windows. For example, clicking on a command button in one form may bring another form to foreground and display text/image accordingly. Do we normally keep global refrences some...more >>

WebUserControl & Form
Posted by Ibrahim. at 3/29/2007 1:54:00 AM
Hi, I have a WebuserControl in a Windows form, I displayed some HTML in it. Now, how do I pass value from WebUserControl to it's parent form. Suppose I have a Link in the HTML with the ID and on Click event of the Link I want to pass the ID to the Parent Control (form) to some processing. ...more >>

BindingSource determine changes before calling EndEdit()
Posted by Rob Dob at 3/28/2007 10:53:28 PM
How do I determine if there are any rows within the BindingSource that have changed prior to calling the EndEdit(). I need to do this in order to archive some records and if I call the EndEdit() then it also wipes out the orginal version of the dataset record with the proposed changes., Howe...more >>

Questions on Layering, Packaging and Assemblies
Posted by Bill Gower at 3/28/2007 3:30:52 PM
As an example of a project, let's take an accounting system. Should the software be written and deployed in assemblies comprised of modules such as GeneralLedger, AP, AR, Payroll etc. With each one of these being modules and I guess projects with a solution? layout Accounting Solution ...more >>

My.Settings Application and User Scope Settings
Posted by MATT at 3/28/2007 1:10:03 PM
I am learning to use the Configuration and Application settings in VB.NET (VS2005) I understand the two different Scopes, Application and User, and that the Application Scope settings are Read-Only. These work great for what I need, except for a few things. First, for the User Settings,...more >>

Structure vs Class
Posted by Tim at 3/28/2007 11:47:57 AM
Hi Gurus, I am newbie and little confused with Classes(Ref type) and Structures(Value type). I know how to use both classes and Structures and also know the difference between value type and ref type, but I don't see much use of structures. Please help me by answering the question below. 1...more >>

Easily set TopMost for all forms in a project?
Posted by james at 3/28/2007 10:00:01 AM
I have a project with 50+ forms that needs to be made topmost. Is there a faster way than manually setting topmost=true for all forms in the project? Then how do I guarantee that dialogs get set topmost? Thanks, James ...more >>

DataGridView HeaderCell
Posted by Tom Costanza at 3/27/2007 5:50:02 PM
I can't seem to set the color of a DataGridView HeaderCell. I'm executing the following code in the WinForm's Load event: DataGridView1.Columns.Add("test1", "test1") DataGridView1.Columns(0).HeaderCell.Style.ForeColor = Color.IndianRed The code does indeed set the property, and...more >>

Datagridview column order bug
Posted by Eric at 3/27/2007 5:16:38 PM
I have a datagridview bound to a bindingsource. I inserted some unbound columns in the grid. I ordered them the way i wanted using the up and down arrows of the "edit columns" menu. Once in a while, the order of the columns scrambles randomly in design mode. I have to reorder all of t...more >>

Form Inheritance Error - "The base class could not be loaded"
Posted by robintw at 3/27/2007 4:18:31 PM
Hi, I am trying to use form inheritance in my application, and seem to have run into some errors. I have a base form called frmBase, and two forms which inherit from frmBase called frmInitialDisplay and frmSystemStatus. I can compile and run the application fine, but whenever I try and view...more >>

MDI Child title is visible in maximizing state
Posted by #$ at 3/27/2007 3:18:20 PM
Hi, I have a project with C#. this is an MDI application. the application contains a parent form, several child windows and some message boxes. My problem is the following, 1. If I maximize a Mdi child the title bar of the child window does not embed to its parent. rather its visible. 2. None ...more >>

Mix Dot Net 2 and Dot Net 1
Posted by hB at 3/27/2007 4:26:39 AM
Hello all. We have a project which is dot net 1.1 based. This project also provides GUI framework as well as web service and database for the in- house. We have another smaller project (comparatively) which we are going to develop. For this new smaller project we are more interested to devel...more >>

how to store null value in datetime in c# .net 1.1
Posted by HemantShri at 3/26/2007 8:32:31 PM
hi frnds, i have to store null value in c#.net 1.1 can some one help me out ??? Thanks & Regards, Hemant Shrivastava ...more >>

Databinding a datagridview control
Posted by Jim in Arizona at 3/26/2007 10:38:05 AM
Nearly all my experience so far has been with web forms so I'm just learning to work with windows forms. I'm trying to bind data do a datagridview but dont' know how. This is what I have so far. ======================================== Public Class frmSearch Private Sub btnSearc...more >>

Focus on Usercontrols
Posted by Paul Werkowitz at 3/26/2007 12:00:00 AM
Hello Netizens, I have a UserControl with some editcontrols on it. Now when the user enters some data, one of these children does have focus. It can happen that the usercontrol looses focus - and later gets it back.- I then want to put the input focus back to the child that had it before........more >>

Deploying ClickOnce client from Forms Authenticated server
Posted by Richard Coltrane at 3/25/2007 12:00:00 AM
Hello, I want to use ClickOnce to deploy my WinForms application to "paid" customers only. How can ensure that only registered users of my application can download/update it? Also what happens if the user stops subscribing/paying for updates? If i force a mandatory update to "current use...more >>

Why application settings are not saved?
Posted by Andrew at 3/23/2007 2:53:05 PM
hello, friends, I am using c#.net 2005 for a window form applicaiton. I bind form properties (like Location) to application settings. And, in the FormClosing() event, I add: Properties.Settings.Default.Save(); However, those new values were not saved. I did a quick test by creating a...more >>

DataGridView - catching a delete key in a Calendar cell
Posted by Richard Lewis Haggard at 3/23/2007 12:55:07 PM
How would one catch a delete key, backspace key, control X or other indication that a user wants to delete the contents of a cell? I used the example code in MSDN's "How to: Host Controls in Windows Forms DataGridView Cells" as the basis for a GridDate column, I've created a column that hos...more >>

Smooth scroll of tall DataGridView row
Posted by Richard Lewis Haggard at 3/23/2007 11:30:06 AM
I have an unbound DataGridView control that has some cells that may contain more multi-line text than can be completely displayed in the available screen space. When the height of a row exceeds the DataGridView's height, it becomes impossible to view the out of sight portion of the row that is...more >>

Application.Run(new Main()) - The specified module could not be found.
Posted by LQQKIN at 3/23/2007 10:11:33 AM
HI, When i try to run amd debug my project i get following error. - The specified module could not be found. - This error is getting thrown on Application.Run(new Main()) From what it looks like it can not find some DLL that i have referenced. If i create a new project with out those d...more >>

Search Word Document
Posted by JB at 3/23/2007 9:06:58 AM
I would like to create a stand alone application from which the user can select a folder containing a bunch of word documents and then allow them to search the contents of the word documents. I notice there is a MS Indexing Service, but think this is more of a server application. Is there anyt...more >>

unexplainable interaction between user controls
Posted by Corey Wirun at 3/23/2007 7:42:03 AM
Hi All, I've got a C# forms project under VS2005. My project references two DLL's - each with a user control in them (one with a custom radio button, one with a custom grid control). Wierd stuff started happening when i would set the 'Checked' property of one of the radio control object...more >>

After hide model form, parent form may change z-order(may not topm
Posted by Fluxray at 3/23/2007 6:01:37 AM
Objective is simple. Show Form1 first and maximize it (can make observation easier), then after click button1, show form2 as modal dialog. When hide form2 by click button2, the expected behavior is that form2 hides and form1 becomes the topmost form. The funny thing is that, sometimes after ...more >>

Long Running windows app, best design approach
Posted by Jenbo at 3/23/2007 4:55:19 AM
Hi, I have a small client app that I want to launch with Run key in reg, but what I would like to happen is when the user closes the form that the app has, the app remains running and will be able to restart in say 15 mins, based on some config settings. This is a app for collecting data from th...more >>

tab cycle - not happening - getting stuck on last one..
Posted by Oli at 3/23/2007 2:40:13 AM
hi all - on my winform I can tab though my controls (textboxes, button) ok - but the focus gets stuck on the last one in the sequence - rather than cycling back to the first - anyone know why/how to fix?? also - doing a "shift tab" cycles backwards ok - until it hits my password entry text ...more >>

Disabling resize when double clicking on title bar - how do I keep my app fullscreen Always.
Posted by Bob at 3/23/2007 12:00:00 AM
Hi all, I wish to keep my application maximised at all times .. however right now even though there is no control box double clicking on the title bar will 'free' the app and it can be dragged around the window. My poor users get mightily confused in this situation as half the app hangs of...more >>

System.OutOfMemoryException
Posted by Rajat at 3/22/2007 9:12:12 PM
Hi, I am facing the memory exception in the code given below while creating the graphis object. Since "ProcessLevelOneData" function is called very frequently so graphics objects are being created very frequently. We are also disposing the graphics object at the end of the function.So why a...more >>

Drag & Drop programming editor
Posted by cody at 3/22/2007 6:05:16 PM
Hi, I'd like to create some kind of click & play editor which will also make heavy use of drag&drop and cut/copy and paste of elements. Goal is to create an editor where users can create simple programs without writing a single line of code, it will be some kind of interactive UML diagram o...more >>

TableLayoutPanel - equal percentage sizes
Posted by Paul E Collins at 3/22/2007 3:37:27 PM
I am using TableLayoutPanel for a layout with a varying number of rows and columns. In the most common case, I want one row with five columns, and I want the horizontal space divided equally between the columns (i.e. each one should be 20% of the total width). I think the code that follo...more >>

Create BitMaps from Windows forms Labels
Posted by rajendra.mishra NO[at]SPAM gmail.com at 3/22/2007 12:30:59 PM
Hi I have Labels in my Windows Form displayed as Label1 : Data 1 Label2 : Data 2 I also have an Image on the form. I need to Create a Bitmap file which would be like a snapshot of the forms screen having the labels and the image as is shown in the screen. The BitMap file would consist of the l...more >>

Checkbox value in datagridview
Posted by Eric at 3/22/2007 11:12:17 AM
I have a datagridview with two columns. That is connected to a bindingsource. Each column contains a single control, a checkbox. I want that each time the user checks a checkbox, the checkbox in the other column in the same row unchecks. I am amazed I wasn't able to do something so appare...more >>

How to disable all buttons in a window form?
Posted by Andrew at 3/22/2007 7:11:13 AM
Hello friends, I tried to use the following code to disable all command buttons in a windowform, but it was complained when compiling, saying The given expression is never of the provided ("System.Windows.Forms.Button") type, unreachable code. foreach (Control ctrl in this.Co...more >>

switch from non-modal to modal while form is displayed
Posted by simonjarita at 3/22/2007 3:41:42 AM
I've got a non-modal form that wants to become modal for a while due to some user input while it is already displayed. Closing and reopening the form is no option as the switch has to be fast. Or said differently: how can a form capture all user input from the entire application, then release th...more >>

Button with Dropdown
Posted by Andrew Neillans at 3/22/2007 3:21:40 AM
Hi all, Is it possible (in .NET 2) to have a standard button feature a drop down element, the same as you can see on the open dialog (the open button has Open and Open With on a dropdown)? Does anyone know of any 3rd party controls that implement this? Regards, Andy ...more >>

question about using multiple splitter controls
Posted by RMZ at 3/21/2007 10:15:29 PM
I have a WinForm with two Splitter controls on it. The form divides up in this order: Tab Control (docked to the left): Splitter1: RichTextBox (docked to the left): Splitter2 After Splliter2 there is some empty space on the form where I have a few button controls. When the app starts the fo...more >>

ClickOnce Vista .Net 3.0 install bug?
Posted by TheRHogue at 3/21/2007 6:34:03 PM
I have Vista Home Premium as configured on a new Dell machine. I have been able to deploy/launch XBAP's from IIS localhost, but trying to run a .application type app caused IE to bring up a dialog saying ".Net 3.0 is not installed, please install it." Of course, trying to install .Net 3.0 ...more >>

I want to have the Minimize, Maximize, and Help buttons
Posted by PIEBALD at 3/21/2007 10:13:30 AM
I want to have the Minimize, Maximize, and Help buttons on a WinForm (.net 2.0), but the help says " The value of the HelpButton property is ignored if the Maximize or Minimize buttons are shown. " A) Why? Shouldn't the developer be allowed to decide? B) Is there an easy work-around?...more >>

Need advice please.With-End With
Posted by Tim at 3/21/2007 8:20:33 AM
Is there any performance advantage if I follow example 2. Which one is preferred. Example 1 Dataset.Table.Column1.DefaultValue =SomeThing Dataset.Table.Column2.DefaultValue =SomeThing Dataset.Table.Column3.DefaultValue =SomeThing .... .... Example 2 With Dataset.Table .Column1.Defa...more >>

Binding semantics when the model is changed
Posted by Richard Corfield at 3/21/2007 2:32:27 AM
I'm having trouble with a form that is bound. The form contains amongst other things a TextBox and some DataGridViews. The problem is when the user enters text into the text box, then clicks on a button to add a row to a DataGridView. Following my company's style guide that button is on a tool...more >>

The description for Event ID ( 4521 ) in Source ( DNS ) cannot be
Posted by Tom Beekmans at 3/21/2007 1:55:18 AM
After installing SP2 on WY3K enterprise server with DNS, this event is generated, does anyone have a solution for this? The description for Event ID ( 4521 ) in Source ( DNS ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display...more >>


DevelopmentNow Blog