Groups | Blog | Home


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 2006

Filter by week: 1 2 3 4 5

TreeView performance
Posted by Luc Kumps at 7/31/2006 10:22:23 PM
I posted this earlier today on languages.csharp and now I discover this newsgroup. Sorry for the duplicate! I populate a TreeView (tv) with 1110 nodes like this: for (int i = 0; i < 10; i++) { tv.Nodes.Add("x"+i.ToString()); for (int j = 0; j < 10; j++) { tv.Nodes[i].Nodes.Add("y"...more >>

Using the mousewheel
Posted by Jean Paul Mertens at 7/28/2006 4:10:21 PM
Hello, I try to use the mousewheel in a user control to to scroll in a pannel where I draw with GDI+ . due to the fact that a pannel don't has focus, I have no mousewheel event at my dispositon. Is there a work around? Someone has an idee? tnx in advance. Jean Paul ...more >>

Custom Control Docking
Posted by Chuck P at 7/28/2006 2:02:48 PM
I have a custom control with a ToolStrip in it. When I tell the control to Dock Top, it doesn't resize on the form. If I close and then reopen the form it is fine. private void CustomControl_Load(object sender, EventArgs e) { this.Size = this.toolStrip1.Size; ...more >>

datagridview Col 0 Visible = false, still shows up
Posted by Greg P at 7/28/2006 8:39:02 AM
I have a tab control with many datagridview controls on it. I have an ID column in column 0 on most of them. In the edit columns area I set the columns visible property to false yet when I run the program it still shows up. To fix this I can hide it if I do it programatiacally when the tab ...more >>

Problem with datagridview.CellFormatting event
Posted by virallinen NO[at]SPAM gmail.com at 7/28/2006 1:32:21 AM
Hi all I have created a datagridview and a datasource at designmode and then added two colums. Second column is my own custom column with custom cell where I want to insert object. Problem is that on the CellFormatting event the e.ColumnIndex never points to myCol -column. How can I get the ...more >>

DataGridView : how to suppress ellipisis in headers ?
Posted by Patrice at 7/27/2006 5:59:51 PM
For now I'm unable to find how I could suppress the automatic use of "..." when the header text doesn't fit the column width... TIA for any help. -- Patrice ...more >>

ListViewItem not showing correct Formatting
Posted by Jason Allred at 7/27/2006 2:31:17 PM
I have a listview where I set the View to Details. I then add several customized ListViewItems which have different colors (both background and foreground). However, when I first load the items, none of them will have the correct formatting. There are also times when the first item will hav...more >>

Disposing Control and BackgroundWorker thread
Posted by Bruce Parker at 7/27/2006 1:44:02 PM
I have an application that will perform a CreateInstance on a UserControl I have created. When the user control starts up, it creates a BackgroundWorker thread to retrieve a list of items from the database. When the list has been retrieved I perform a Me.Invoke to populate the items into a D...more >>



ToolStripControlHost
Posted by MikeTheFid at 7/26/2006 2:01:37 PM
Microsoft Visual C# 2005 Microsoft Visual Studio 2005 Version 8.0.50727.42 (RTM.050727-4200) Microsoft .NET Framework Version 2.0.50727 Installed Edition: Professional The following snippet gives me the warning: "Constructor on type 'System.Windows.Forms.ToolStripControlHost' not found." ...more >>

AutoCompleteComboBox User Control
Posted by Derek at 7/26/2006 4:09:02 AM
Hi, I have an autocomplete combobox that is derived from a standard combobox. My problem occurs if the list is dropped down and an item selected by typing in a letter. When I try to access the SelectedValue property from external code (the form on which the control is placed), I get the ...more >>

How to share common Context Menu between Controls?
Posted by Joseph Geretz at 7/25/2006 10:49:13 PM
What's the best way to share a common context menu between controls? At design time, I can link the context menu to multiple controls, but at run time, when the menu item is clicked, the event handler for the context menu doesn't really have any way of knowing what control the context menu is ...more >>

Discrepancy in DataGridView column order & databound DataTable
Posted by Mike at 7/25/2006 5:58:50 PM
Dear group, I'm currrently investigating a bug within a piece of our software whereby if a DataGridView (bound directly to a DataTable) is ordered by column headers (containing lookup combo boxes where the value is the foreign key of another table), although the DataGridView is ok, the Data...more >>

ListView's QueryContinueDrag event not firing
Posted by Charles Baker at 7/25/2006 12:00:00 AM
As the subject mentioned, I am trying to implement drag and drop in a ListView. I call DoDragDrop in the ItemDrag event and have hooked up the QueryContinueDrag Event. Put a breakpoint inside the event, but when I drag and press ESC key or some other key it won't stop at my breakpoint. This w...more >>

Child window in MDI form.
Posted by Bharathi Kumar at 7/24/2006 8:34:54 PM
Hi, iam working in a windows application (Framework 2.0, VS 2005). Iam have one MDI form and so many child forms in my appln. When I maximize one child window in the MDI, all other child windows are also getting maximized, I dont want this to happen. Could anyone suggest me w...more >>

Adding Checkbox to VB.Net Datagrid
Posted by Rick at 7/24/2006 5:00:40 PM
Can anyone tell me the best way to add a checkbox to a VB.Net datagrid? I can get a check box in the grid if I use a SQLServer Query and convert the column to a bit, but when I do that it is not editable. Thanks in Advance, Rick ...more >>

Flipping tabs on TabControl
Posted by Sam Carleton at 7/24/2006 2:59:14 PM
The alignment on my tab control is set to Bottom (so the tabs are on the bottom) but the default painting of the tabs is still as if they where on top. I am assuming that it is already pretty well document on how to override the OnPaint to flip things around. Can someone point me to it? Sam...more >>

How to use Paint-method on Custom DatagridViewCell to draw an image?
Posted by virallinen NO[at]SPAM gmail.com at 7/24/2006 3:22:46 AM
Hi How to use Paint-method on Custom DatagridViewCell to draw an image? This method gets graphics As System.Drawing.Graphics -> Not sure. clipBounds and cellBounds As System.Drawing.Rectangle -> Both are cellboundaries, but not really understanding how they work rowIndex As Integer ->...more >>

Microsoft Reports (rdlc) in VS2005
Posted by shaneseaton NO[at]SPAM hotmail.com at 7/23/2006 11:01:35 PM
Hi, I am learning to use the new ReportViewer to create and display reports in an application I am creating. The report is bound to a objectDataSource, and is the object being wrapped looks a bit like this... public class Company { public string CompanyName { ... } ...more >>

Validating event firing twice when using UserControl
Posted by maksim.yevstratov NO[at]SPAM gmail.com at 7/21/2006 7:49:42 PM
Hi, I have a UserControl with a TextBox in it. TextBox has Validating event handler that can cancel the validation. If I place two UserControls like this on a form then Validating event will be firing twice. To demostrate this I put the following code inside the UserControl. pri...more >>

MessageBoxButton handling question
Posted by jamie at 7/21/2006 1:13:33 PM
I have a textbox that I check after each keypress to see if Enter was pressed if it was I review the data in the box and if it's wrong I pop up a MessageBox with YesNo buttons to verify that the info is what was wanted. If they say yes I continue on if they say no I put focus back on the textb...more >>

Merging ToolStrip in MDI application .. How to...
Posted by Marlon R at 7/21/2006 8:40:11 AM
I have been able to get MenuStrip to merge successfully but not the ToolStrip. Can anyone please show me step by step instructions how to do this. Thanks ...more >>

Adding custom control on custom datagridviewcell
Posted by virallinen NO[at]SPAM gmail.com at 7/21/2006 4:53:53 AM
Hi I have made a custom calendar control that I would like to add to a datagridview. This control is static with no events and it is only made to show information. My cell inherits the DataGridViewImageCell and on GetFormattedValue I tried to return the control (first setting it up with val...more >>

Q: DataGridView individualized cell styling:
Posted by Matt C. at 7/20/2006 3:47:08 PM
First, let me say, DataGridView, wow. Big world there. I have a databound DGV. Most of the columns are hidden (not visible). I want to set ReadOnly for certain cells based on the value of a hidden column. I have an approach that works and seems OK, but I wondered if there was a more DGV...more >>

Cross Threading Issue related to framework upgrades
Posted by raj at 7/20/2006 9:28:36 AM
We upgraded an application which was using framework 1.0 to 1.1. The upgrade went smooth besides a few minor changes. It worked well in 1.1. Then we decided to upgrade it to 2.0. Well now all of our Office realted functionality was broken due to the threading issues. We kept running in to ...more >>

Unable to cast object of type 'System.String' to CheckBox
Posted by Jeff at 7/20/2006 3:38:17 AM
This is what I am trying to do: During form load I open a database connection, read a table, and then if an item in the table has a specific column that says "yes" I want to place a check in the checkbox item on the form. Here is my code: 'Open sql database connection cnGrocery.Open() 'R...more >>

DataGridView RowBeginEdit question
Posted by Matt at 7/19/2006 7:33:27 PM
I essentially need to call a method on another class when a user begins editing data in a row. I need to be able to tell when a row in a datagridview has begun edit. I'm sure this must exist someplace as the RowsAdded and UserAddedRow events are there. It seems to me that there should be ...more >>

determine which subitem of a listview was clicked
Posted by Jeff Boeker at 7/19/2006 7:20:02 PM
What is the best way to determine which subitem of a listview was clicked? Right now I'm using the HitTest function and iterating through the bounding rects to see which one matches the specified subitems bounds. I hope there is a better way. Thanks, Jeff ListViewHitTestInfo lvHitTest...more >>

Resource File
Posted by Ginny at 7/19/2006 5:15:50 PM
This is regarding adding image to a resourcefile. In my project, we use ultrawinlistbar. In this we place icons. These icons are populated from the resource files. Now i need to add an image to an already existing resx file. How do i do this? Please provide me any study material or any idea on ...more >>

How do you force the entire DataGridView row to repaint?
Posted by MarkH at 7/19/2006 5:50:02 AM
I have a DataGridView bound to a DataTable via a BindingSource. I have overriden the CellFormatting event to change the fore and back colors of the cells within each row based on a status value. This works well but if the status value changes only the status value cell updates, leaving the o...more >>

OwnerDraw ListView Flicker
Posted by Jeff Boeker at 7/18/2006 4:10:02 PM
Can anyone give me some tips or point out a link that show how to eliminate flicker on an ownerdrawn listview in detail view and with gridlines using v2.0 framework? I have about 50 rows and 7 columns in my list and I need to refresh the value in one column every second. It looks like it is ...more >>

Wrap text on toolstripbutton
Posted by Henrik Skak Pedersen at 7/18/2006 3:24:09 PM
Hi, Is it possible to wrap the text on two lines on a toolstripbutton with an image? Thanks Henrik. ...more >>

Toolbar question
Posted by Water Cooler v2 at 7/18/2006 7:13:48 AM
Besides querying the Text property, how do you find out which button on the toolbar has been clicked? The Name property doesn't appear in the code window, but only appears in the design mode. The problem is that I have added a lot of spaces to the left of the label of one of my buttons. The ac...more >>

DataGrid editing
Posted by Peter Morris [Droopy eyes software] at 7/15/2006 12:00:00 AM
1) Show a form 2) Edit the first column of the first object 3) Do not leave the cell 4) Close the form using the [X] button in the caption dotnet data binding will only update the object if focus to the cell is lost, but the [X] button does not cause this to happen until after the form has c...more >>

Question about Forms.Treeview and BeforeLabelEdit event
Posted by Charles Baker at 7/14/2006 3:14:04 PM
How can I detect that a user is really starting to edit a label? Need to distinguish between a real editing and the case where the BeforeLabelEdit gets fired, but the uses doesn't hoover long enough to start editing. The BeforeLabelEdit gets fired before the text will be selected blue and read...more >>

Integrating my custom column control with the DGV column designer
Posted by me at 7/14/2006 2:55:57 PM
I have created my own class: class DataGridViewNumericTextBoxColumn : DataGridViewTextBoxColumn which only allows numeric values to be entered into a DGV column. Works fine if I create my columns in code, but it is not available to be picked in the "Edit Columns..." designer in Visual Stud...more >>

Hide base control's properties
Posted by Jeff Boeker at 7/14/2006 11:19:01 AM
I'm deriving a class from ListView and want to hide some properties that don't make sense for my control. For example I want to hide the View property from any derived class and the Forms Designer which works inasmuch as it is not listed as a property in the forms editor but I still get a...more >>

Custom form drag, does not work... why?
Posted by ThunderMusic at 7/14/2006 10:14:07 AM
Hi, I have a borderless form and I try to drag it. When I do it, the form start to jump from position to position even when I don't move the mouse... My formula seems right, but the result is not... can somebody help me please? here is the code: private void managementConsoleBarSmall1_...more >>

UserControl Stopped Showing up after an small code change URGENT!!
Posted by Buliwyf at 7/13/2006 6:46:02 AM
Please bear in mind that the change made was to a variable or two that is it. This worked properly before. Any guidance would be of great assistance. It just won't show up anymore in the browser. I have tried on XP and Server 2003 and Still nothing Why when ever you do something half way com...more >>

Folder Tree component
Posted by Jiri Cincura at 7/13/2006 12:26:44 AM
Hi *, I'm looking for some "folder tree" component for .NET FW 2.0. Something like tree on left side of explorer. Any tips? thx -- Jiri Cincura http://blog.vyvojar.cz/jirka/ | http://www.ID3renamer.com...more >>

ComboBox lock/suppress DropDown
Posted by ian_jacobsen NO[at]SPAM hotmail.com at 7/12/2006 11:39:58 AM
I have a control that is derived from the standard ComboBox. I want to lock or suppress the DropDown when the arrow button is clicked without disabling the control. This is related to another post that I have out there for a custom OnPaint event. I want to provide custom colors for ComboBo...more >>

Howto Undo sort after refreshing datasource in a DataGridView?
Posted by Adri at 7/12/2006 5:45:02 AM
In my application, I have a DataGridView to show results a (SQL) stored procedure. The user is allowed to click on the column-header to sort the rows. However, when the data in the DataGridView is refreshed (with a new resultset of the same sp), the last sorting order is still maintained. How ...more >>

Printing question
Posted by Darren Mar-Elia (MVP) at 7/11/2006 11:55:22 AM
I'm playing around with Printing in a .Net 2.0 Windows Forms app. My goal is to print a report where the data comes from a ListView. The challenge I'm having is in properly formatting the text. Ideally what I want to do is create a tabuluar report where each column of text wraps as necessary i...more >>

simulate click in ToolStripMenuItem
Posted by Dominique Gratpain at 7/10/2006 2:22:10 PM
Hi, In WinForm 2.0 (VB), i have a menustrip and many toolstripmenuitems. Suppose that i have menu0, menu1, .. in the menustrip. Under menu1, i have menu10, menu11, .. and under menu11, i have menu110, menu111, ... The user click on menu111 then I hide the menustrip and i do the appropriat...more >>

Blinking a Label
Posted by Bharathi Kumar at 7/9/2006 10:03:45 PM
Hi, How can I get a blinking text for a lable. Iam working in a window appln using framework 2.0 and VS 2005. Thanks in advance, Bharti Kumar. ...more >>

Can't Create New Data Connection
Posted by JamesJ at 7/8/2006 7:49:40 AM
Just installed Visual Basic 2005 Express Edition. When attempting to link to a data source which is a ms access database I get the following error (if I wrote it down properly). Format of the initialization string does not conform to specification starting at 0. I thought it would be a bit e...more >>

Can a VS2005 Control be used in VS003
Posted by Dave Johnson at 7/8/2006 1:05:37 AM
is there any way to create a control in VS2005 and then use it by any means in VS2003 ?? is there a way to acheive this by any means ??? anyone did it before please help, thanks a million Sharing makes All the Difference -- Sent via .NET Newsgroups http://www.dotnetnewsgroups.com...more >>

How can I Import Excel File into a DataGridView?
Posted by SPS Developer at 7/7/2006 12:20:01 PM
Does anyone have a code sample of selecting certain rows from an Excel file and then importing it into a datagrid or a datagridview? I used this code and it works fine except it seems to have a few glitches if the dataadapter mixes up a columns data type - which I can't seem to force. stri...more >>

ComboBox will not release focus
Posted by JohnMSyrasoft at 7/6/2006 5:14:02 PM
Hi, I've got a comboBox that is behaving oddly. This is a Windows Forms application in VB.NET 2005. I'm doing some manual databinding to it - I add a row to a strongly typed dataTable and then assign the DisplayMember and ValueMember properties of the comboBox as in: Me.CoInfoDataSet.AC...more >>

Exposing a field in a base control to inherited control via design
Posted by Rich Denis at 7/6/2006 9:13:02 AM
Hello, I apologize if this issue has been brought up before but I could not find reference to it. Any help would be appreciated. Here's the basic situation. We have a base form that controls the general layout of things for all the various forms in the Order hosted app. The form has a ...more >>

Usercontrol icon
Posted by Aristotelis Pitaridis at 7/6/2006 12:00:00 AM
Does anyone knows how to set an icon for a control that I created? Aristotelis ...more >>


DevelopmentNow Blog