Answer Questions
RFDID Textbox bound to primary key fields
Hi I have a form with bindingsource ,biningnavigator and bound textboxes generated using VS2005 wizard. I want to use the same textbox controls for entering search criteria , by writing code in a command button control. The problem: When i focuse on textbox bound to primary key field,I can't leave the textbox control an i should enter a value, but really i want to let it blank (null) to be out of search criteria. The Question: how can I let the Textboxes relaxed for all PK constraints, and leave them blank for search. I used : MyTable.DataSet.EnforceConstraints = False , but it has no effect. Thanks ...Show All
Chris Zwirlein Background colour of DataGrid
Hi, I have some problem on changing the background colour of datagrid I have a datatable to link to the datagrid I want to use the each row's background colour to indicate the status of the record but I hard to find a method to chnage the background colour individually but can find a method to change the whole datagrid background colour How can I chnage the background colour of each row individually Thank you I am usinf VS2002........ this method seems work only under VS2005........ anyway, thank you for your help Moved to Windows Forms General forum. class =MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-paginati ...Show All
Gabriel Lozano-Moran Combobox Format Event
Is there any way to ascertain the list position of the list item being formatted in the format event I need to query the bindingsource at the corresponding row. The "SelectedIndex" and "SelectedValue" are no use as the items are not actually selected. use the IndexOf method on the Items property of the ComboBox... Thank you. Please can you give me example syntax. I cannot search for a string in the listbox as there are duplicates and I can't use the .SelectedValue property which contains a unique ID as the item is not selected. private void comboBox1_Format( object sender, ListControlConvertEventArg ...Show All
needforhint design verbs iin control
hellow any ideas how to add design verbs feature to contorl but not in design-time but in runtime yeah code project link i already knew, but MSDN link was new for me thank you :) in design time some controls have a smarta tag property for example datagridview has small icon, whne you clikc it popups up other menu suggesting you to choose datasourve or add columns, so my idea is to add the same smart tag alsoon runtime What do you mean of "design verbs feature" See this project and this . ...Show All
fruce Icon.Save throws an error
I am tring to save an icon from the from ( or just an icon in general ) using the Icon.Save method and i can not get this method to work correctly for me. Can someone point out to me how to use the Icon.Save method ---------------Error-------- Problem saving icon Error HRESULT E_FAIL has been returned from a call to a COM componet ----------------------------- if ( this .sfdIcon.ShowDialog() == DialogResult .OK) { try { using ( FileStream fs = File .Create( this .sfdIcon.FileName)) { //Our current icon is the icon on the form. this .Icon.Save(fs); fs.Flush(); } } catch ( Exception ex) { MessageBox .Show( "Problem saving icon" + Environment .NewLine + e ...Show All
roger5089 data set on combobox
hello, i have two combo box. the first combobox (cbtype.text) was filled from dataset, now the data on the next combobox will depends on the data from the first combo box. my data will come from access thru dsn heres my sql for the 2nd combo box SELECT MODEL, type, ord FROM MODEL where type=cbtype.text but it is not working, any help please not sure I follow exactly. what are you trying to fill in the 2nd combobox and how are you doing this hello, i already filled my first combobox with dataset now on my second combobox, i followed your suggestion but still nothing appears. i followed your link but if possible i would like to fill my 2nd combobox with almost the same as my 1st combo box. ...Show All
DCollins Data-binding problems at design time (VS 2005)
The project that I'm currently working on has a very annoying problem - it can't bind to data sources anymore. For example, if I select a DataGridView , then click the DataSource property, I get an "Object reference not set to an instance of an object" dialog, and am unable to select a data source. This happens for any control with a DataSource property - for example, ComboBox - and also if I try to change the DataBindings of a TextBox or Label . Yet other data-related properties such as DataMember , DisplayMember and ValueMember work fine. The strange thing is that the problem only occurs with this specific project. If I create a new WinForms application, drop a DataGridView onto the main form and go to change its DataS ...Show All
Paul Mitton Runtime listview width?
lv is a ListView created & filled at runtime from a DataTable dt. It must adjust itself to a large variety of queries, so it must know how to autosize, so we add columns to it with Width=-1: ListView lv = new ListView(); for ( i = 0; i < icols; i++ ) { lv.Columns.Add( dt.Rows .ItemArray[0].ToString(), -1, HorizontalAlignment.Left ); } and they are populated from dt: for ( i = 0; i < dt.Rows.Count; i++ ) { sRow = new string[icols]; for( int j = 0; j < icols; j++ ) { sRow[j] = dt.Rows .ItemArray[j].ToString(); } ListViewItem lvi = new ListViewItem( sRow ); lv.Items.Add( lvi ); } Now to calculate the size of the container dialog window (to which lv will be anchored), I need th ...Show All
Mr_White Strange problem with TreeView images
Hello. I have some strange problem with TreeView control. I've TreeView control and ImageList. I set node images as usual: set ImageList property of TreeView to my ImageList and set proper Image keys for tree nodes. When I run application from Visual Studio everything goes ok, but when I run application outside Visual Studio it sometimes shows images, and sometimes does not show them. Also I've used ManagedSpy to investigate this problem - it shows that TreeView's image list is not set Any ideas how to deal with it Thanks in advance. ImageList was created in InitializeComponent before the executing preceding code (My initialization code is executed in response to form's "Load" event ). There's a generated (by forms desi ...Show All
Knvb1123 How do i draw lines (sections) in a design application
Hi, I am developing an application that enables the user to design a dataflow diagram. The user drags a box onto the working area of my aplication and connects the boxes with lines. Until now the user has been limited to only drawing straight lines from point A to point B. I would like to make it possible for the user to click a line and drag the point to a new place (a bit like you can in visio) thus making a straignt line into an angle... then again cilcking a line and dragging the line to a new place, making another angle. This is done to make the diagram more readable to the user, because the lines no longer will go straight through boxes but can now be redirected around the boxes... Hope this makes sense :-) The point is, how ...Show All
Secsi setting proxy on WebBrowser Control
hello i am using WebBrowser control on a simple application. i want it to acess the web through my proxy server. is there a way to control that please let me know Thank you for the detailed reply I tried the proxy and unfortunatly WebBrowser does not respect it It looks like i need to write my own or play with the DLL file the wraped in the WebBrowser Class thanks and I will update the group if I find anything I would have thought it would use the proxy if it was set up in Internet Options, since that is where the core IE engine looks to get its connectivity settings. Here's a snippet from a post on another forum giving the location of this ...Show All
NuclearChicken "the path is not of a legal form" error
Hi, I made a control, and when I try to add it to a form, it shows me the error "the path is not of a legal form". How can I solve it Thanks. I know, my problem was the same. My program ran great, which is why I didnt think it was a reference either. But, it was... I tried, but I get the same error.. Anyone Beware that the code in your control may run while the form designer is using it. For example, the Paint event will run as will your constructors. Does your control do anything with file paths Suppress code execution while the designer is using it by checking the DesignMode property. if (!this.DesignMode) { // Do s ...Show All
Njofra Problem using Invoke to update UI from secondary thread
Hi all, I have a small application that performs a time consuming process (resizing multiple images in a directory) so i am executing in a separate thread but i want to update the UI thread with the status of the process. I'm trying to do this in the standard way of defining a delagate and a method in the UI thread but i'm getting the following error messages: Error 1: An object reference is required for the nonstatic field, method, or property 'ImageResizer.Form1.listbox_delegate' C:\...\Projects\ImageResizer\ImageResizer\Form1.cs Error 2: An object reference is required for the nonstatic field, method, or property 'System.Windows.Forms.Control.Invoke(System.Delegate, params object[])' C:\...\Projects\ImageResizer\ImageResizer\Form1 ...Show All
nateraaaa Images do not appear in listview
Hi all, I am using a listview and have images being shown in the first column, however these images do not show up every time. Every now and then, there is no set pattern, the images do not show and there is an empty space instead. If anyone can help me it would be greatly appreciated. Thanks in advance Nothing really jumps out as "that's why!". You specifically use a blank bitmap when the XML string is empty, be sure to put a breakpoint on that statement. More relevant perhaps is that your app is behaving as though the garbage collector is disposing your images. That would explain the random behavior. Test that theory first by calling GC.Collect() after you've loaded the images. If t ...Show All
flash.tato Form's - Border Color
Hi, How can I change form’s border color Or is there any method to hide/show form’s border at runtime. Either one will work for me. Ex: If user wants to keep background green, border also should change to green color. Best % V Ok, Thanks :) Thanks for reply!! :) The border which appears is very thick; I want border style similar to MSN. If you move mouse on edges (MSN) can see a thick border but with different style. You can't change the form's border color, it is controlled by the current XP theme. Or system color if you don't use theming. You can hide th ...Show All
