Software Development Network Logo
  • Visual FoxPro
  • Windows Forms
  • Windows Vista
  • Smart Devicet
  • SharePoint Products
  • Visual Basic
  • Game Technologies
  • IE Development
  • SQL Server
  • .NET Development
  • VS Team System
  • Visual C#
  • Microsoft ISV
  • Visual Studio
  • Audio and Video

Software Development Network >> Windows Forms

Windows Forms

New Question

How can I programmatically autosize columns in Datagrid?
ToolStripLabel
Only the last value is sent???
Fire events outside the form (KeyPress)
error: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
TableAdapter Problem.
Grid Single Row Band(0) Selection - How can I force this to happen?
Drag and Drop between my application and windows explorer
Changing properties to a form over another form
Automatic update works when turned off

Top Answerers

Wicket
Tryin2Bgood
J P R
spelger
RobC2k6
cka11
_Alex_
clkdiv
Mahyar154572
Glynne
sitemap
Only Title

Answer Questions

  • Neftali Reyes freeze a controls updating (events, redrawing, ...)

    Hello, Ive implemented a class that runs through all controls of my Form and updates them whenever it is resized. Thisway each control always keeps its relative size within the Form (I adjust each controls size, position and font-size). This is not as fast as it could be, because the controls are redrawn and cause events while still being in the update-process. I'd like to lock my controls in a way like ListBox.BeginUpdate(). I've tried to disable all controls, then update their size,position,etc. and finally enable all controls. But while resizing you can see that the controls become grey (disabled) for a short time. Any suggestions Sure, When you resize your window all children are updated according to ...Show All

  • John.Doe list box Items

    can anyone help me out... I've already populated a listbox with the ID: listItems... now I want to reorder the items... by having two buttons.. up and down buttons.... but once Ive selected an item... The SelectedIndex returns -1... so I cant move the item.. help!!! ahmedilyas wrote: this will move the selected item from the current place, moving up 1 position. Probably not the best way but this is what I could think of right now. does this help There's an easier way. As the sample in the above link states, protected void buttonMoveDown_Click(Object sender, System.EventArgs e) { if ( this .listbox.SelectedIndex < this .listbox.Items.Count-1) this .listbox.SelectedIndex++; } Rather amazing. ...Show All

  • India_2007 ToolStrip doesn't scale buttons in the overflow menu

    Hi there I use several ToolStrips in my application. They are placed in MDI-forms, which are created dynamically at runtime. The application has to adjust to the users DPI-setting. The AutoScaleMode property is fine, but as i see it, it doesn't work for the dynamically created MDIs. Because of this i scale them by myself with the Scale method. This works quite good for everything but the ToolStrip. I have several buttons inside the toolstrip, added with the ToolStripControlHost. When the form is scaled, everything resizes fine, but the toolstrip scales only the buttons that are visible (not in overflow). This is really annoying, and till now, i couldn't find a workaround. Hope someone can help me here. PS: sry, englis ...Show All

  • CJW99 Help with TreeViews

    So there might be a property somewhere I'm not seeing, but I figured I'd just come and ask anyways. I have a treeview that shows a list of items that are currently being rendered in a scene. If I remove an object from my scene as well as the tree view, my tree view control automatically selects another item that is in the control. Example, items 1-5 are being shown in my tree view. I delete object 3, then object 4 is automatically highlighted and selected in my tree view. Is there a way to prevent this behavior After you delete your tree node...either preselect a node (the first node in the tree in my example) or set the selected node to nothing so that no nodes are selected: Me . TreeView1 . Selected ...Show All

  • DMottorn Format Textbox bind to dataset.

    Hi, I am using VB.Net 2005, I bound my textboxes to as MS Acsess dataset in code, but the dates are displayed in the format 12/06/1966 00:00:0. What I want to display is just the date part (12/06/1966). I don't need the time part. can someone please tell me how do I format the textbox Thanks a lot! Good Day! Best Regards, Boon. Here's how I format a datetime when binding to a textbox: Textbx1.DataBindings.Add( "Text" , SomeBindingSource, "ConnectionTimeStamp" , True , DataSourceUpdateMode.Never, "" , " dd/MM/yyyy HH:mm:ss.fff " ) The last argument specifies the format of the date, which you can change of course. Hope this helps. ...Show All

  • Anatoly 01 DataGridView - Displaying objects that have been added to the DataSource

    Hi, I've got a datagridview whos datasource is a List<MyObject>. An external program adds items to this list and at this time i want to refresh the datagridview to show the new items. I've tried many methods such as suspending and resuming the binding but i can'just can't get it to show the updated list. Anybody any ideas Thanks in Advance JK you know, if you do a Refresh() on the control, it shows the updated contents, I was actually surprised at this when I was answering someone else's exact same question a while back....when you do a refresh on the control, it updates the display....try it, does it work Are you sure that the datasource has its contents modified Remember, you need to rebind ...Show All

  • SiTec Losing keystrokes while timer runs

    I have a User Control that includes a Timer (to provide a fade-in property). The control is placed on a Form that has KeyPreview true, but I find that all my keystrokes are lost while the control timer is running. As soon as the timeout has finished, and timer is disabled, the keystrokes work again. I've tried adding ParentForm.Activate() and allowing DoEvents() in the timer event but it still doesn't work. Any ideas brian smith It ticks every 100mS for a second and then a final 2 seconds (although these values will be user configurable). I tried reducing the tick to 50mS but no change. What I want to know is why this is happening - I assume the timer running on another thread, but why does that affect my main window message loop ...Show All

  • Naveeeen Global variable

    Hi, can anybody say how to add a global variable when I programing in Windows Forms What do you mean exactly You can create a public variable like this; public string myVar; No I cant. When I wrote public System::String ^MyVar I got error message : error C2059: syntax error: 'public', same when I wrote public string MyVar. But when I wrote just System::String ^MyVar (withuot public) I got error: error C3145: 'myVar' : global or static variable may not have managed type 'System::String ^'. What to do ...Show All

  • Jeff Youel AcceptButton problem

    I have a dialog window with some buttons. Button2 is my CancelButton and have the DialogResult set to Cancel. Button1 is my AcceptButton but I have set the DialogResult to None because I don't want this button to close the form. I only want it to be affected every time I hit the ENTER or RETURN key. When I click another button on the form and after that hit the ENTER key, the AcceptButton is not affected. How do I get it to allways be affected when I hit the ENTER key I read something about using eventhandlers for keyUp events for other buttons to "guide" the keystroke back to button1_click event handler. Do I have to make keyup eventhandler for every other button on the form to make ENTER key allways affect button1 or ...Show All

  • 0xDEADBEEF Changing transparent color on BMP

    I found this source from the GDI+ FAQ web site which will change the transparent color on the palette for a GIF file. However, I need to do this with a BMP file and this code doesn't seem to work on BMP, the resulting image is all messed up. Can anyone tell me how to modify this code to work with BMP images private void panel1_Click( object sender, System.EventArgs e) { //Creates a new GIF image with a modified colour palette if (cp!= null ) { //Create a new 8 bit per pixel image Bitmap bm= new Bitmap(_gifImage.Width,_gifImage.Height,PixelFormat.Format8bppIndexed); //get it's palette ColorPalette ncp=bm.Palette; //copy all th ...Show All

  • Sumit_Dagar_8eba6d How to pass a list[] into a listbox?

    Hello, is it possible to copy a complete list [] at once into a listbox without using the 'for' or 'forever' statement Regards, Henk It works, Thanks! I'm reading the comports from my computer with it and get a list: COM2 COM1 is there a kind of 'sort' operation possible ('SortedList' does not seem to be the answer...) Henk Hi, Please mark post with acceptable reply as the answer as soon as you get solution from the post so one can see that its solved. Possibly its good practice to ask new question as New Post. It helps other to trace the asnwer of perticular questions easily. For your second question, You want to sort the array - ...Show All

  • Prasenna Thread Pools

    I'm using thread pools to update multiple windows forms. The question i have is that when i close a form the thread doesn't get disposed and eventually the app locks-up when i open and close to many forms and won't display any data unless the app is restarted. What happens is the threads are getting stuck trying to update the closed form and when it hits that section of code its stays there trying to find the form but can't. It won't get deleted or die it just stays there until all the available threads are used then i get no more updates. Is there a way to delete the threads as the forms are closed or are they supposed to stay and i just need to add more threads to support what i need to get done i thin ...Show All

  • Andrea N. Resize Windows Forms On Aspect Ratio

    Hi all, How can I make a form ONLY resize according to predefined aspect ratio I know the aspect ratio is width / height. But, the problem is the Windows Form width and height is Int32 data type which can cause the aspect ratio is be rounded up to Int32, which will make the resize with aspect ratio incorrect. Thanks. Ensure that the form's height (or width) is divisible by 3. For example: private void Form1_ResizeEnd(object sender, EventArgs e) { if (this.WindowState == FormWindowState.Normal) { int h = 3 * this.ClientSize.Height / 3; int w = 4 * h / 3; this.ClientSize = new Size(w, h); } } Leonard, Try something like this: private void myForm_Resize(object sender, E ...Show All

  • mcgin1591 Desktop installation of new version fails

    I have a VB application developed in VS 2005 using CF 1.0. I have an installer that works exactly as expected from within VS. It also works fine on the desktop, if it is a fresh installation. I can install and uninstall just fine. The problem is when I have a new version number and try to replace the version on the device. It works fine in VS, but on the desktop, if I try to install or uninstall, I get a message "Another version of this product is already installed. Installation of this version cannot continue.." and so forth. Removing the software on the device does not help. Both installing and uninstalling still work within VS 2005. What is going on, and how can I avoid it I have set the "RemovePreviousVersion&q ...Show All

  • JIM.H. how to select datagridview cell

    How to select datagridview cell programatically I tried DataGridView1[1, 0].Selected = true ; but it din't work........ Thanks It should work as long as the form is visible when you select the cell. ...Show All

919293949596979899012345678

©2008 Software Development Network

powered by phorum