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 > february 2006

Filter by week: 1 2 3 4

FileNotFound Exception for OnHover after FileOpen.ShowDialog
Posted by Stork via DotNetMonster.com at 2/28/2006 10:44:40 PM
Hi, I have a program that has a row of buttons that use MouseEnter/MouseLeave to change between two different colored images. I also have other images that I pull from the filing system. Since I have several thousands pictures of product, putting the images in an ImageList is out of the questi...more >>

How can I determine when scroll bars become visible for a form?
Posted by Serg at 2/28/2006 6:15:52 PM
I have an MDIParent window. And I can`t catch the moment when scroll bars become visibe. this.VScroll and this.HScroll are always return false. Thanks in adv Serg. ...more >>

MDI w/ Form Maximized - all Child windows repaint - looks sloppy
Posted by Steve Hiemstra at 2/28/2006 11:00:17 AM
Hi All, I am using Windows Forms (C#.NET) in MDI mode. My 'View' is set to 'Maximized', but when I switch from Form-to-Form I am seeing all of the other Forms repainting (as non-maximized windows), and it looks very sloppy. Right now I am just doing BringToFront( ) on a Form that alread...more >>

Problem with images in ListView
Posted by GT at 2/28/2006 7:17:32 AM
Anyone knows how to add images to any given location in a ListView? Consider the example code given under the ListView class in the MSDN library (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwindowsformslistviewclasstopic.asp). The code generates a L...more >>

What does the KeyPressEventsArgs handle property do?
Posted by rsine at 2/28/2006 5:53:42 AM
I am trying to understand exactly what the handle property of the KeyPressEventsArgs does. I thought I could set it to false to prevent a key from being included into a textbox. For example, if I wanted only numbers in my textbox and the user pressed an alpha character key, then I would set th...more >>

Kind of event overriding
Posted by Marius Horak at 2/28/2006 4:25:09 AM
I have an object that works with an external treeview (myObject.TreeView = formTreeView) On myObject.TreeView = formTreeView assigment an AftreSelect event is being attached inside the object code. The problem is that formTreeView may have its AfterSelect event that will be executed before myOb...more >>

Determine running from IDE
Posted by Jared at 2/28/2006 12:00:00 AM
Hi, I would like to write a line of code which will get used in several debugging points, to look like this.. If app.Mode = IDE then Stop Else End Or if Stopped ended an EXE mode that would be good. Application.StartupPath? ...more >>

Permit Single Instance of Form
Posted by Jeff S at 2/27/2006 10:52:15 PM
What is a generally accepted method used to ensure that one instance, at most, of a form can be opened? Thanks ...more >>



Making my winform appear smoothly
Posted by hello_world at 2/27/2006 8:48:30 PM
I have a winform containing a TabControl with multiple TabPages. Each TabPage in turn contains several controls (Labels, TextBoxes ...). Now, when I load my form or switch TabPages, the controls within the form do not appear in a smooth manner, i.e, I see the outlines of the controls first for...more >>

Dialog and variables
Posted by Shawn M. at 2/27/2006 3:56:29 PM
Hello, I am looking for some infomation about dialogs and passing / sharring variables best practices. Q1 - What is the best way to pass variables to a dialog form from a main form? Constructor, properties? Q2 - What is the best way to pass the updated variables back to the main form? ...more >>

Able To Have Generic User Controls in .net 2.0? / Winforms and Generics
Posted by Peter Nofelt at 2/27/2006 3:03:02 PM
Hey All, I'm wondering if I'm able to have create generic user controls in .net 2.0 much like one can create generic classes. I would like to do this so that I can handle a set a types derived from the same base type within a user control Consider the following scenario: * I create a b...more >>

Referencing forms?
Posted by rsine at 2/27/2006 8:05:40 AM
I am trying to understand how to work with multiple forms. To aid in my understanding, I created a project with two forms each with a single button. When Form1's button is clicked, the form is hiddend via Me.Hide and Form2 is shown using ShowDialog. When Form2's button is clicked I want to cl...more >>

How to convert Message.LParam pointer to CREATESTRUCT to an object
Posted by leightonr at 2/27/2006 4:44:55 AM
I'm capturing WM_CREATE messages by overriding WndProc in C#/.NET. How do I then convert the CREATESTRUCT* that GetLParam() would return to an object that I can use in my code ? protected override void WndProc(ref System.Windows.Forms.Message m) { if (m.Msg == Convert.ToInt32(WindowsMe...more >>

Application has generated an exception that could not be handled
Posted by mms18 at 2/27/2006 4:23:31 AM
I have an application developed by .net framework 1.0 , the application works fine on my development machine , but on the non-development machine (the customer machine) the application sometime crashes giving this error message , note that i handeled the unhandled exceptions in my application ...more >>

Recursion in CreateChildControls
Posted by Iain at 2/26/2006 2:42:18 PM
In my custom control I have overriden CreateChildControls and the first few lines look like this. protected override void CreateChildControls() { Debug.WriteLine("CreateChildControls", "FeatureList"); Controls.Clear(); .. } what I am seeing is that the Controls.Clear line indir...more >>

How to set ListView scroll info?
Posted by Michael J. Salamone at 2/26/2006 1:58:04 PM
I have a listview whose contents are constantly being refreshed. When a refresh occurs, I delete all the items and add back. I want to maintain the scroll position before deleting all the items, and then want to restore it once the items are added back. I'm using P/Invoke Get/SetScrollInf...more >>

How do I show a visually inherited form?
Posted by rsine at 2/26/2006 9:21:20 AM
I just started working with inherited forms and am being befuddled with how to show the inherited form. As a test, I designed Form1 with a single button on it and added an inherited form that inherits from Form1. When my application starts, I would like to have both forms show at the same tim...more >>

Scrollbar problem with RichTextBox
Posted by Joe Pilot at 2/26/2006 3:06:50 AM
Hi, I don't know if this is a bug or is it just me not finding the solution? In VC# 2005 (running Windows2000) I have a multiline RichTextBox with ScrollBars set to "Both", but not forced. So I want to see no scrollbars at the beginning, and then, while filling up the Box with text, they s...more >>

MonthCalendar - display problem when selecting a date range
Posted by Gord at 2/26/2006 12:23:06 AM
I am using VS 2005, .net Framework 2.0 When I select a range of dates, the selected dates are whited out except for 1/2 of the first and last date (these are highlighted in blue). This issue also occurs if I select a date and then use the year spinner button to go back a year. To track ...more >>

TextBox AutoScale in VS 2005 designer
Posted by Agata Staniak at 2/25/2006 11:12:33 PM
I've recently moved to VS 2005 and .NET Framework 2.0 (from VS .NET 2003 and ..NET Framework 1.1). And I have a trivial problem in designer: 1) I create a new project with default settings (C# Windows Application). OK. 2) And on the main form I put a TextBox. I set its width to 100 pixels. OK ...more >>

Trouble with BindingSource
Posted by Joel H at 2/25/2006 2:06:26 PM
I've gone through a few demos and walkthroughs trying to become familiar with the new binding in vs2005. I'm having some success, but not every time. I've create a dataset with the datasource configuration wizard. I have 3 tables in this dataset (expense, category, and type). I drag each t...more >>

Catch Exception problem....
Posted by alegon NO[at]SPAM gmail.com at 2/25/2006 11:07:26 AM
How to catch the windows exception that shows a window with the name of the executable program and a messege saying : "[Program] has encounterd a problem and needs to close. We are sorry for the inconvenience", and three buttons, "Debug", "Send Error Report" and "Don't Send", in a dotnet applica...more >>

How to protect ADO.NET connection string under WindowsForms?
Posted by MilanB at 2/25/2006 12:22:26 AM
Hello I build WindowsForm application, that use MS Access database. I wish to protect AccessDB password that I use in connection string. Application will be used by final users and customers. I understand that .NET framework application is easy to decompile and trace it's variables. So ...more >>

how ??
Posted by patelviren1984 NO[at]SPAM gmail.com at 2/24/2006 11:48:16 PM
I want to run one perticular executable from Harddisk (installed lincenced application ) so there is entry of path where that application is installed NOW HOW CAN I LOCATE THAT PATH ??(USING VB.NET) ...more >>

Cursor on ListView
Posted by Vinit at 2/24/2006 4:41:30 PM
Hi I have a form in which there is a treeview alongside a listview. Now I have certain conditions when the Listview control is disabled. When this happens I would want the Cursor to be of type "NO" only when the mouse is over the ListView. It should be default over the other controls on the f...more >>

Override of WebBrowserSite IDocHostUIHandler using WebBrowser.CreateWebBrowserSiteBase doesn't work
Posted by Don Walker at 2/24/2006 2:44:24 PM
According to http://msdn2.microsoft.com/en-us/library/system.windows.forms. webbrowser.createwebbrowsersitebase.aspx I should be able to customize the behavior of the System.Windows.Forms.WebBrowser control as follows: "To use this feature, implement classes that inherit from the WebBrowser an...more >>

Windows Form - Datagrid problem
Posted by Gary Rynearson at 2/24/2006 10:23:44 AM
I have a dataset containing two related tables and a relation. I use the dataset's parent table as a datasource to a datagrid. This causes the diata to display with a '+' symbol at the left of the row - indicating the hierarchical relationship and allowing drilling into the child table. H...more >>

Detect button presses by intercepting WM_COMMAND
Posted by leightonr at 2/24/2006 8:40:38 AM
I want to insert a 'general' message filter into a .NET application that will intercept button presses. IMessageFilter cannot be used because it only intercepts posted messages. So I override WndProc and filter on WM_COMMAND messages to detect button presses in the application. However the ...more >>

Making "Everyone" the default option while installing the setup...
Posted by Vinay Kant at 2/24/2006 12:21:29 AM
I know the solution of setting the "Everyone" option by default at time of setup installation, by modifying the msi in the ORCA editor. Now, I have to create the msi with no dialog boxes(no start or progress interfaces), the problem is there's no way to change the default setting from 'Just...more >>

TableLayoutPanel - get cell clicked
Posted by JamesB at 2/24/2006 12:00:00 AM
Hello, I had posted this to the C# group but then realised here might be more relevant. This seems like it should be simple - on the double-click event of a tablelayoutpanel, I want to know which cell was double clicked in. I can't see any of the properties that look relevant to this, could s...more >>

Playing an animated gif file in a windows form application.
Posted by UJ at 2/23/2006 2:33:06 PM
What's the easiest way to play an animated gif in a windows forms application? TIA - Jeff. ...more >>

Solution / Request for Suggestions: DataGrid Button Column using C#
Posted by Alex Morris at 2/23/2006 12:59:24 PM
I've tried to find examples of adding a button column to a WinForms DataGrid. Unfortunately, all of the examples I have found only allow you to click on the button for the currently selected row. Below is a class that I wrote that displays clickable buttons for each row along with a sample for...more >>

My website : Opinions please.
Posted by John Swan at 2/23/2006 12:13:32 PM
Please, I have just created this site and am wondering what your opinion is from both professionals and amatures or the curious alike. Any opinions? www.integrated-dev-sol.co.uk Remove 123 from email address to reply. Anti spam and virus measure. ...more >>

How to see properties composed in the Trowel of Properties?
Posted by Alvaro at 2/23/2006 10:58:54 AM
Good day; I have this one problem; I declared struct "myNumber", and in a UserControl "MyControl". I declared a property myNumber named "NumberComposition", desire that in the properties palette of the created controls of MyControl type me appear the property in the same way as they app...more >>

ListView SelectedIndexChanged Firing Twice, possible solution?
Posted by anonymous.user0 NO[at]SPAM gmail.com at 2/23/2006 10:48:40 AM
I know that by design, the SelectedIndexChanged event fires twice when the SelectedIndex changes, once for the unselection of the previous index, and once for the selection of the new index. This is somewhat bothersome to me because I have listeners for those events that toggle the enabled stat...more >>

ClickOnce and not IE
Posted by Chuck P at 2/23/2006 7:50:12 AM
Does ClickOnce work with browsers other than IE now (didn't in January). If not what's the best workaround? thanks, ...more >>

DrawString method - diagonal text?
Posted by Philip at 2/23/2006 7:40:30 AM
Hi, I am using the DrawString method to add 2 strings to a label at right-angles to each other (so one is horizontal, and the other string is vertical) Both strings start with 'S' - now, is there any way to make that 'S' diagnoal instead of vertical ? That way it would really appearf as th...more >>

trouble with events (Paint event) question - please help
Posted by Philip at 2/23/2006 4:09:27 AM
Hi, I have a Splash form in my Windows Forms app. It has a label on it, and in the Paint event of the label, I draw some text on the label. But I also want the Splash form to load my MDI form and carry out the initialisation of the application... Trouble is, it only paints the Splash fo...more >>

generate Word from application
Posted by DalH at 2/23/2006 12:00:00 AM
I'm building an windowsforms application in dotnet2.0. I would like to generate an invoice in Word for printing with data from the sql server database. Is there a good totorial on how this is done? thanks! ...more >>

ListView SelectedIndexChanged firing twice
Posted by Jared at 2/23/2006 12:00:00 AM
Hi, I have a Listview that is firing an event twice and both time the selecteditems count is = 1 In the call stack there is form.show ...more >>

Slide-out and Splitter
Posted by Mystagogue at 2/22/2006 11:44:10 PM
Two questions. First, what does MS recommend / offer for creating those nifty slide-out dialogues (?) that Visual Studio has? Yes I'm talking about, for example, the default behavior of the Toolbox, or Properties dialogues in Visual Studio, which slide back and forth (Unless you select the p...more >>

Opening a ContextMenu without a parent control
Posted by Hans Merkl at 2/22/2006 6:04:32 PM
Hi, I am writing an Excel addin with C#. I have some ActiveX objects embedded within the spreadsheet and when the user clicks on one of them I want to show a context menu. Now the problem is that ContextMenu.Show() needs a Control object as parameter but in my scenario there is no Winforms ...more >>

Setting a control focus in OnLoad event.
Posted by Tony at 2/22/2006 5:29:53 PM
Based on data present when I load a form, I need to be able to set focus to a specific control. I have added code as the last line of my Load handler setting a control to have focus. e.g. control3.Focus(). But when the form is displayed, the first control with tab stop has focus instead of ...more >>

DataGridColumnStyle Format Property
Posted by Wishing I was skiing mom at 2/22/2006 4:41:27 PM
One of the columns of my datagrid is an account #. The actual field which is coming from a sql server database is defined as a character. Within the database the account # 200300001 come across in our financial system as 20030000.1. How do I define a character field format, as an example ...more >>

Start and minimize another application
Posted by JezB at 2/22/2006 3:33:10 PM
From within my .NET forms application I want to start and minimize another application, so I go: string eprog = System.Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles) + @"\EvilLyrics\EvilLyrics.exe"; if (File.Exists(eprog)) { ProcessStartInfo psi = new ProcessStartInf...more >>

The dreded EnableVisualStyles and External exception error
Posted by Joe at 2/22/2006 12:22:15 PM
We really want to use the visual styles in our app but get that stupid external exception error at the weirdest times. I call it like this: static void Main() { Application.EnableVisualStyles(); Application.DoEvents(); Application.Run(new MyForm() ); } The problem seems...more >>

how VB.NET to generate excel report(office 2003)
Posted by ken at 2/22/2006 3:27:27 AM
how VB.NET to generate excel report(office 2003) what component i need to reference into the asp.net application and the application will distribute to the client , does it free?...more >>

A Java implementation of CLR?
Posted by moop™ at 2/21/2006 10:41:57 PM
Hi, Is it possible to make such a gift so that MSIL programs can run on JVM? ...more >>

Timer problem
Posted by Fox at 2/21/2006 5:40:42 PM
Hello who knows ? when I am Hiding the Form the Time Control Associated with that form stops ? Regards FOX ...more >>

Client Requirements?
Posted by MasterBlaster at 2/21/2006 2:46:20 PM
I'm trying to find a site that will tell me exactly what the requirements from a OS perpective is required to run a .net 2005 smart client windows application from the clients machine. I know the developers machines need XP SP2 to install the IDE, but with the clients running the application d...more >>


DevelopmentNow Blog