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 > august 2007

Filter by week: 1 2 3 4 5

Multiple languages in one project
Posted by Elmo Watson at 8/31/2007 3:05:31 PM
From what I understand, in AsP.Net apps, you can use/mix multiple language files. Is this also possible in Winforms? for example, if I have a VB.Net project, and find some online C# code that I want to use, is it possible to add the C# code into the VB.Net project? ...more >>


Dynamic WinForms Label & Textboxes
Posted by Patrick at 8/31/2007 6:36:07 AM
I have a WinForms app, with each forms having many Text-boxes that bind to a DataTable. Associate with each Textbox would be a (text) label. Is there any simple way such that I can "bind" the Text labels to the TextBoxes, so I can dynamically set each Label.Text property rather than having...more >>

Windows Forms security in app.config?
Posted by Burt at 8/30/2007 1:04:02 PM
I've only done web apps in the past, and now need to add security (user authorization) to a c# windows forms app. We've created an AD group for users who should have access. For a web app I'd add an <authorization> section to the web.config. I can't find examples of this using my app.config fi...more >>

Printing with the PrintPreviewDialog only outputs the last page
Posted by David Whitchurch-Bennett at 8/30/2007 12:26:06 PM
Hi there, I am using the PrintPreviewDialog control to print a document. Pages get added on the PrintDocument_PrintPage event using HasMorePages=True and this way a print document is created, with all my pages (11 in this case). The preview shows all 11 pages of this particular print doc...more >>

Membership/Roles in Winforms
Posted by Elmo Watson at 8/30/2007 10:07:59 AM
So, is Winforms able to use the same Membership/Roles scenario that ASP.net does? can someone point me to a location that shows how to implement this? ...more >>

How to create DataGrid column parser?
Posted by olek at 8/30/2007 9:02:11 AM
In my .net application I use Windows.Forms.DataGrid bound to the datasource to dispaly database contents. The bounding is done with GridColumnStyle and its property MappingName which is associated with the name of a DataTable column. Moreover the Format property of GridColumnStyle is set to "...more >>

User Control issue at design time
Posted by Roy Chastain at 8/30/2007 7:05:47 AM
The following is all relevant to VS 8.0.50727.762 (SP.050727-7600) I have .Net 3.0 installed along with the CTPs for WPF and WCF etc. I do NOT have Orcas installed. I have created UserControl A I have created UserControl B that has UserControl A on it I have created UserControl C that has Use...more >>

How to manually invoke PictureBox.Resize?
Posted by nvx at 8/30/2007 6:12:31 AM
Hello, I experience a strange problem with PictureBox I draw onto. My application has a fill-docked TabControl on its form and there is PictureBox on one of the TabPages. If I resize the form (hence the PictureBox should resize too) WITHOUT switching to the TabPage containing the PictureBox bef...more >>



MenuItem.ShortCut as DEL
Posted by Andy at 8/30/2007 5:58:19 AM
Hi, I have a menu item who's shortcut key is the DEL key. The shortcut is there to delete selected rows from a GridView. The problem is that if the user is editing a cell, it never receives the delete key to delete text within the cell. Any ideas on how I can get the cell to receive the k...more >>

form repaint, tabcontrol
Posted by Luc at 8/30/2007 12:30:01 AM
It seems when using a tabcontrol, repainting the form when clicking a tab takes a few split seconds, how can I repaint my form after all controls and data is loaded?? -- Best regards Luc ...more >>

How to apply xp style
Posted by gol at 8/29/2007 10:16:02 PM
Hi, I am using Visual studio 2005. I'm developing an application in c# for a PDA running the Windows Mobile 5.0 OS. I want to apply Windows XP style to my Windows form(on the PDA). I tried this: http://msdn2.microsoft.com/en-us/library/5d1acks5(vs.80).aspx but I dont have the "Enable Visua...more >>

Size of ToolStrip
Posted by Martijn Mulder at 8/29/2007 1:30:04 PM
The ToolStrip on top of my form is to small. I want to increase its height. Simply setting the Height-property doesn't change the height, though. So I tried to place the ToolStrip in a ToolStripPanel, that does react to changes in its Height-property, and by setting the Dock-property of th...more >>

Deadlock encountered during call to Invoke
Posted by Flack at 8/29/2007 12:00:02 PM
Hey guys, I'm getting into a deadlock condition every once in a while when running my app. When I see that it's deadlocked I "Break All" in the VS debugger and take a look at what the current running threads are doing. I noticed that one of my threads (the one I expect to be running at th...more >>

What happens to my threads...
Posted by Roger at 8/29/2007 11:32:04 AM
I have a windows service (I know, wrong group but I couldn't find a windows service group) loads an individual record from a db to do some work. I use a thread to do this because it is possible for a large number of requests to come through at the same, or close to the same time. Part of the ...more >>

Best way of designing Win Forms Call backs
Posted by Patrick at 8/29/2007 4:06:00 AM
I have a .Net 2 WinForm app which allow multi-windows to co-exist (in task bar). They are all spawned from a main-form. (i.e., Form A can start Forms B,C,D,E) 2 questions about call-backs Question 1) Forms B,C,D contains DataGridView, which I need to make sortable on multiple columns/f...more >>

Programmatically click on the treeview node
Posted by Sanjin at 8/28/2007 4:24:31 PM
Is it possible to programmatically click (and make node checked also) on the desired treeview (System.Windows.Forms.TreeView) node. I.e. pseudo code: myTreeview.Nodes[0].Click(); This code has to trigger the treeview AfterCheck event. Thanks in advance Sanjin ...more >>

Question on ClickOnce Deployment
Posted by BillG at 8/28/2007 1:53:52 PM
I have an app which I deployed last week. If I make a change to the app and it only affects changes to existing code. what I mean by that no new projects/dlls, no new controls etc. What do I need to copy up to the deployement site, just the new .exe? Bill ...more >>

A *generic* progress bar dialog with BackgroundWorker?
Posted by Jugalator at 8/28/2007 8:00:03 AM
Hi! I'm having some trouble with BackgroundWorker objects and making some "heavy" work that is *not* supposed to be in the progress bar dialog itself. I basically want to do something like this: ProgressForm form = new ProgressForm(); form.Show(); // ... Do heavy work here ... form.Upda...more >>

Graphics.DrawImage breaks with "Parameter is not valid"
Posted by Chris at 8/28/2007 7:42:06 AM
Hello I'm trying to draw a PictureBox with an image of size 40000 x 200 pixels. Because the image width is larger or equal to 2^15, drawing the image will crash. Code snippet: Bitmap bmp = new Bitmap(40000, 200); pictureBox1.Image = bmp; Exception Text: System.A...more >>

How to programmatically call the Windows Picture and Fax viewer?
Posted by B. Chernick at 8/28/2007 7:20:03 AM
I'm writing a Winforms program in VB, Dot Net 2.0. I have a datagridview on a form and I've defined a column as a DataGridViewLinkColumn. (I have the usual programmer's problem. I am not sure what sort of machines this code will run on so I am shooting for the lowest common demoninator.) ...more >>

set focus on the first control
Posted by Michele Len at 8/28/2007 3:24:03 AM
I need to create a method to set focus on first control in a windows form How i can do it?...more >>

need some advice in creating a plug-in type architecture fro windows app
Posted by milsnips NO[at]SPAM gmail.com at 8/26/2007 3:36:32 PM
Hi there, I would like some advice in how to go about creating a plug-in type windows form architecture, this is what i had in mind: a form similar to windows explorer with the grouped navigation items on the left, each group in the left nav section will represent a plug- in application wit...more >>

The background color of DataGridView looks incorrect after Alt+Tab, Alt+Tab
Posted by zlf at 8/25/2007 10:06:02 PM
Hello, I just implement a custom control that extends from DataGridView, every cell has different background. I found a problem, for now it seems to be erasing background incorrectly after selecting a cell, when switch to different application(hit Alt+Tab) and then once more to back. The back...more >>

Winforms version of User.Identity.Name
Posted by Elmo Watson at 8/24/2007 4:40:09 PM
In Webforms, I can access the user's network login (windows authentication) by: User.Identity.Name What is the Winforms way of doing this? ...more >>

Login Dialog
Posted by Amigaso at 8/23/2007 4:25:16 PM
I am new to C#, but not new in programming. I am trying to add a Login form to a test Win forms application. Somewhere in the internet I found a post suggesting using LoginDlg, I added the code provided LoginDlg ld = new LoginDlg(); ld.ShowDialog(); but I am getting...more >>

How can i find out if a control is databound
Posted by Martin P at 8/23/2007 2:44:50 PM
Hi all Firstly, sincere apologies for cross posting this, I did post on the DataBinding forum but the traffic there is very low so I'm not confident of a reply. Anyway, I'm trying to put together a method to loop through all controls on a form and see if any of them are databound. For...more >>

Transparent Forms?
Posted by Howard Swope at 8/23/2007 2:40:50 PM
We recently converted our .Net 1.1 app over to 2.0 and now our transparent forms are behaving differenctly. I was hoping someone might be able to shed some light on this issue... We have a windows form that is transparent. We set the background image to be a gif image that contains a transp...more >>

submitting a form with a webbrowser control as the target
Posted by Doug Salomon at 8/23/2007 1:38:01 PM
I've come across a problem with the Webbrowser control that I am hoping some of you folks might be able to help me with. FWIW, I am using VB.Net in Visual Studio 2005. On my company's website, we have a situation where a new window is opened (in this case, we actually use ShowModalDialog to...more >>

Playing multiple sounds continuously and simultaneously
Posted by TheCuriousOne at 8/23/2007 12:58:06 PM
I need to play multiple sounds (.wav files) simutaneously in my windows forms application. I have already taken a look at System.Media.SoundPlayer class. I tried the following but it didn't work: - Create two instances of SoundPlayer. - Called PlayLooping on the first one to play fil...more >>

Application.Run() without parameters, form doesn't stay open.
Posted by Oleg Ogurok at 8/22/2007 9:47:53 PM
Hi there, I need to start my Windows Forms application without showing the form initially. Then at some point, the application will be signaled to generate and display the user interface. I'm trying to use Application.Run() without parameters. Since this method doesn't return I start a separa...more >>

Windows Forms + System.Threading
Posted by jdkc4d at 8/22/2007 5:46:00 PM
I am working on a program where I need 2 things to happen at the same time. The form needs to load and at the same time I want to start a timer which after a certain amount of time kills the entire application. The user has to click submit on the form within 2 minutes, or else I want somethi...more >>

Windows Forms Designer Error
Posted by PHether at 8/22/2007 10:12:04 AM
I just recently converted a VB 2003 project to VB 2005. The project compiles and runs fine but whenever I try to view any forms in the designer I get a "Object instance not set" error. If I create a new Form I can view it fine though, the issues is only with pre-existing forms. I also conve...more >>

Control.Invoke and anonymous methods
Posted by Lee Crabtree at 8/22/2007 9:47:07 AM
I'm a little confused about using Control.Invoke with an anonymous method. It seems like the compiler is able to generate whatever glue code is necessary to turn an anonymous method into a delegate type in several situations, such as starting a thread: Thread workerThread = new Thread(dele...more >>

Smart client in Citrix environment
Posted by AutoTrackerPlus at 8/22/2007 9:40:26 AM
I'm trying to install a .net 2.0 smart-client application that uses the "click once" deployment method in a Citrix environment. If we log in as the admin on Citrix, we are able to install the application, but when we use a "normal" account that has very few privelages, we get the following ...more >>

Check if an event is already handled
Posted by mj2736 NO[at]SPAM yahoo.com at 8/22/2007 8:22:40 AM
I created a windows form control that inherits from the standard .Net DataGridView control, to which I've added custom functionality. Instead of using the standard control in my applications, I use my customized version. I have an event handler in the custom control for the KeyDown event that si...more >>

Detecting when user clicks Red X button
Posted by ssg31415926 at 8/22/2007 4:23:36 AM
Is there anyway to detect when the user has clicked the red X button to exit an application (as opposed to triggering some other event which runs code which sends the Close() message to the form? I know I can use the CloseReason property of FormClosingEventArgs but that shows UserClosing wheth...more >>

How to show only Year using DayTimePicker in C#
Posted by Sandeep Singh at 8/22/2007 12:00:00 AM
Hi Everyone, How to show only year on UI using VS DayTimePicker in C#. Looking forward for your response. Thanks Sandy ...more >>

To Check Already Shown Form?
Posted by wrytat at 8/21/2007 11:22:17 PM
How do I check whether a form is already shown (open)?...more >>

Opening Form By Name?
Posted by wrytat at 8/21/2007 8:46:00 PM
I have the name of the form (in String) that I would like to show. How do I show the form, if I only have its form name in String?...more >>

How to hide/remove an inherited control using the Designer?
Posted by Jeff at 8/21/2007 3:18:46 PM
My derived Form inherits several controls, including a Panel that is Dock.Top. Using the Designer on the derived From, how can hide/remove that inherited panel that this particular derived Form does not need? Setting the panel.Visible = false, prevents the Panel from drawing, but the Panel still...more >>

Disable code generation on double-click of control
Posted by Dan Reber at 8/21/2007 10:32:18 AM
There are times when I mistakenly double-click a control and then VS goes to the code window and either generates the code signature for the default event or it navigates to the default event. Is there a way to disable this feature? Thanks Dan ...more >>

ANN: VintaSoftTiff.NET Library v2.2 has been released.
Posted by ygpriv NO[at]SPAM gmail.com at 8/21/2007 5:05:55 AM
VintaSoftTiff.NET Library will help you to work with multipage TIFF files. You can add or insert image into multipage TIFF file, delete image from TIFF file - no temporary file is necessary. Image processing functions are also available: despeckle, deskew, border detection, rotation, blank page ...more >>

Convert from C# to VB
Posted by Chrysan at 8/20/2007 9:04:00 PM
How to convert the following code from C# to VB. var photos = (from photo in xroot.Element("photos").Elements("photo") select new PhotoInfo { Id = (string)photo.Attribute("id"), Owner = (string)p...more >>

Example of binding XML node to comboBox?
Posted by rj at 8/20/2007 8:58:01 PM
to Is there an easy way, to bind some xmlNodeList? I tried to write a public class property that read the xmlNode and returned List(Of String) containing the element names, which are what I want to display in the comboBox. I'm finding millions of examples of simple databinding to a text box,...more >>

Databound Checkedlistbox - Check certain boxes
Posted by aaapaul at 8/20/2007 1:31:42 AM
VS 2005 I have a databound checkedlistbox: With Me.LCheckedlistbox1 .BeginUpdate() .Sorted = True .DataSource = objB.Benutzertabelle .DisplayMember = "Nachname" .ValueMember = "Persno" .EndUpdate() End ...more >>

Bitmap.MakeTransparent() and Bitmap.Save()
Posted by Dylan Nicholson at 8/20/2007 1:15:35 AM
Hi, I've found quite a lot of messages and posts by developers at a loss as to how to use MakeTransparent() to generate a GIF89 image with a transparent color...but I've come across a particular problem that I've yet to see mentioned, namely that using bitmap.Save("filename.gif") works j...more >>

Setting Tab Size in TextBox
Posted by mj2736 NO[at]SPAM yahoo.com at 8/19/2007 10:22:57 AM
I need to write a function that will set the width of tabs in a multiline textbox windows control to a specified number of characters. Here is the code I've tried; it is changing the tab size, but not to the size I'm expecting. Am I going about this the wrong way? Thanks. private const int E...more >>

WinForms with one thread per window?
Posted by Hans Merkl at 8/17/2007 2:01:52 PM
My app displays real time data in grids on several forms. Each grid usually contains several thousand records. When we open a lot of forms the GUI thread can't keep up with updating all the grids (data decoding is done on a separate thread). Our clients have multi core CPUs but because the single...more >>

Can't load .dll after changing version
Posted by Jack Jackson at 8/17/2007 10:57:53 AM
I have two assemblies, AppObj and AppControls, that originally had the default version of 1.0.0.0. Another assembly, AppForms, references AppObj and AppControls as Project references, and contains a class that inherits from System.Window.Forms.Form. If I change the version of either AppObj ...more >>

Iterate child ToolStripMenuItem
Posted by Tergiver at 8/16/2007 9:12:02 PM
I have a MenuStrip with a bunch of menus and sub-menus. On one of the top-level menus I want all sub-items except the first to be disable/enabled based on Checked setting of the first. Like so: foreach (ToolStripMenuItem item in designToolStripMenuItem.Items) if (item != topDesignToolStrip...more >>


DevelopmentNow Blog