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 > july 2005

Filter by week: 1 2 3 4 5

icons on ContextMenu for new NotifyIcon()
Posted by rasx at 7/31/2005 12:58:02 PM
I have read and tried the code that generates icons for ContextMenu items for objects on Windows Forms. But I have not been able to get the code to run properly for a ContextMenu over a NotifyIcon object. I have seen Win32 code generating icons for system tray icon context menus so i know t...more >>


Unusual copyright question
Posted by Vlad at 7/31/2005 2:00:52 AM
Hi all. If in my own application I use Windows common icons generated by \system32\SHELL32.dll and used, for instance, by Windows Explorer (regular folder icons, Favorites folder icon, My Music folder icon, and so on) will I have legal problems with MS? What's the deal here? Are they availa...more >>

ListView problems (2 actually!)
Posted by Campbell at 7/30/2005 11:07:02 PM
Hi, I have designed a drag & drop method of sorting a listview which also allows you to move the listbox items from one listview to another. This all works fine apart from two things. Take the example of the list: Apple Orange Pear Lemon 1) At the end of my drag I want to sele...more >>

Prevent user from closing form but allow form to close at logout
Posted by jquiet at 7/30/2005 7:47:02 PM
I have added this code in an attempt to prevent the user from closing my simple 1 form application, but the application now prevents logout and shutdown. What is the proper way to prevent a user from closing the app but still have it close gracefully at shutdown/logoff? Private Sub Form...more >>

OnClick from UserControl Button
Posted by DiamondDave at 7/30/2005 4:36:01 PM
Hi There Another dumb newbie question, sorry. I want to be able to create applications by dragging my own version of controls onto a Form. The reason for making say a button as a user control, is I want to button color to be a specific color and not the default color. When I drag the Userco...more >>

How to call base buttons onclick event
Posted by Adam at 7/30/2005 9:28:34 AM
Hello. I have a form which derives from a System.Windows.Forms.Form. On the derived form, I would like to override a button's onclick event, and perform some validation on the derived form, then finally call the base class' onclick event. I have tried the following with no success. The derive...more >>

Getting to the default "drag" cursor while dragging the TreeNode
Posted by Vlad at 7/29/2005 10:46:41 PM
Hi all. Is there a way to get to the default "drag" cursor ("arrow-and-some-rectangle") during drag-and-drop? I'm doing drag-and-drop in TreeView and need to show user that he/she cannot drop dragged item in particular nodes. So, this part actually works great, user sees Cursors.No while ...more >>

Scrolbars in ListBox, ComboBox, ListView...
Posted by ALexey Zalivin at 7/29/2005 10:29:05 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 >>



Paint DC of Hidden Control using Managed Code?
Posted by BYY at 7/29/2005 4:47:01 PM
How do I paint the DC of a hidden control using only managed code? There was a post under microsoft.public.dotnet.framework.windowsforms called "Capturing image of a hidden control" and the person responding suggested using an interop call to SendMessage in User32.dll to accomplish the task. ...more >>

Problem with UITypeEditor invoked from multiple objects (Bug?)
Posted by Michael Kairys at 7/29/2005 11:42:22 AM
I have a class, call it Outer, with a property of class Inner. Inner has a type editor, InnerEditor, which presents a dialog containing a property grid. Now, I put several instances of Outer in a property grid and let the grid merge them. When I click on the Inner property and get my InnerE...more >>

A Realtime Charting Control eg PerfMon
Posted by thechaosengine at 7/29/2005 11:35:01 AM
Hi Everyone, Can anyone tell me if they have come accross a control that is able to display a line graph in real time such as the one that is displayed by the performance monitor application included in windows. I know of quite a few charting components but I'm not sure if they would be ...more >>

Contents of listbox not shown
Posted by Martin at 7/29/2005 11:20:26 AM
Hi, I have a windows.net aplication with a couple of list boxes on the main window form. Each list box is databound and is filled in the constructor of the window form. When I run it on one machine it works fine. When I run on another machine the list boxes are initially empty. If I swit...more >>

SelectionChangeCommitted event not raised (combobox)
Posted by Mirzas at 7/29/2005 2:42:02 AM
hi, I have a comboBox with some items inside. I am implementing a sort-of auto-complete feature so the selectedIndex of the combobox is being changed while the user is typing text inside. The problem is: SelectionChangeCommitted event does not fire when user hits enter, and the selectedin...more >>

button images
Posted by Stephan Steiner at 7/28/2005 9:11:02 PM
Hi I have a 16x16 icon that I've set to be an embedded resource. I have also added the icon as button image for one of my buttons. It compiles just fine, but when I get the this line in InitializeComponent this.pauseButton.Image = ((System.Drawing.Image)(resources.GetObject("pauseButton....more >>

Programmatically adding multi-levels of menu to a Windows Form?
Posted by w.c. at 7/28/2005 9:08:44 PM
How to do this with MenuStrip and/or MainMenu? Adding items to the top level is easy, question is the second and third level sub-menus etc. ...more >>

How to get path do user's Application Data directory
Posted by Tomas Machala at 7/28/2005 7:48:41 PM
Hi, how do I get path to current user's Application Data directory? Thanks. ...more >>

Form component like common Openfiledialog
Posted by DiamondDave at 7/28/2005 6:39:20 PM
Hi there Sorry for the newbie question, but I've searched the net and MSDN and I can't find anything on how to do this. Any pointers to doco or advice will be appreciated. I have created a Windows Control Library in MC++ and added a couple of User Controls. This is fine and I'm able to s...more >>

ListBox Control Display Object Type
Posted by Brian at 7/28/2005 4:41:34 PM
I have a Collection of custom objects (MyObject) that I am trying to databind to a ListBox. It works every other time I call ListBox1.DataSource = MyObjectCollection I have set the DisplayMember to Name, which is a property of MyObject, the one that I want to show. Sometimes it works and so...more >>

Added Row in DataGrid Not Correctly Written To DataSet
Posted by chjossi NO[at]SPAM gmx.ch at 7/28/2005 11:33:17 AM
Hi Folks I have created a DataGrid that I populate through a DataView. The DataView itself represents only parts of the columns and only parts of the dataSet's Rows. When the User is adding a new Row in the dataGrid, I fill all fields with default values using the ListChanged event of th...more >>

Position of Control on Form
Posted by karen.mcdonagh NO[at]SPAM singularity.co.uk at 7/28/2005 3:51:58 AM
Hi, I am looking to retrieve the relative position of a control to it's container form. The problem is that the form itself is scrollable and when the user has scrolled to the bottom of the form the location of the control appears to be relative to the top left corner of the visible part of...more >>

ToolStripContainer and MDI App
Posted by Qubeczek at 7/27/2005 10:31:36 PM
Hello, I'am trying to write some application under .NET Visual Studio 2005 Beta. My idea is as follows: - main MDI Parent form, with some button-panels, allowing redocking then (this pannels with uttons) to top, left and wright of the main form. - some MDI Child forms, with their owne bu...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 >>

Where to store "recent files"
Posted by cpnet at 7/27/2005 4:49:42 PM
In my old unmanaged apps, I'd store a list of "recent files" in the HKCU registry hive, so that I could display the last 4 opened files on the "File" menu of my app. And, this was specific to each user. I'm not sure where I should be storing something like this in a managed (C#) app? App.con...more >>

MouseMove event continually being called
Posted by Bob Dankert at 7/27/2005 1:02:25 PM
I have a control which inherits from TabControl and is having some issues with the MouseMove event being continously called when the mouse is over the tab on the top portion. When this happens, my CPU goes to 100% utilization and causes all sorts of issues. The odd thing about this issue is ...more >>

UI and workerthread completion
Posted by Nils Deslé at 7/27/2005 10:51:55 AM
Hi all, I've google-searched this group first, and seen a lot of questions about UI and workerthread issues, but I couldn't find an answer to the following question: I have a WinForm application that, at the click of a button, starts a long calculation (for now, using BeginInvoke and a dele...more >>

Editing object in an ArrayList using the PropertyGrid
Posted by deleria010 at 7/27/2005 8:47:51 AM
I have a class that I use a PropertyGrid to edit properties in. I have one property in the class that is an ArrayList. The PropertyGrid understands the ArrayList(displays Collection on the righthand side) and lets me edit it(click on the '...' button and an object collection editor window open...more >>

Datagrid Red Cross (X) problem
Posted by pri_sh NO[at]SPAM rediffmail.com at 7/27/2005 7:14:06 AM
I am trying to use a datagrid on a form in VB.NET. My datagrid is bound to a dataset. When the form gets loaded, the datagrid does not display and instead a big red cross appears. If you click on the grid, the underlying cell comes into focus with its data. This only happens on a machine with Wi...more >>

Refresh label on front end
Posted by Austin Rathe at 7/27/2005 7:04:14 AM
Hi, Is there a command I can use in VB.NET to force my program to update a label in the UI? I basically have a label that, in theory, should display what the app is currently doing. However, the systems seems to get so "busy" that the label is never updated, until the process is finished (the...more >>

Download files from internet
Posted by Lou Civitella at 7/27/2005 12:00:00 AM
How can I download files from the internet using VB.Net? For example I would like to download this file http://www.testsite.com/test.avi Also a user name and password are required to download the file. All I want to do is tell the program the file and download it to a specific location ...more >>

Setting column width to datagrid doesn't work
Posted by ejsanchez NO[at]SPAM gmail.com at 7/26/2005 3:49:10 PM
I'm using the following code to resize the column width of my datagrid in the "Form_Load" method: myDataGrid.TableStyles.Clear(); DataGridTableStyle dg1TabStyle=new DataGridTableStyle(); dg1TabStyle.MappingName="<table_name>"; DataGridTextBoxColumn col1=new DataGridTextBoxColumn(); col1.Te...more >>

Inherit ListViewItemCollection
Posted by daisy at 7/26/2005 1:56:09 PM
Hi, I am trying to derive my own ListViewItemExCollection from ListView.ListViewItemCollection but it never works under .Net 2.0 (compile with Visual Studio 2005 Beta2). The same code worked if compile with Visual Studio 2003. It always complains System.NullReferenceException was unhandle...more >>

Key press event
Posted by Pedro at 7/26/2005 8:08:50 AM
Hi every one I'm building an application that need to catch when a key is press (this is codebar reader the codebar is capture from a text box, but I need (depending of the message returned from de code bar) to capture if a key is pressed, maybe de keypad, to change the result of returne...more >>

Dynamically resize a form
Posted by Steve at 7/26/2005 4:01:02 AM
I have a UserControl called TimeEntry, which at runtime I am adding to dynamically created form like so: Form myForm = new Form(); TimeEntry myTime = new TimeEntry(); myForm.size = myTime.size; myForm.Controls.Add(myTime); myForm.ShowDialog(); as you can see I am trying to resize the...more >>

Dragging a non-borderless Form in VC++.Net....
Posted by Developer at 7/25/2005 9:16:03 PM
I have my Form borders set to "none", because I am using a bitmap for my background. How do I drag the Form so the user can move the Form?...more >>

Databound Listbox Does Not Display Changes to Datasource
Posted by Noel Weichbrodt at 7/25/2005 1:47:09 PM
A listbox, named 'lbxRooms', does not display changes when the datasource bound to it changes. The revelant code: Private Sub btnEdit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnEdit.Click DirectCast(lbxRooms.SelectedItem, DataRowView).It...more >>

Flickering TreeView
Posted by www.dir NO[at]SPAM gmail.com at 7/25/2005 1:35:10 PM
Hi, I am using a timer to renew the items in a TreeView control, but every time I am renewing the items they are flickering. I've called BeginUpdate() before changing the TreeView control, and EndUpdate after changing them, but the is no effect. Any ideas? Thanks ...more >>

Choice of Database?
Posted by Nad at 7/25/2005 1:31:02 PM
Hello, I am planning to develop a simple CRM (Customer Relationship Management) tool in Visual C# .NET but I am not sure whether I should use MS Access or MS SQL Server. The interaction with database would be very straightforward. I personally prefer SQL Server because I am familiar with i...more >>

Listbox DisplayMember Problem
Posted by MasterBlaster at 7/25/2005 11:30:30 AM
I have loaded my listbox with a dataset meaning I did the following. Me.lstPortfolios.DataSource = Ports.Tables("Ports") Me.lstPortfolios.DisplayMember = "PortfolioName" Me.lstPortfolios.ValueMember = "PortfolioID" And my properties are. Me.lstPortfolios...more >>

Programmatically choose sort expression of datagrid
Posted by Vincent Vinet at 7/25/2005 10:40:58 AM
Hi, I probably overlooked this in the property pages, but I am trying to set a sort expression programmatically for a datagrid to have it ordered in reverse chronological order (there is a time column). Now, the data does not come directly from a query, so I cannot just add an order by to ...more >>

Adding a form inside a form!
Posted by Adam Tibi at 7/25/2005 12:00:00 AM
Hi, In some cases when building an SDI application, you need to add a form inside another one. Some developers use UserControl to simulate this, while UserControls lack certain features when compared to forms. Is it possible to add a form inside another? Could any one provide a snippet code?...more >>

Is it possible to hide bookmarks on TabControl?
Posted by Tomas Machala at 7/25/2005 12:00:00 AM
Hi, is it possible to hide bookmarks in TabControl and let it display only the tab pages? ...more >>

Using IDataObject for Drag and Drop -- COM vs .Net
Posted by JP at 7/24/2005 9:33:46 PM
Advice needed. I have a working control in VB.Net that does Drag&Drop to/from Shell Folders. So far, I have not had to implement my own COM IDataObject. However, as expected, the Shell Folders do Move & Copy asynchronously and that makes it difficult to reliably update my control's appearance...more >>

trouble with win forms
Posted by Nedim at 7/24/2005 4:41:01 AM
i have a lot of forms, they all inherit some basic template form, and after that some more controls are added. there is a panel with buttons and tab control with two tabs. now when i open that form i visual studio everything becomes a mess: almost everything gets a wrong location, tabcontrol a...more >>

Select from a List to Edit
Posted by jmhmaine at 7/23/2005 2:24:02 PM
I'm new to WindowsForms, but have done a good deal of work with ASP.NET. What I thought would be a simple task because it is in ASP.NET, I've realized isn't in Windows Forms. I'm trying to create a quick way of displaying a list of rows from a database table that a user can scroll and allo...more >>

Button.PerformClick Woes
Posted by Jav at 7/23/2005 10:12:02 AM
To do a search and populate a listbox when the user presses Enter, I have implemented btnGo.PerformClick method in the SearchTextBox.KeyPress as follows: Protected Overrides Sub OnKeyPress(ByVal e As System.Windows.Forms.KeyPressEventArgs) MyBase.OnKeyPress(e) If e.KeyChar...more >>

Panel DockStyle Fill
Posted by Bud J via DotNetMonster.com at 7/23/2005 12:00:00 AM
i have a form with a couple of controls in a couple of different panels with a dockstyle set to fill and top. if i run this this.Dock=DockStyle.Fill; this.Location=new Point(0,0); this.Show(); in the constructor of the main form as the app is loading all works well but if i c...more >>

Using Local File Links in Web Browser Control
Posted by Christopher D. Wiederspan at 7/22/2005 3:19:29 PM
I've got a WebBrowser control in a C# Windows form. I build HTML on the fly and then set it into the control using the DocumentText property of the control. All of this works fine, except that part of the HTML that I construct is an <A> element that links to a local file, something like this: ...more >>

Mona - Help!!! - or - Why won't my DataGridTableStyle apply?
Posted by John Edens at 7/22/2005 1:35:46 PM
Mona, if you are out there, your advice for how to programmatically populate a datagrid control worked great, HOWEVER, I'm trying to use DataGridTableStyle and DataGridColumnStyle objects to format cell contents with no luck. I notice in all the examples I've been able to find, the firs...more >>

Slow ListView - solution?
Posted by stickyerfekkinspam NO[at]SPAM hotmail.com at 7/22/2005 10:19:44 AM
I am working on a database app in vb.net and have been using ListViews to display read only tables of data. Didn't want to use a DataGrid for various reasons. The problem I found was that when populating the listview by iterating through a dataset and calling ListView.Add() it took forever to...more >>

Selection Highlight Color
Posted by Kevin Cochran at 7/22/2005 9:56:11 AM
Greetings, I would like to change the selection highlight color in my RichTextBox, but I can't find any documentation on it. Does anyone know how to do this? Thanks, Kevin ...more >>


DevelopmentNow Blog