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 > january 2006 > threads for january 15 - 21, 2006

Filter by week: 1 2 3 4 5

3rd Party Control Suite Considerations
Posted by Jeff at 1/21/2006 2:30:22 PM
I'd like to hear from any of you who have *actually used* any of the popular 3rd party control suites (e.g., offerings from ComponentOne, Infragistics) for .NET Windows Forms application development. What has been your experience? FWIW I was a huge fan of Infragistics COM controls, but foun...more >>

Need Coding Help With Updating Dataset
Posted by Terrance at 1/21/2006 1:46:03 PM
Good day, I hoping someone can help me with a problem that I have. I'm trying to update a dataset then my datasource using the sqlcommandbuilder in vb.net 2003. I only want to update fields that actually have been changed by the user. So this is the code I have for one field as an example: ...more >>

ErrorProvider
Posted by Jay Pondy at 1/21/2006 9:21:20 AM
I have a textbox which requires a numeric value and I am using the Validating Event to call the ErrorProvider.SetError method when the validation fails. I also have a Cancel button with the CausesValidation property set to FALSE. If I give the textbox focus and enter an empty string and then a...more >>

Accessing an EventLog on a Remote Server
Posted by Al at 1/20/2006 10:00:02 PM
All - I have an app that has a simple datagrid being filled with an EventLog.Entries. When the MachineName is local ("." or the machine's name) all works fine. When the application tries to access another EventLog on a remote server, there appears to be a security issue or networking issue. ...more >>

Editing HTML inside a winform
Posted by ThePinkPanther at 1/20/2006 5:25:02 PM
Hello I need to let the client of my program edit HTML code within one of the forms of my program. I am looking for a Control that encapsulates Visual Web Developer (I'm not sure whether that's the right phrase to use,i mean "encapsulates" as Windows.Forms.WebBrowser encapsulates IE). Tha...more >>

Save lines drawn in the picturebox as an lmage
Posted by Yash at 1/20/2006 9:06:24 AM
Have used DrawLine() method to draw some lines in the picturebox (sort of a barcode) in the picturebox paint event. This diagram has to be saved as an image in bmp or tiff format. But the problem is that these lines are not recognized as the image o the picturebox. It shows picturebox.im...more >>

Cannot make a new form active
Posted by jjeffers1 NO[at]SPAM hotmail.com at 1/20/2006 8:38:13 AM
Hello - I am an experienced web programmer who is new to windows forms programming. The problem I am facing is passing control in a winforms app from one form to another. Essentially I have form1, which has some text fields, and upon submittal of those fields using a button click, I want to save...more >>

My events are all messed up: HELP!!!
Posted by Aaron at 1/19/2006 11:40:56 PM
OK, I was working way too late tonight. I have one form with one tab control. I have eight tabs. And hundreds of controls on those various tabs. I don't know why I did this but anyway I cut the tab control in order to position a panel underneath then pasted the tab control back. Now all of my ...more >>



Graphs in c#
Posted by Yossi And Inbar at 1/19/2006 11:16:46 PM
Hi, I am using VS2003 C# Is their any Free Graph Component in C# .Net ? How can i get it ? Thanks, Yossi ...more >>

DataGridViewLinkCell: cannot set ReadOnly to false
Posted by Marshall at 1/19/2006 5:53:27 PM
Hey all, Working in C# with the Windows Forms 2.0 "DataGridView" control here, and a column of cells of type DataGridViewLinkCell. The DGV is bound to a datasource, and user is allowed to add rows. The subject line is a bit of a misnomer in that I *can* set the ReadOnly property to false...more >>

Taskbar state change notification.
Posted by Dave Leach at 1/19/2006 5:02:02 PM
I am developing a Windows Forms application using VS.Net 2003 in C#. My application is normally sized to cover the entire desktop when it is not iconified. I would like to resize the application depending on whether the Windows TaskBar is in the hidden or displayed state. Is there a notif...more >>

Help with reading FILESIZE
Posted by John Cosmas at 1/19/2006 12:29:58 PM
How do you read the filesize of a document/file using the SYSTEM.IO.FILE or whatever other function that might work? Please recommend. ...more >>

Word merge document automation
Posted by Rob Oldfield at 1/19/2006 10:54:14 AM
Any Word automation gurus out there? I would like to grab the output of a Word merge and split each page off into a separate document (so that I can push them into folders relevant to each recipient). My thought is that I should be looping through the document, selecting section 1, 2, 3...., ...more >>

#include <windows.h> causes compile error
Posted by brian_harris at 1/19/2006 10:02:03 AM
I am devloping a simple .net windows form using C++. without includeing windows.h it compiles and runs, but is not really doing anything. when I add the #include <windows.h> then I get various compiler errors listed below: c:\T02010_NET_ora9\cgi-bin\programs\ManualKeeper\Form1.h(120): error...more >>

how to move selected row to the top of the dataGridView (c# - 2005)?
Posted by Mladen Belaj at 1/19/2006 9:24:58 AM
After I select a Row with this.dataGridView1.Rows[xRow].Selected = true; how to move this selected row to the top of the dataGridView1? (c# - 2005) ...more >>

Bug in VS 2005?
Posted by David Veeneman at 1/19/2006 9:23:48 AM
I think I may have stumbled across a bug in Visual Studio 2005, .NET 2.0, or both. The Anchor property doesn't seem to work if a form's size is bound to a user setting. To reproduce the problem: 1. Create a Windows Forms application. 2. Add a label to Form1. Change the background color ...more >>

Design time image of a user control 2005
Posted by Jerry Langley at 1/19/2006 9:12:05 AM
I have noticed that in 2005 the public properties of a user control run at design time to format the items on the screen. In building user controls it has been necessary to put if ( XXX != null) around many commands in my "set" blocks to avoid having the IDE simply abend and go off the screen...more >>

Binding form location property at design time?
Posted by David Veeneman at 1/19/2006 8:39:42 AM
I'm having a problem getting design-time property binding to work with a form's location property. I want to bind a form's Location property to a user setting. Here is what I did: -- I started with the Location property under Application Settings in the Properties window. -- I added a...more >>

Unable to set focus of a textbox inside a groupbox
Posted by Emma Middlebrook at 1/19/2006 5:03:51 AM
Hi, I am having great difficulty in setting focus to a textbox that is inside a groupbox, why is that? I have checked and the textbox.CanFocus returns false.... I can set the focus to the groupbox but that doesn't help me because I still then have to tab to the text box. Can anyone sugge...more >>

TabPage and PictureBoxes
Posted by Charles A. Lackman at 1/19/2006 1:43:29 AM
Hello, I am working on a program that Adds a Tab page with a picturebox inside it for each page of a TIF and it works well. If I have a 3 page TIF the application add 3 TabPages and inside each TabPage Adds a PictureBox and properly displays the Images. I also do other things like add tex...more >>

Activate event not triggered
Posted by Martin at 1/19/2006 1:00:03 AM
It seems that if I activate a application on a Windows Mobile Device from the Memory control panel app that the Activate event on the main (and only) form of this application is not triggered. Is this normal? WM 2003 CF 1.0 SP3 I haven't tried this on CF 2.0 but I need to support 1.0 anyw...more >>

Opening another GUI thread
Posted by uzi at 1/18/2006 11:23:35 PM
Hi Recently I had a problem in which I had window opened that had a slider which was updated by raising an event on that window. The background window was still available, and the user clicked on it causing it to perform a long time operation. During this operation the event...more >>

Textbox displays more than I hoped for...
Posted by pauldr at 1/18/2006 8:11:49 PM
I want to thank Morten Wennevik for his help on my last hurdle, but now I have another one. I have a string value going to a label. The label displays the following: System.Windows.Forms.TextBox, Text: Paul I just want 'Paul' to be displayed. Any suggestions as to why this is happen...more >>

setting listview column width?
Posted by hazz at 1/18/2006 7:24:08 PM
when I display the listview as per the following code, I only see the 'F' of "File Type" and the 'L' of "List Item text" underneath the column header. How do I set the column width to a specified width? Thank you. -greg listView1.Columns.Add("File type", 20, HorizontalAlignment.Left); ...more >>

OnPaint event invoke after i close the form, normal??
Posted by eleazarm at 1/18/2006 5:43:09 PM
I have an app with only one form, when i close the form (and after dispose method is executed) the override void onpaint of the form is called again, it's this normal??? i thing maybe in dispose method add 'this.SuspendLayout();' to avoid the onpaint again, but i don't thing a smart solution ...more >>

DataGridView with a ComboBox column error (listing objects)
Posted by gsa at 1/18/2006 4:59:13 PM
Scenario: Two classes (objA and objX), the class objX has a field of type objA. class objA { private double _a; public double a { get { return _a; } set { _a = value; } } private int _b; public int b { ...more >>

images inside a listview
Posted by WAkthar at 1/18/2006 4:42:15 PM
Hi, I have a listview with only one column. In the first row I am adding an image with no text. In the second column I am trying to add some text but the text gets put in the column but after the image. That is _____________________ |<IMAGE> | | So...more >>

Targetting 32 bit on x64
Posted by Iain at 1/18/2006 4:38:05 PM
I am writing some 32 bit ATL controls in C++ that I am trying to test in a vb.net app. THe problem is my machine is runing 2003 x64 so the VB app is running ins 64 bit so can't load the atl controls (class not registered). I believe you can target the dotnet app to 32 bit windows, but it's ...more >>

Given an 'event', how do I obtain underlying delegates ?
Posted by The One We Call 'Dave' at 1/18/2006 4:31:00 PM
Hi, Various custom controls in my WinForms application register for the 'Application.Idle' event on load, and unregister on dispose. To avoid memory leaks, it's essential that I remember to unregister on dispose. Before my application exits, I'd like to do an 'assert' to assure mys...more >>

TextBox.GetPreferredSize().Width is always 4
Posted by Steve Whine at 1/18/2006 3:30:52 PM
Hello, I am trying to write a new LayoutEngine class following the example given in the VS.NET 2005 help. My problem is that TextBoxes always have their AutoSize property set to 'true' yet return a Width of 4 in GetPreferredSize(). In the help entry for TextBoxBase, it says "This property ...more >>

Dataview Sort not working
Posted by WhiskyRomeo at 1/18/2006 2:10:02 PM
Below is the code. This code should sort Subjects by SeqNo or LastName. But it has no affect on the order. The order remains the same as original dataset (ds). What I am doing wrong? WR Dim dvS As New DataView Dim iPerson_ID As Int32 Try dvS = ds.tblSubje...more >>

Tabbed interface
Posted by Paolo at 1/18/2006 11:08:13 AM
Hi, I have a main windows forms with a TabControl. When I open a new form, I add a TabPage to the TabControl, and I add my form to the controls collection of the new page. All work very fine, but, the form inside the tabpage appear with the caption disabled, when it's regularly enabled. Someo...more >>

.NET 2.0 Books for winforms
Posted by Mark at 1/18/2006 10:04:58 AM
We've built a ton of ASP.NET applications, and now have a need to build several WinForm applications. We're looking for 2.0 books. I found the two below - any other recommendations? Thanks in advance. -Mark Pro .NET 2.0 Windows Forms and Custom Controls in C# http://www.amazon.com/gp/p...more >>

Using images in ListView
Posted by TheJediMessiah at 1/18/2006 8:42:06 AM
I have a listview with only one column. In the first row I am adding an image with no text. In the second column I am trying to add some text but the text gets put in the column but after the image. That is _______________________ |<IMAGE> | | SomeTex...more >>

resize label image
Posted by brian_harris at 1/18/2006 8:00:04 AM
I have a .jpg image that I use in another application. It represents our company logo and I want to place it in form. But the image is way to large. Is there a way in .net window forms to shrink the image to fit into size of window that I have designated in a label object. Or is there anoth...more >>

IE hosted control css display style
Posted by Will Holley at 1/18/2006 7:05:05 AM
We have a run into an apparent bug involving the rendering of .NET winform controls within IE 6 (running on XP sp2 and .NET 2.0) . If one of a hosted control's parent elements has style.display == 'none' when the control is created, the width and height of the control will be 0. If the paren...more >>

Current thread must be set to single thread apartment (STA)
Posted by Steve Bugden at 1/18/2006 6:23:02 AM
Hi I have just upgraded a vb.net 2003 project to 2005. I get an error when trying to access a FolderBrowserDialog as follows Private Sub Button1_Click_2(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click FolderBrowserDialog1.Description = "Plea...more >>

To lock a form
Posted by wrytat at 1/18/2006 1:29:04 AM
This is a very simple question, but I don't know where to find the answer. I have a button on my main form of my windows application, when the user clicks on it, a second form will appear. How do I make it such that the second form will stay focused forever, until it is closed? That means the ...more >>

MDI child forms, if one maximizes, all maximize?
Posted by Earl at 1/18/2006 1:16:48 AM
What causes all forms to resize the same as the others within an MDI container? I've noticed that maximizing or minimizing one form is passed to all other forms within that container. Within the MDI container, I instantiate and display the forms with the following: Dim OwnedForm As New frmA...more >>

Reportviewer: how to display different reports in same viewer
Posted by Jan DHondt at 1/18/2006 1:16:02 AM
Designing a winform with a reportviewer that shows data for a single .rdlc report is no problem, the wizords help to setup the datasource, the bindingsource and the tableadapter instance and bind it to the reportviewer and .rdlc report. But I tried to keep the same form to display another re...more >>

Custom Drawing in a UserControl
Posted by Zachary Turner at 1/17/2006 7:20:12 PM
I have an object derived from UserControl which I place on my form. The UserControl handles the OnPaint event for itself, so that I can do custom drawing of my control. I have a problem with this custom drawing, I'm hoping someone can provide some insight. I placed my control on the page abou...more >>

V1.1.4322 is being requested after I updated ATI catalyst
Posted by crash 98 at 1/17/2006 7:07:03 PM
When I bootmy computer I get 2 dialogue boxws open. They state I should have the above version of the dotnet framework. I have a Raedon 9600 AGP card and all my updates are usually from windows update automatic. Most times I choose Custom as multi lingual stuff is useless to me(I think). I buy...more >>

Japaneese IME
Posted by Lloyd Dupont at 1/17/2006 5:46:12 PM
I wrote a custom text editor. Now I have some japaneese customers who have a problem with it. Apparently, according to my understanding of what they said: There is an IME window and when they used it to enter text, characters are doubled. What is this IME window / tool? How could I have it o...more >>

using listview
Posted by WAkthar at 1/17/2006 5:19:19 PM
Hi, I need to be able to display a listview with the following functionality. The listview must be able to display different types of information. There are normally 3 types. Type 1 has only 1 column. The first row must display an icon showing the status of this type. The following rows must...more >>

What is this?
Posted by Fabrizio Romano at 1/17/2006 3:22:54 PM
Hi everybody. If you load windows calculator and right-click one of its button you'll get a context menu with just one link. If you click on this link, a yellow "panel" shows up telling you all you need to know about that button. My question is: 1-what is that yellow panel? a control? someth...more >>

iterating through forms collection in .net
Posted by Mike at 1/17/2006 12:35:09 PM
Hi, How can I iterate through the forms collection in vb.net (2003). In VB6 I did: For Each f In Forms blah Next f Thanks Mike ...more >>

Opening a new form
Posted by Bala Nagarajan at 1/17/2006 11:52:29 AM
Hello, I am trying to open a new form (form A)from another forms' (form B) load event but the formB when it opens the controls within it does not paint properly. I see the controls are transparent. Am i doing something wrong by opening a new form from a form's load event? //here is t...more >>

Visual Styles For Toolbar
Posted by Euphilos at 1/17/2006 11:40:03 AM
Hello, I'm working on a custom control which I'd like to have a background identical to that of the XP-themed explorer toolbar. Could anyone tell me which class of the VisualStyles hierarchy contains that look? VisualStyleElement.ToolBar seems to have only controls and separators, and ...more >>

Minimized parent mdi form not properly restored
Posted by Jan_Weingärtner at 1/17/2006 10:39:33 AM
Hi. I have a MDI form with some child forms. Only one of the child forms is visible at the same time. It is maximized and all boxes are hidden to simulate a one-form-application. The problem: After minimizing the parent mdi form it can not be properly restored from the task bar. It is show...more >>

problem in persisiting a collection
Posted by Kaimal at 1/17/2006 9:56:38 AM
Hi I have a user control in which i have a collection (ArrayList) of userdefined objects (A class with two public properties). I am using a custom editor derived from UITypeEditor to edit the values of this collection. The problem is that values in this collection are not persisted ...more >>

ListBox question
Posted by Ilya Dyoshin at 1/17/2006 9:20:51 AM
Hi all! In my form I use ListBox to put some technical data - log of my program. And it groes up to very huge massive in memory. But exactly I need only 100-150 last records. I use logListBox->Items->Add(System::String("log records"); for adding information. So I've been thinking about t...more >>

Raise an event?
Posted by John Francisco Williams at 1/16/2006 10:09:42 PM
Hi All. How do I cause an event to be "manually" fired. I have a user control that contains a button. What I need to do is this: When the user clicks that button, the event "Click" for the user control that contains that button, needs to be fired. I tried "RaiseMouseEvent", but there is almo...more >>

Richtextbox beep?
Posted by Chris at 1/16/2006 8:49:13 PM
As part of an application I feed text into a richtextbox in readonly mode. If I feed in an empty string the application beeps e.g.: String blah = ""; richTextBox1.SelectedText = blah; result: <beep> Why is this? Chris ...more >>

.NET 2.0 DateTime picker
Posted by A.M-SG at 1/16/2006 8:18:32 PM
Hi, How can I change the format of DateTimePicker to YYYY/MM/DD in VS2005? Thank you, Alan ...more >>

Highlight some items of a combobox
Posted by nathan.atkins NO[at]SPAM alcoa.com.au at 1/16/2006 7:56:34 PM
I have a combobox with a list of items, and depending which one is selected it displays data relating to the selected item. I want to highlight some of the items in the combobox which meet certain criteria, but i cant find any info about doing this I have tried Combobox.Items.Item(i).backcolo...more >>

How to convert a selectedIndex to SelectedValue for ComboBox
Posted by Mark L. Breen at 1/16/2006 4:37:42 PM
Hello All, I have a selected index for a combo, which I percieve to be the best value to use when programitically maniplating combos. What I want to be able to do is retrieve the Selected Value for a given Selected Index It may be just me, but I have found the whole selected value, sele...more >>

How to make a labels right align
Posted by A.M-SG at 1/16/2006 4:12:17 PM
Hi, I have a set of labels. I arranged them vertically. The labels supposed to show dollar amount, so they need to be right align. That means if I add digits to each label, it should extend toward left instead of right. How can I do that? Thank you, Alan ...more >>

Draw a horizontal line on the form without using GDI
Posted by A.M-SG at 1/16/2006 3:37:10 PM
Hi, How do I draw a vertical or horizontal line on a form without using GDI? Thank you, Alan ...more >>

.NET 2.0 and toolbar icons
Posted by A.M-SG at 1/16/2006 2:32:54 PM
Hi, Using visual studio 2005 and .NET 2.0, when I right click on a toolbar strip and choose "Insert Standard Items", the IDE adds standard buttons and icons to the toolbar. So far everything is cool. Now, I tried to fin where the added ICONS comes from, no clue!. The only thing t...more >>

DropDownList in Winforms
Posted by Lew Barnesson at 1/16/2006 1:19:42 PM
Hi, I need a WinForms DropdownList (which for some reason isn't in the ToolBox). The ComboBox would be a good compromise, except that I can't find a way to make it ReadOnly. Am I missing something? - Lew ...more >>

.NET 2.0: Right click on DataGridView and Cell Selection
Posted by A.M-SG at 1/16/2006 11:33:12 AM
Hi, I am using Visual Studio.NET 2005 and .NET 2.0. I need to configure a DataGridView so it selects the cell when user right clicks on the cell. What would be the best way to do that? Any help would be appreciated, Alan ...more >>

Forms Namespace
Posted by Dick at 1/16/2006 9:51:05 AM
How to I change the namespace for a form in vs 2005? Do I add " "Namespace/End Namespace" to both of the partial files? Or is there an easy way to keep them both sync'd?...more >>

Click once Installs returns XML page to XP Pro Clients...
Posted by RBS at 1/16/2006 9:10:03 AM
I have deployed an application with ClickOnce Publish wizard to a web site. But when I click web page Install button the web server just returns the content of the .application file as XML to the browser on all my clients. On my Development system it works fine. My Clients: Windows XP Pro...more >>

Bitblt beginner question
Posted by jordan at 1/16/2006 7:25:03 AM
Hi, I have a simple task that I can't seem to work out. No previous experience in C++. OK, what I want to do is when a mouse enters a window draw an image (from resourses) at a certain location over that form, such as the center of it. When the mouse leaves the form i want the image to ...more >>

Underlining Accelerator Keys
Posted by Sam at 1/15/2006 10:30:02 PM
Is there a way to programmatically display the underline of button accelerator keys? I am aware of the “Hide underlined letter for keyboard navigation until I press the Alt key” setting but I would like to display the underline irrespective of this setting, just like Microsoft does in W...more >>

ListView row height?
Posted by Chris at 1/15/2006 10:12:41 AM
Is there any way to alter a listviews row height? I ask as in my ownerdrawn listview (details view) all lower case letters have their subsections cut off. Chris ...more >>

Using a form as a remote object
Posted by kcamhi at 1/15/2006 5:16:03 AM
Can a form be a remote object? If not, is there any work around... basically I want a central computer to be controlling forms on several computers on a network? When I try to add Inherits MarshallByRefObject to a Windows Form class, I get the error: Base class 'System.MarshalByRefObject'...more >>

WebBrowser and XML
Posted by Lee at 1/15/2006 2:24:26 AM
Hi, I am using the WebBrowser control included with VS2005 to view XML files, and they are being displayed correctly as far as I can tell. The problem I am having is saving these XML files to disk. If I try to save the contents of the WebBrowser.DocumentText to disk, the resulting file ...more >>


DevelopmentNow Blog