Archived Months
November 2003
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 controls > july 2005

Filter by week: 1 2 3 4 5

Scrolbars in ListBox, ComboBox, ListView...
Posted by ALexey Zalivin at 7/29/2005 10:28:31 PM
Hi, Anobody can help me to increase scrollbars in ListBox (wider for both scrollbars). I try to design applications specialy for touchscreen, but can't find any solutions in documentation. Thank you, Alexey. ...more >>


wrapping controls on a panel control ?
Posted by Colin Robinson at 7/29/2005 3:17:21 PM
hi, I am adding Buttons dynamically to a panel ie for i = 1 to 50 me.panel.controls.add(mycontrol) next Initially they were adding on top of each other in the top left location of the container control.The panel is docked so can change in size as the formsize changes. I want my contro...more >>

Display HTML on a form
Posted by Mark at 7/28/2005 11:10:00 PM
Hi... Is it possible to display html in a simple textbox like control? Cheers Mark ...more >>

image paint performance in WinForms
Posted by Timo at 7/28/2005 6:13:52 PM
My form uses a bitmap image as a background skin, with a transparency key. A couple of small bitmap images with attached mouse-event handlers are added during Form_Load, to serve as buttons. This works fine. However, if I do more processing during Form_Load, below the section where these small ...more >>

How to center a page in a tab contol
Posted by Oculus at 7/28/2005 12:42:02 PM
Maybe I'm being impaired, but I can't seem to find any way to get my tab pages to center in the DisplayRectangle of the TabControl. They always appear in the top left. There doesn't appear to be any options on the TabControl or the TabPage. I've even tried setting the page locations manua...more >>

AddHander Removal
Posted by Bill S. at 7/28/2005 11:55:07 AM
Hi, Is it possible to remove an event handler once it's installed with AddHandler? Below is the event I added and it works fine. Later in my code I want to remove it. I tried using this statement: (AddHandler mOwner.CmdFirst.Click, Nothing) to remove it, but this does not work. Help! AddHa...more >>

Datagrid delete
Posted by Arapi at 7/28/2005 10:47:49 AM
Hi, Is it possible to capture datagrid delete event (winforms). ...more >>

in C# how do i get to total number of kilobytes of memroy total and available for the current machine?
Posted by Daniel at 7/28/2005 10:29:09 AM
in C# how do i get to total number of kilobytes of memroy total and available for the current machine? ...more >>



Setting Text property ignores MaxLength property (TextBox)
Posted by Volker Jobst at 7/28/2005 10:26:50 AM
Hi, My application contains some TextBox controls. I set the MaxLength property to 10 and the user cannot enter more than 10 characters (as expected). But if I set the Text property in source code like TextBox1.Text = "More than 10 chars" the TextBox contains and displays the whole text...more >>

Enum / Combobox / Format problem
Posted by John Jobling at 7/28/2005 12:00:00 AM
Hello Folks, I've read through the newsgroups but no posting seems to address my problem. I have successfully databound my ENUM (VB) to my Combobox. This works well but as you'd expect it displays the ENUM values. But I would like to do is convert my enums values into user readable values ...more >>

How to reference ListBoxes on TabControl?
Posted by deko at 7/28/2005 12:00:00 AM
I have a TabControl with a few Tabs and a CheckedListBox on each Tab (or Page). What I need to do is loop through each Checked Item on each CheckedListBox on each page of the TabControl. The problem is I can't seem to reference the CheckListBoxes foreach (Control ctl in this.Controls) { ...more >>

Add treeview node "manually" as string with PathSeparator as divider in the string
Posted by Mikael Jansson at 7/27/2005 9:40:29 PM
Hi, Is it possible to add a treenode to a treeview by using a string that has the PathSeparator as divider in the string? hereis a psedocode (maybe stupid format or coding but I hope you understand what I mean) treeview.pathSeparator = "." [treeview add node] = "1.2.6.1.2.2.4.4.2.1" [tre...more >>

How to increase Windows MDI Form Size ?
Posted by Hriday Rai at 7/27/2005 9:22:36 PM
Hi, I am creating a Windows Application for Tablet PC and using MDI Form. But I am not able to increase the Height of my MDI Form more than 780. how can I increase my MDI form Height as 1024 ? Please do help. Thanks, Hriday ...more >>

mouse events when the mouse is on a "child control"
Posted by red at 7/27/2005 6:14:07 PM
hi everyone; my problem: I have a userControl in this usercontrol, I have a child control (a button) when the mouse moves over the userControl, I can detect the movement using MouseMove event. the problem is when the mouse is on the child control : I can t detect anything when the mouse m...more >>

Classed Control Problem
Posted by Tommy at 7/27/2005 2:47:13 PM
I'm using VB.NET 2003 I have started a new project. I have subclassed each control I plan on using in my project, text box, tab control, etc... I have a base form then I have created an inherited form from that one. On it i have a tab control with 2 pages and a menu. When I create an in...more >>

Howto get the corresponding DataGridViewCell when using ContextMenuStrip for a cell ?
Posted by Gordian at 7/27/2005 12:00:00 AM
Hello, Context ------- I have a ContextMenuStrip with a few string items. This menu is assigned to a DataGridViewColum.ContextMenuStrip Property. Event ----- I handle the ItemClicked-Event of the ContextMenuStrip. The standard handler looks like that: void ..._ItemClicked(object sen...more >>

building user control with Windows Sockets to use in web page
Posted by roni at 7/26/2005 11:24:15 AM
hi. i want to build USER CONTROL that will be used in WEB PAGE. to build user control and use in web page,I KNOW . i did user control with textbox and lable for example and it works. the problem is after i had the IRC client functionality and Windows sockets it DID NOT work. now, i gu...more >>

Open a directory
Posted by Gary Nastrasio at 7/25/2005 3:56:12 PM
Is there a control similar to OpenFileDialog that will let me open a directory instead of a file? Basically, you browse to the directory you want and hit "Open". Thanks, Gary...more >>

DefaultValue Attribute usage with user defined Color in C#
Posted by jamie NO[at]SPAM email.si at 7/25/2005 12:49:40 PM
I woud like to set default value for my Color property. But, I have problem when I want set unknown color. Code: public class BitmapButton : System.Windows.Forms.Button { private Color mForeColorMouseOver = Color.FromArgb(0xFF52CE); [Browsable(true), DefaultValue(typeof(Color), "0xFF52...more >>

button border
Posted by Timo at 7/24/2005 9:32:39 PM
To get rid of the rectangular frame around buttons, must one create a custom button control? Thanks Timo ...more >>

how to select a node in a tree view clicking with the RMB (while a context menu is displayed)
Posted by DevX at 7/23/2005 9:48:49 AM
Hi, I have a treeview with some nodes. When i click with the Right Mouse Button, it doesn't select the node. (The selection blinks one moment on the clicked node then returns immediately with no events on the previous selected node). That's ok But If I assign a context menu to the tree vi...more >>

having trouble positioning a button
Posted by Timo at 7/23/2005 7:09:30 AM
I'm trying to position a button at the exact top left corner of my form, which is an owned form that floats over another. But this code in the floating form's Form_Load event is not working and I don't understand why: Dim MyButton As New Button MyButton.Height = 34 MyButton.Width = 34 Dim i...more >>

Splitting context menu into columns
Posted by Shawn at 7/22/2005 3:54:07 PM
I have a dynamic context menu attached to a tray icon. It will at times have about 100 menuitems. Is it possible to split this up into columns so that all the menuitems are on screen at once?(The windows start menu has this functionality). Thanks ...more >>

How do I expose the databindings on a user-defined control?
Posted by Christopher Klein at 7/22/2005 2:52:22 PM
Hi there, I have a user-defined control that consists of combobox and a button (for a search feature). When I place the control on a form I no longer have the ability to set the datasource, displaymember or valuemember nor any of the databinding items. how can I expose this information ...more >>

how to create a dropdown-area (combobox)?
Posted by pachyphloia at 7/22/2005 3:55:01 AM
hi all I'm trying to build something with the look and feel of a dropdown-area (like seen in a combobox). 1) it may be located at least partially outside of the hosting form and 2) it leaves the hosting form active. (user)control violates 1) and borderless window violates 2). what to do?...more >>

Custom Control and ToolTips?
Posted by Tinus at 7/22/2005 12:00:00 AM
Hello all, [Sorry for x-posting but did not know in which group someone could help me] I've created a custom control that draws a monthly schedule (using the Draw function in C#). Basically it draws 31 boxes and writes the day number in every box. This works great. But I now want to sho...more >>

Can ListViews be OwnerDrawn in .NET 1.1?
Posted by Don Stewart at 7/21/2005 6:34:50 PM
Is there a way to OwnerDraw a "ListViewItem" in a standard "System.Windows.Forms.ListView" control using C# .NET 1.1? I cannot find the ListView.OwnerDrawn property and DrawItem events. I even tried inheriting ListView and ListViewItem looking for possibly hidden base members. Thanks -- ...more >>

Memory Usage is HUGE!
Posted by Bryan Shaw at 7/21/2005 2:02:24 PM
I looked at a windows csharp app that I wrote using VS .NET 2003 and its memory usage is over 200MB! I thought .NET had garbage collection. It is reminding me of old apps that do not free resources or objects when they are used or app with memory leaks. How do I fix it?...more >>

Left and Right Arrow keys don't move cursor in focused TextBox
Posted by nate axtell at 7/21/2005 7:56:08 AM
VB .NET 2003: I have TextBox controls on the pages of a TabControl, then when running the application I try to move the cursor when a TextBox has focus. The Right and Left arrow keys don't move my cursor through the text. Only the Up and Down arrows work for moving the cursor left and right. ...more >>

TreeNode state not available in handler for DrawNode
Posted by David at 7/20/2005 2:46:07 PM
I am writing custom TreeView control based on the TreeView in .NET 2.0. The DrawTreeNodeEventArgs argument to the handler doesn't have correct state information like - whether a node is selected or not (e->State is always 0). I am using the sample code provided in the documentation that shows ...more >>

VS2005 Beta2, Button derived from Usercontrol
Posted by norbert.thek NO[at]SPAM gmail.com at 7/20/2005 5:20:44 AM
Hello I needed an custom drawn button on the .net CF. So I derived a class from Usercontrol and put there all the stuff I needed To have the same behaviour as a normal Button I override the following methods: ############################################## protected override void OnM...more >>

Select machine dialog
Posted by Cathryn Johns at 7/20/2005 12:43:43 AM
Hi Is there a dialog that will let you select a machine on the network? I need the user to supply me with a machine name, and I thought it would be nicer to let them browse the network and find the machine that they want, rather than forcing them to just type the name in. I've looked at the...more >>

How to draw an icon at the right of a tree node
Posted by DevX at 7/20/2005 12:00:00 AM
Hi, I need to draw an icon to the right of a item in a tree view, for example: ROOT | ----[normal tree node icon] ---- TreeNode Text [OTHER ICON I NEED TO DRAW] | -----[normal tree node icon] ---- AnotherTreeNode Text [OTHER ICON I NEED TO DRAW] Note that the s...more >>

Preventing repainting when I update the contents of controls
Posted by Will Pittenger at 7/19/2005 3:41:42 PM
I have added listboxes (possibly to be changed later) and comboboxes to my dialogs. When I am adding dozens (or worse, depending on the table, thousands) of items to these controls, I do not want the control repainting itself every time I add an item. With Win32 or MFC, I would call SetRedra...more >>

Does VC# .NET 2003 come with a multi-column listbox?
Posted by Will Pittenger at 7/19/2005 3:37:36 PM
I see that System.Windows.Forms.Listbox has a multi-column option, but it appears that you get only one column width unless you paint the rows yourself. I considered the DataGrid. However, I have no interest whatsoever of binding the grid to my database. All I need is what I described: A ...more >>

User controls not appearing in User Controls Toolbox
Posted by el_sid at 7/19/2005 4:43:01 AM
We have created several enhanced .NET user controls in a controls dll (they are derived from the .NET TextBox, ComboBox etc objects). They compile fine and on the machine they were created on they apprear in the 'User Controls Toolbox' panel. However when the rest of our team tries to use th...more >>

AVI animation on VB.NET form howto?
Posted by Mikael Jansson at 7/18/2005 10:57:05 PM
Hi, I tried to find how to show an AVI animation sequence like a "filecopy" animation but did not find how to do that in VB. Is there a control in VB.NET or any other way of doing it?? I be very happy for a code example if possible.....feeling a little lost for the moment ;-) br / Mi...more >>

UITypeEditor sometimes showing up in PropertyGrid.
Posted by David Thielen at 7/18/2005 2:55:03 PM
Hi; The object that I am passing to PropertyGrid has (along with others), the following properties: ChartColumnSelect DataTitle ChartColumnInfoCollection Columns ChartColumnInfoCollection is a CollectionBase derived class holding ChartColumnInfo objects. ChartColumnInfo has the prope...more >>

RichEdit TextBox
Posted by Bill S. at 7/18/2005 1:18:02 PM
Hi, Can anybody tell me if it's possible to implement spell checking for a RichEdit TextBox somehow? I've tried implementing a Word object and passing the text to its spell checker, but in the end, Word becomes visible and ruins the whole effect. ...more >>

System.Windows.Forms.Application.ExecutablePath
Posted by jmhmaine at 7/17/2005 9:31:01 AM
This is really odd. I have a problem with in the Windows Form Designer when I try to use System.Windows.Forms.Application.ExecutablePath with a User Control load event. Without copying all of the code, I have a function that gets a connection string value from an XML file, defined as: Dim ...more >>

Form MouseDown
Posted by Madhavi at 7/15/2005 1:29:07 PM
Hai all, Is there any way to make a Form listen to MouseDown event, when I click on a Label in the form. I need this to make one of the controls in the form invisible when focus leaves that control. Now what happens is when I click on a Label or a Panel that does not receive focus,Leave e...more >>

Datagrid cell not updating dataset on leave
Posted by Joe R. at 7/15/2005 6:38:05 AM
I have a datagrid that has a dataview to a dataset as its datasource. If I leave the grid when I am on a newly added record I can't get the cell I am editing to reflect its changes back to the dataset. I can get the rest of the row to save to the dataset by using dataview(rowindex).endedit() ju...more >>

Deleting from a collection displayed in a PropertyGrid
Posted by David Thielen at 7/14/2005 6:22:01 PM
Hi; I have a class: class ChartColumnInfoCollection : CollectionBase , ICustomTypeDescriptor that I then display in a PropertyGrid. I implement ICustomTypeDescriptor so that in the PropertyGrid it shows each element in the collection. I use the default PropertyGrid editor to add/remove co...more >>

Determine width of scroll bar in UserControl
Posted by Brian R. at 7/14/2005 3:18:07 PM
I am dynamically loading contorls into a user control and I want to fit the parent window to the childs window, within a certain maximum range. So if the child control is larger than my parent control I turn on scroll bars (set AutoScroll to true). So if I turn on the VScroll, I need to a...more >>

Custom password column for datagrid
Posted by dba56 at 7/14/2005 7:39:33 AM
I inherited the DataGridTextBoxColumn to create a custom datagrid column that displays passwords using password characters (black circles) and is read only. It works fine. When I select a row, the row is highlighted in the selection background color except for the cell in the password column. ...more >>

Transparent background component that has mousemove event...
Posted by Julius Fenata at 7/14/2005 12:00:00 AM
Dear all, We use Crystal report 11 to have report on client application, this Crystal report embedded with Win32 Appz, developed with C# language (.NET Framework 1.1). Currently, our customer have requirement to measure session.timeout from our application. So we measure the delay of activi...more >>

How to prevent SelectedIndexChanged event from firing?
Posted by deko at 7/14/2005 12:00:00 AM
I have a series of combo boxes in a WinForms app. When a selection is made in cbo1, the DataSource in cbo2 is updated. The problem is this generates two events: one when the user makes a selection in cbo1, and another when the DataSource in cbo2 is programmatically updated. I need the fir...more >>

newbie: How to retreive string from ComboBox.SelectedItem?
Posted by deko at 7/13/2005 10:19:02 PM
ComboBox cbo = this.cboParameter; strParameterValue = cbo.SelectedItem.ToString; //does not work How do I retrieve the string value of the selected item in my ComboBox? Thanks in advance. ...more >>

gdi+ book?
Posted by Brent at 7/13/2005 4:19:00 PM
Hi, there doesn't appear to be to many books on the topic. A couple of books had bad reviews on amazon. Im not wanting to get into really advanced gdi+ programming. I probably just use it to create controls. Nothing really advanced. Does Chris Sells book on Windows Forms go into enough detail wit...more >>

ContextMenu.Show and MainMenu blocks windows messages
Posted by bigcoops NO[at]SPAM hotmail.com at 7/13/2005 1:46:31 PM
I have an Windows Form application with a MainMenu and a TreeView with TreeNodes. I have a ContextMenu that is dynamically created when a TreeNode is right-clicked, and then ContextMenu.Show is called. I have a separate worker thread (lets say it is monitoring disk space) running in the backg...more >>


DevelopmentNow Blog