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 > february 2005 > threads for february 15 - 21, 2005

Filter by week: 1 2 3 4

Overriding a Combobox
Posted by Alex Glass at 2/21/2005 8:59:14 PM
I have overriden the combobox class in my application. Is there a way I can write code that triggers when the Combobox.Items collection is changed (I.E. myCombo.Items.Add or myCombo.Items.Remove) ?? I have tried using breakpoints with AddItemsCore and AddItemCore override functions but could ...more >>


label1.Location coordinates not being reported correcly in dynamic form.
Posted by thomasamillergoogle NO[at]SPAM yahoo.com at 2/21/2005 8:16:18 PM
I have a MainForm with a Panel1. My project also has a UserControl1. When a nav button is clicked in the MainForm the Usercontrol1 is loaded into the MainForm.Panel1. All that is working beautifully. I went into the user controls and added a label1 and a button1. When the button1 is clicked th...more >>

Open zip file
Posted by Rob Oldfield at 2/21/2005 5:11:14 PM
Is there any way that I can feed the path of a zip file to a vb.net windows forms app and get at the files within it? I don't want to be reliant on having winzip loaded on the client machine and I know that I could just package a dos unzip utility in my app, but is there a better way of doing i...more >>

Me.Hide()
Posted by SLE at 2/21/2005 3:05:23 PM
Hi there, The Main() of a Windows Forms application launches a dummy, invisible form: Sub Main() Dim f As FormFoo Try f = New FormFoo f.ShowDialog() ' '-- perform some post-processing ' Catch ex As Exception ... Finally If Not IsNothing(f) Then f.Dis...more >>

Cancel Form by using CausesValidation set to FALSE
Posted by Torsten Piehl at 2/21/2005 2:34:34 PM
Hi newsgroup, how can I suppress the validating_event from a control received the focus in a modeless Form when pressing the cancel-Button or the ESC-Key? I already set the CausesValidation-Property of the cancel-Button to FALSE, without effect. If I set both properties to FALSE (cancel-Bu...more >>

Databinding Failure Part II
Posted by WhiskyRomeo at 2/21/2005 1:57:03 PM
I created a form that displays one record depending on the choice made via a combo box. In otherwords muliple records are Not filled into the form's dataset, only one. Hence there is no navigation. When I change a field on the form and press update, that routine first checks to see if the...more >>

Diff between PositionChanged and CurrentChanged ?
Posted by Hemang Shah at 2/21/2005 10:23:02 AM
BindingManager has two properties, PositionChanged and CurrentChanged What is the difference between them. I want to set flags on my form depending on the value of the current record displayed on the form. (update date & checkboxes). Which event would I put my code into? Thanks H...more >>

Tables and Response.Redirect WIN forms equivalents
Posted by Dave Harrington at 2/21/2005 7:41:01 AM
I am taking an ASP.NET application offline (into a windows forms app) and I was wondering if anyone can help me in two particular areas. 1 - On the web, Response.Redirect directs you to a different web form. However, in windows, all I can find is Form.Show, which opens a form in a new wind...more >>



Converting Windows Form into Web Form
Posted by atif at 2/21/2005 4:53:46 AM
Hi All Can we convert Windows Forms into Web Forms and/or vise versa? I have heard that this is possible through some third party tool, i m not sure. if yes then how much it will cost, i mean, what if my Windows Form contains few codes related to Threads then will it also be the...more >>

Trap and modify input using a keyboard hook
Posted by Radu Stanciu at 2/21/2005 3:21:16 AM
Hi, Is there a way to modify the keyboard output? For example, I would like change the "a" character to "b" when the user presses the key and my application is running. I'm using a keyboard hook class, it can be found at http://www.codeproject.com/csharp/globalhook.asp?msg=1033410. However...more >>

run .exe from IE using ASP.NET script
Posted by Loane Sharp at 2/20/2005 8:19:27 PM
Hi there I have a module writen in VB.NET compiled using vbc as sync.exe. If I point IE to http://localhost/sync.exe the Windows Form loads perfectly. But I don't get the same if, from within ASP.NET code, I run the following ~ Dim ass As Assembly = Assembly.LoadFrom("C:\Inetpub\wwwroot\...more >>

Datagrid error when the Form is minimized ...
Posted by bennido at 2/20/2005 7:43:03 PM
I get an error "System.ArgumentException: '0' is not a valid value for 'value'" when trying to populate a DataGrid control while a Microsoft Windows Form is minimized. After some research, I found this ... http://support.microsoft.com/?kbid=838087 So I downloaded the latest .NET framewor...more >>

Strange Listview item behaviour
Posted by Lloyd Sheen at 2/20/2005 1:32:54 PM
I have an application which will scan various folder for files. Each folder scan will be in it's own thread. The thread iterates the folder and creates a ListViewItem with various pieces of information about the files found. The file name and folder name are separated into two subitems and w...more >>

Closing a form
Posted by thechaosengine at 2/20/2005 7:09:33 AM
Hi All, When you close a form using myForm.Close(), does that actually destroy the form and make it available for garbage collection? I just want to make sure that I'm not supposed to do something to it after to make sure that the memory can be claimed back. I also have a timer object d...more >>

how to make the toolbox in VS ide
Posted by kc at 2/19/2005 11:43:57 PM
dear all, i found that the toolbox, properties column, help...etc are hide and slide out automatically and are neatly located as a tab-like at both left and right hand side of the VS IDE application. I am wondering how to make this controls? Also, the collapsible panel bars icons appeared i...more >>

When does a message processing thread get created for for Windows Form
Posted by me at 2/19/2005 10:21:41 PM
I have a Class Library that contains a Form and several helper classes. A thread gets created that performs processing of data behind the scenes and the Form never gets displayed (it is for debug puposes only and is not normally visable to the user.) The Thread function is actually in the Form c...more >>

Manage application (maximize/minimize/restore...)
Posted by Eduardo Garcia at 2/19/2005 9:59:01 PM
Hi. I need change the state (maximize/minimize/restore...) of an application acording to some events. How can make an application minimize or maximize itself. note: my app have a NotifyIcon with the ShowInTaskbar property in false, I want when I click on some menu item (in the NotifyI...more >>

paint type program's canvas
Posted by billy at 2/19/2005 5:40:23 AM
I'm working on a sort of paint program that has the usual canvas pane in the middle of the main form. I'm working on that class and have a couple quick questions.. actually more like I'm looking for opinions. 1) I want a ruler running along from top left to top right and from top left to botto...more >>

Handling the message pump for a UserControl
Posted by JBL at 2/19/2005 2:39:01 AM
Hi, Im wondering how a UserControl can be created using native win32 code. The reason for doing this is that i need to have access to the message pump and a way to render to it in the fastest possible way using managed DX. The "UserControl" will be hosted in a IE browser. Cheers, ...more >>

Play video formats inside a vb.net application
Posted by Fred Herring at 2/19/2005 12:03:01 AM
I am curious about ways to play a vido inside a vb.net application. Are there controls for this purpose or some classes in Net which allow this. I am not talking about creating a video, just something that can take the file and play it inside my application. Thanks, Fred Herring...more >>

Highlighted Text
Posted by Marv Scheinbart at 2/18/2005 5:10:09 PM
I've created a Dialog box with textbox to display messages to the user of the program. Whenever I write text to the text box it always comes out highlighted. I can't seem to figure out how to de-highlight the text within the textbox. Anyone have any idea how to do this? Thanks M...more >>

SQL Query - Ok its from a windows app
Posted by mithril at 2/18/2005 3:44:32 PM
I think I need a nested query but here's the problem. I promise i've exerted my meager brain power on this problem & ask this as a last resot! 3 Tables PatientTable PatActive, PatID ProfileTable PatID, CodeID, OtherInfo, MedicineID MedicineTable MedicineID MedicineInfo ...more >>

How to pass an EventArgs to OnClick upon clicking a control
Posted by Nima at 2/18/2005 1:17:04 PM
Hi all, When you click a control, OnClick is called which in turn calls the Click event. OnClick takes as an argument an object of type EventArgs which it then passes to Click. However, the default behavior is that the EventArgs that is sent is an empty one. I want to pass in some values...more >>

MessageLoop on a thread
Posted by Theresa Smallwood at 2/18/2005 1:04:49 PM
Is there a way to add a Windows MessageLoop to an existing thread? I have a ..NET application that is called from from a COBOL app using COM, and when I show a form, the System.Windows.Forms.Application.MessageLoop is set to false. Is there some way to ensure that the form displayed has a Me...more >>

Invalidate but do not draw background
Posted by Viktor at 2/18/2005 11:03:07 AM
I work on a data acquisition system. I need to display data as it comes. There are two different modes: 1. Display only current set of data each time it is ready. 2. Display the current data, but don't erase the previous one. I remember in MFC I was able to do this by changing one parameter ...more >>

Show Help and Minimise and Exit
Posted by 11Oppidan at 2/18/2005 10:26:02 AM
Hello. It seems that in order to get the help (?) button to show in the top right of a form, the minimum and maximum properties need to set to false. I would like to have a help, minimise and exit button on my form. Is there any way to do this? Many thanks for your assistance. ...more >>

Help: I can't view a WinForm in [Design] mode
Posted by rh at 2/18/2005 10:17:32 AM
Hi, I'm using Visual Studio.Net 2002 and I can no longer open my windows forms in Design mode. In the Solution Explorer, I see the white "VB" icons instead of the grey "Form" icons. I already tried rebuilding the whole solution and made sure and all of the references are correct but it still...more >>

restart application
Posted by aa at 2/18/2005 8:14:01 AM
How to write windows application in VB.NET , which on getting the error should restart ...more >>

Reversing text in TreeView nodes
Posted by Allen Anderson at 2/18/2005 7:29:13 AM
I haven't received an answer to my question of a few days ago regarding a flipped treeview control posted in the dotnet.framework.windowsforms.control newsgroup, so I thought I'd ask it again. Sorry about the cross-posting, but I'm getting desperate as the drop-dead date, the 25th of this mon...more >>

WindowsForm freezes on second launch
Posted by bigreddog at 2/18/2005 5:19:09 AM
I have a WindowsForm application that I developed on my XP workstation. It is a nulti-threaded socket application that sends and receives messages. On my workstation I can close and restart the application normally with no ill effects. Now when I put the application on a Windows 2000 Server it...more >>

Async windows programming
Posted by Mark Stega at 2/18/2005 5:17:03 AM
Three quick (I hope) questions regarding async programming in a windows form: 1) When I perform a BeginInvoke on a delegate in my own thread (actually the main GUI thread) in the midst of a message event handler (say OnMouseUp), does the implementation basically work the same as the BeginIn...more >>

Reading Text datatype into a byte Array
Posted by debu NO[at]SPAM rheal.com at 2/18/2005 3:07:31 AM
Hi, I am populating a records fetched from a select query in OleDbDataReader. The datbase is MS Access, The datatype of the select query column is Text. I want to read the data as Byte array instead of string as Reading it into a string causes it to be converted to Unicode which is do not wan...more >>

Drag Drop using Menus
Posted by Dees at 2/17/2005 11:51:03 PM
Hi, I have a sitiuation in which I need to initiate a drag operation on a grid based on a menu click or button click. For example, the user right clicks on the grid and a context menu is shown. One of the menu's is called "Move". If the user clicks on the Move menu item, the grid should ...more >>

GDI+ encoder CLSIDs, and image resampling
Posted by TC at 2/17/2005 6:49:17 PM
Hi folks Sorry if this is OT, but I got no joy in microsoft.public.win32.programmer/gdi. (1) I'm encoding to standard (built-in) formats: JPEG, BMP, GIF etc. I currently have the encoder CLSIDs hardcoded. Is that safe, or should I iterate the encoders at runtime, looking for ones with the...more >>

memory leak in Timer controls, and thread sleep
Posted by LZhao at 2/17/2005 4:01:03 PM
Hi, We have find memory leaks when we tried to use timer to raise event at specified interval. The OS we use is: Windows XP Professional Version 2002, service Pack 2, IDE is: Visual Studio .NET2003. Microsoft .NET Framework 1.1, version 1.1.4322 SP1. To repeat this problem, 1. creat ...more >>

Unhandled exception after calling child form's Dispose().
Posted by Vijayakrishna Pondala at 2/17/2005 3:51:02 PM
Hello, I have a main form (MainForm) which contains File->New menu item. On clicking File->New menu item, i am displaying a form (ChildForm) which contains a lot of controls and a lot of complex code. Everytime the File->New menu item is clicked, a new instance of ChildForm is created and sho...more >>

Synchronizing 2 grids via the CurrencyManager
Posted by Pete Davis at 2/17/2005 3:40:53 PM
I have written a custom databound grid control that we've been using successfully for months, but one of our developers has just run into a problem that I can't figure out. The code for setting it up is as follows: DataSet dataSet = new DataSet( "TestSet" ); DataTable tableParent = dataSe...more >>

Resize a form based on content size
Posted by Evan Stone at 2/17/2005 3:22:47 PM
Is it possible to resize a form based on the size of its contents? In VB6- we had ScaleWidth & ScaleHeight properties, with which one could get/set the form size to fit exactly. Is there an analog in the .NET Framework? Thanks! -Evan...more >>

Treeview scroll problem
Posted by MikeH at 2/17/2005 3:21:02 PM
I have a treeview control on a form with Scrollable=True. If a user scrolls the list and then selects a node, the selected node returned by the AfterSelect event is always the topmost visible node in the list, not the node selected. This also happens for the click event, but double-click w...more >>

My Brain Hurts _ One last undetermined error
Posted by Mithril at 2/17/2005 2:43:07 PM
I have an application based on the Issuevision example at MSDN. The program falls over at this line: Application.run(New MainForm) Call Stack// 'DefaultDomain': Loaded 'c:\windows\microsoft.net\framework\v1.1.4322\mscorlib.dll', No symbols loaded. 'RevMed': Loaded 'C:\Sandbox\MedOOP2\...more >>

ListView & Copying of
Posted by laurmo at 2/17/2005 1:17:05 PM
Hi, I have a windows form, in C#. It has a ListView on it. For a couple of reasons I now need to be have multiple sets of Data that can be dynamically Copied into and out of the ListView. But I'm having realy trouble with it....and feeling pretty frustrated. I firstly tried copying ov...more >>

Controls Disapear when I Compile Windows Forms
Posted by Eric Renken at 2/17/2005 11:53:37 AM
I have come across a strange BUG in VS 2003 that drives me nuts and makes working in the Windows Form designer sometime impossible. This usually happens when I have made a lot of changes to a form by deleting then re-adding a bunch of controls. The problem happens when I try to re-add cont...more >>

Hierarchical presentation style for DataGrid
Posted by Lee Gillie at 2/17/2005 8:29:15 AM
I have bound datagrid to a dataset with a datarelation defined between work orders and line items of those work orders. The default navigation style is to present the [+] at each work order. You expand, and it shows the name of the datarelation in a new line, that is shown as a hyperlink. Y...more >>

Chart control for Windows Forms
Posted by Sergey Poberezovskiy at 2/16/2005 9:20:12 PM
hi, Looking for a reliable-easy to use Chart control. never used one before, so any advice / experience is greatly appreciated. ...more >>

Monitoring MouseMove anywhere within the screen.
Posted by Phil Jones at 2/16/2005 8:36:59 PM
Is it possible to track a general "MouseMove" event that monitors mouse movement anywhere within the screen, not just within a the scope of a Control? I'm writing logic that resizes a form on mouse move, but I'm finding that when the mouse falls out of the size of the control/form I lose th...more >>

Event on record change
Posted by Hemang Shah at 2/16/2005 7:08:30 PM
I have some controls on my form which are bound to a dataset and some which are not bound. But whatever record is displayed on the form, I want to populate those control (datetime, combo, etc.) with the data in the current record. What event can I do this in ? PositionChanged of binding...more >>

Launch WebBrowser
Posted by rob at 2/16/2005 5:37:11 PM
How can I launch a webbrowser from my windows forms applications? The reason I need that is because I have a DataGridView with links in one of the columns. When clicking on it I process the click and then want to start a webbrowser loading the site that the link was pointing to. Thanks, Rob ...more >>

The private components field: where is used?
Posted by Theo Bebekis at 2/16/2005 3:57:11 PM
Hi there Every time I create a new Form in the VS 2003 IDE i see the following entry private System.ComponentModel.Container components = null; which constantly remains null, when I add controls (say a Button) or components (say Timer) on the Form. The protected Dispose() checks if...more >>

Bypass IE Print Dialog
Posted by nycboy at 2/16/2005 2:24:58 PM
Hi, I am using ShellExecute() to print HTML files through Internet Explorer (to defalut printer). But I don't know how to bypass the Print Dialog. Any help/advise will be appreciated. Thanks in advance! DGU *** Sent via Developersdex http://www.developersdex.com *** Don't j...more >>

Need to disable "Print progress" popup dialog
Posted by Michael W. at 2/16/2005 1:49:36 PM
have an app that does batch printing. The Dialog telling me which page is being printed keeps poping up. It's very annoying!! Any way to disable it?? Thanks in advance. ...more >>

How to refresh SOME records in the datagrid but NOT SQL Server ?
Posted by Lee Gillie at 2/16/2005 1:28:34 PM
I am sure this is a dumb/simple question, but I am new to this stuff, so request for patience with me... I have OUTSIDE knowledge that there is activity regarding some records in a parent / child set of tables I am showing in what I want to be a read-only view in a grid. I have primary key ...more >>

BUG in Combobox.Location ?
Posted by B.J. at 2/16/2005 12:59:04 PM
Hi, I want to draw combobox to bottom of form. I have following code : ComboBox C = new ComboBox(); C.Font=FontNormal; Size CSize=C.Size; C.Location = new Point(0,this.Height - CSize.Height); // this.Height is Height of parent control this.Controls.Add(C); By me it is correct but down...more >>

SelectedIndexChanged event with listview
Posted by Jeff Brown at 2/16/2005 12:59:03 PM
I have a form with a listview to allow users to select an item. When they select one I fill in controls below it for them to modify the values. They can also just enter new values in the controls without selecting a listview item in order to insert new records. After entering new data if th...more >>

Databinding to Textboxes
Posted by WhiskyRomeo at 2/16/2005 12:25:06 PM
I have a windows forms that shows only one record at a time. The user selects the record he want via a combo box. Everything works fine for the first selection, however the textboxes do not automatically update their values when the combo box changes values. The textboxes are bound to a d...more >>

Newbie question
Posted by B.J. at 2/16/2005 12:25:05 PM
Hi, How I can get size of Graphics.DrawString in pixel ? Becuase after I draw string I need place after its combobox ... Thank you....more >>

Capturing user interaction
Posted by Diana Mueller at 2/16/2005 11:51:40 AM
Hello NG, in my MDI-App, I'd like to checkfor how long the User hasn't done anything (moved the mouse, pressed a key) so that I can do some stuff after a given amount of idle time. My first idea was to save the current time in a variable every time the user moves the mouse or presses a key so ...more >>

Beginners Question Form Sizing
Posted by Roger Stenson at 2/16/2005 9:06:56 AM
Hi I am writing my first .DotNet application out of the Wrox Professional 2003 Book. I would like to ascertain the screen size in use and size my forms accordingly but that topic does not come up in the relevant chapter on forms How do I get at the relevant computer environment information to...more >>

Possible bug using non system fonts
Posted by Thomas René Sidor at 2/16/2005 7:01:06 AM
Hi there. I've for the past few days been experimenting with the use of non system fonts via the PrivateFontCollection.AddFontFile() method. If i do something like this: private void button1_Click(object sender, System.EventArgs e) { System.Drawing.Text.PrivateFontColl...more >>

Winforms design with class in nested namespaces
Posted by fdemmer NO[at]SPAM gmail.com at 2/16/2005 5:45:25 AM
hi i am working on a gui for a bigger project using managed c++ and wanted to put it in the namespace hierachy under cubes::gui so i did this in my form.h namespace cubes{ namespace gui{ public class [...] }} but now the design view does not work... it only does with ony one given nam...more >>

I have to re-build project to see changes at run time
Posted by TS at 2/15/2005 4:13:18 PM
I have one project that must be rebuilt instead of just built in order for changes to be seen. This is the startup project. I am running in debug mode, and the project is checked to build in this configuration thru config mgr. what am i missing? ...more >>

checkbox column in datagrid - event handling
Posted by coderazor at 2/15/2005 12:43:53 PM
I have a datagrid with a checkbox column. How can I make a messagebox appear if a cell with the checkbox gets checked or unchecked? thank you in advance. ...more >>

Microsoft: Help with OLE documents...
Posted by VBen at 2/15/2005 11:35:30 AM
Hi all. I have an application to draw and design different documents, that supports linking and embedding of other documents (like, for instance, Corel Draw or Word). Then, the user can print their designs "WYSIWYG", so I load the external document inside an OLE document container control (VB6),...more >>

listview scrollbar range not correct
Posted by GP at 2/15/2005 11:27:02 AM
I implemented a double buffered listview to eliminate flicker. I set the following styles, then overrode OnPaint and did the drawing. Everything looks great! However, if I change the font from default, the column headers are not drawn with the new font and worse yet the scrollbar doesn't know...more >>

How to access RadioButton's round cycle/dot graphics?
Posted by strout at 2/15/2005 11:15:06 AM
What I am trying to do is to change the round button background to grey and still keep the text label black, by overriding the "Enabled" property. The purpose is to keep the radio button reader-friendly while keep it non-editible. Somemhow I didn't find any property exposed to change the b...more >>

adding items to listbox with extra data similar to databinding to dataview
Posted by TS at 2/15/2005 9:43:52 AM
since you can't change items in a listbox that is databound, i have to add & remove items using its items collection. The thing about this is that with databinding, each item in the list can hold all the info for a particular datarowview and can be accessed by converting the list item back to thi...more >>

Form as a control?
Posted by Chris at 2/15/2005 9:20:06 AM
Hi, Is there a way to have a form as a control? Here's what I want to do: I have a datagrid which displays various information. However, I want to use it in multiple locations within the same application. Instead of creating an instance of the grid and linking up the same data on each for...more >>

App.config Problem when launched from IIS not locally
Posted by John at 2/15/2005 8:23:04 AM
I have an application that when launched under Windows XP, from an IIS web server, will not read values from the app.config file. I have looked at the IL code and attempted to reconstruct what AppSettings["key"] does. I can create a webclient and download the app.config file and can even ...more >>

BIg Problem
Posted by Euclides Garreta at 2/15/2005 8:21:24 AM
Hi, Hi testing the Visual Studio 2005 Beta 2, i'm developed one application and save this project, when close the visual studio and reopen in another time with the application i produce this error OBJECT REFERENCE NOT SET TO AN INSTANCE OF AND OBJECT LINE 0 COLUMN 0 And not is possible ...more >>

Button images
Posted by Mike at 2/15/2005 7:39:07 AM
I'm relatively new to programming in C#, so I'm probably missing something obivous. I've got several buttons on a form that I assign an image to when the user clicks each button. That works fine. If the user clicks the button again, I want to remove the image and just display the text in th...more >>

Changing DataViewManager.RowFilter has no effect
Posted by Jay Pondy at 2/15/2005 3:05:02 AM
On Feb 12 I posted a request for some help with the subject "Changing the DataViewManager.RowFilter has no effect". I attached some sample code written against Northwind demonstrating the problem. I may not have been logged in with my MSDN Email account so I am reposting my request under t...more >>


DevelopmentNow Blog