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

Software Development Network >> Windows Forms

Windows Forms

New Question

Select treeview node with enter
how to to fill a combobox diplay property with multiple columns not only one datafield
Drag and Drop between my application and windows explorer
Problem with control docking
How to Trigger an Event When a tabpage is loaded?
Open winforms with Async threads
Custom Action does not run
DataGridView: prevent column reorder for one column
Webbrowser control and embeded applet flicker
How do it

Top Answerers

Deco
BiBi MeiMei
Waqar Azeem
AlexVallat
Bartosz Kowalski
Joeku
Donald31
pritha
Sinclair Schuller
sebahattingokce
Topix: Steve Martin
Only Title

Answer Questions

  • Alastair Q C++ Drag and Drop

    I know there have been lots of questions asked about this, but I can't see any that answer my particular one. I have pictureboxes that I want to be able to move round a panel freely - they contain bmps. I have implemented the dragdrop events of the panel like so: private: System::Void pnlDragDrop_DragDrop(System::Object^ sender, System::Windows::Forms::DragEventArgs^ e) { PictureBox^ picPole = safe_cast <PictureBox^> (sender); picPole->SetBounds(posx, posy, picPole->Width, picPole->Height); } private: System::Void pnlDragDrop_DragEnter(System::Object^ sender, System::Windows::Forms::DragEventArgs^ e) { e->Effect = DragDropEffects::Move; } private: System::Void pnlDragDrop_DragOver(System::Object^ sender, System: ...Show All

  • Michael Hotek datagridview help

    Hello, Can anybody teach me how to create a datagridview that can show the record that have relation in two table Below is my code but it did not work it only show the record for the UserGroup table. What I want is that when i chooce the group it can show me all the user that is belong to the group in the Users table on the same datagrid. SqlConnection con = new SqlConnection "server=PALADIN\\SQLEXPRESS;database=TESTING;uid=sa;pwd=password" ); SqlDataAdapter da = new SqlDataAdapter ( "Select * from [user]" ,con); SqlDataAdapter da2 = new SqlDataAdapter ( "Select * from user_group" ,con); DataSet ds = new DataSet (); da2.MissingSchemaAction = MissingSchemaAction .AddWithKey; da.Mi ...Show All

  • Callavin errorProvider not clearing icon

    I have a requied textbox. The problem is when I tab out of the textbox after entering data, the validation fires, but doesn't clear the error icon on the textbox. It still displays until I tab back into the textbox and tab out again. private void sUBJECTTextBox_Validated( object sender, EventArgs e) { HDDataSet . HELPDESKRow ticket = ( HDDataSet . HELPDESKRow )(( DataRowView )hELPDESKBindingSource.Current).Row; if (sUBJECTTextBox.Text.Length > 0) { ticket.SetColumnError(hDDataSet.HELPDESK.SUBJECTColumn, "" ); } else { ticket.RowError = "Error on ticket" ; ticket.SetColumnError(hDDataSet.HELPDESK.SUBJECTColumn, "Subject is required." ); } } ...Show All

  • GerrydeBruijn Saving from RichTextBox in .rtf or .txt??

    Hello, I am trying to save file to either .rtf or .txt from my RTB. When I save to .rtf it works fine, but when I try to save to .txt it saves the file but it doesn't put the '.txt' extension to the end of the fileName. So when I try to open the file again it doesn't appear as a .txt file, but it works if I manually add the '.txt' file ext. into the filename at savetime. Here's my code: Dim textType As RichTextBoxStreamType If (SaveFileDialog1.ShowDialog() = Windows.Forms.DialogResult.OK) Then If (SaveFileDialog1.FilterIndex = 1) Then textType = RichTextBoxStreamType.RichText Else textType = RichTextBoxStreamType.PlainText End If End If Dim fs As New FileStream(SaveFileDialog1.Fil ...Show All

  • bjkaledas Project server 2003 login issue

    Hi All, i have a project server 2003 login issue. i used single server installation method to configure project server.when i trying to login thru PWA i am getting this error "Project server was unable to login you at this time (5006).i have tried editsdite utility and i haven't faced any problem with installation. please help me to resolve this issue. Thanks in advance... Rajeesh Is this a Windows Forms programming question I would normally delete this post as off topic if I had half a clue what "project server 2003" really is... Hi, Please post your question in the following newsgroups for project server. http://www.microsoft.com/technet/community/newsgroups ...Show All

  • Diego Vega - MSFT Links in a FormsApp and controlling the browser

    Opening links is easy, like this private void button1_Click( object sender, EventArgs e) { System.Diagnostics. Process .Start( http://www.google.com ); } private void button2_Click( object sender, EventArgs e) { System.Diagnostics. Process .Start( http://www.yahoo.com ); } But is there a way to control if the link is opened in a new browser window or an existing one Nope, sorry to disappoint you ;) Button one method will always use an available insatnce This will start a new Instance each time it is clicked: private void button2_Click( object sender, EventArgs e) { Process P P . StartInfo . Arguments = http://www.m ...Show All

  • c0d3bl00d3d form code help please.

    dear All I am new to .net and havent yet got the hang of organising the code, can someone help me please. I have the following problem. private void Form1_Load(object sender, EventArgs e) { // I define an instance of a class here. which has a property "Name" and some others Precipitate[] prec = new precipitate[29]; for (int i = 0; i < 29; i++) prec[ i ] = new Precipitate(); // I create an instance of another class which inherits from the checkbox class mycheckBoxes[] checkbox1 = new mycheckBoxes[29]; for (int i = 0; i < 29; i++) checkbox1[ i ] = new mycheckBoxes(); //I define a method to put some dynamic checkboxes in my form. I prefered to use a function rather than to put the code directly in here just so that the main ...Show All

  • Vijay Chegu Form Freezing

      Hi,i have made a C# desktop application that calls the web pages,crawl and parse them, this process takes time it may take 2 mins, the form in this duration freezes and stop me to do anything.  I need a technique to avoid the from freezing when i start the application,  if anybody can help me i will appreciate . Thanx alot . Hi Ramez, 1. Try to modify the algorithm processing the parsing to shorten the boot-up time. 2. Embed a progress bar on the form in order to let the customer feel that 2 min is not long enough. 3. Use another thread to do the parsing. When you load the form, call the form's Show method, this forces the display of the form, then call Application.DoE ...Show All

  • ETJorg Edit is changing all rows?

    I have a Main Windows form that has a datagridview of customers table. The datagridview updates automatically. For editing I have a form with displays the selected datagridview row details. If I edit the row then call update for some reason it is changing all the rows on the main form Here is my code to edit the details Me.CustomersBindingSource.EndEdit() Dim rs As DataRowState= dr.RowState If rs = DataRowState.Modified Then Me.CustomersTableAdapter.Update(dr) End if Can someone help me with this please Never mind. I figured it out. ...Show All

  • mogens Need help with formating a default cell style

    I have a DataGridView control that contains two columns that I'm trying to format. The first is a date which is working as expected and the second one contains strings with leading 0(zeroes) that I'm trying to remove with TrimStart: Me .DataGridView1.Columns(1).DefaultCellStyle.Format = "MM/dd/yyyy" ' This works correctly Me .DataGridView1.Columns(3).DefaultCellStyle.Format.TrimStart("0"c) ' This compiles but makes no changes to the strings The database colunms contains string like: "00003" and I'm trying to display just the "3" in the control to minimize the column width. ~DeBug Hi, Do the formating through handling the CellFormatting event ...Show All

  • RichBar PrintPageEventArgs Supplies a Graphics Object with Random VisibleClipBounds

    I am facing a problem where only a portion of the page I am trying to print shows up on the printer. I see that the same problem is reported by a number of people: a. http://www.thescripts.com/forum/thread225516.html b. http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=38324&SiteID=1 c. http://www.dotnet247.com/247reference/msgs/24/121201.aspx After spending some time, I find that the Graphics object supplied by PrintPageEventArgs in the PrintPage event is giving a "random" VisibleClipBounds. For the same printer, sometimes it is big enough for the page, sometimes it is not. In one debug session, I printed my application to different printers one after another by selecting them from a standard PrinterDialog I ...Show All

  • Alex Smirnov Visual Studio 2005 Forms Designer Bugs

    To whom it may concren (Microsoft development team): We have a couple of observations concerning the Visual Studio 2005 IDE, particularly the Forms designer. There are a couple of bugs with this. 1. From time to time, our forms resize themselves. Literally, they shrink, pretty consistently when this happens, to within a few pixels of bottom-most and right-most control edges. This doesn't happen all the time, but it does happen. Sometimes it happens regardless of whether we've actually "touched" a form for editing from within the IDE (i.e. as an outcome of having built the application). 2. Some of the "layout manager" style controls have resize issues. Those that manage the bottom and right anchors, for examp ...Show All

  • KerryLW Handle CRTL+A with a ListBox

    I'd like to handle CTRL+A in my ListBox to select all the items. I check for Keys.A in the KeyDown event of the ListBox and then check if control was pressed. If so I select all the items in the list. This is working. However even though I'm setting e.Handled = true the key is bubbling up and then it selects the first item in my list that starts with the letter A thus unselecting everything else. private void lstImages_KeyDown(object sender, KeyEventArgs e) { switch (e.KeyCode) { ... other key checks removed ..... case Keys.A: if (e.Control) { SelectAll(); e.Handled = true; } break; } } Ok, got it. ...Show All

  • Gem2036 DataGridView Header in VS2005 (c#)

    Hi, How do i give my DataGridView an overall Header. Ive found examples with row and column headers but i want to give it an overall header. The previous way to do it was using CaptionText for a Datagrid but i cant find a way with DataGridView. Any help would be much appreciated. Thanks. Sorry the datagridview does not have a caption text. Not the best solution but you could dock the datagridview in a groupbox and use the groupboxes text. Thanks. But surely it is possible to put a header onto it. It seems like such an obvious thing to be part of a datagridview. Read this post ...Show All

  • tirengarfio How to create Bitmap of a Web Browser Control?

    Hi Guys! Im new to C#. How can I create a Bitmap of the Web Browser Control using the CreateGraphics Method Thanks! Matt I get some errors: Error 1 'System.Drawing.Bitmap' does not contain a definition for 'CreateGraphics' C:\Documents and Settings\HP_Owner\Desktop\WindowsApplication1\WindowsApplication1\Form1.cs 21 28 WindowsApplication1 Error 2 The best overloaded method match for 'System.Drawing.Graphics.CopyFromScreen(System.Drawing.Point, System.Drawing.Point, System.Drawing.Size)' has some invalid arguments C:\Documents and Settings\HP_Owner\Desktop\WindowsApplication1\WindowsApplication1\Form1.cs 22 13 WindowsApplication1 Error 3 Argument '3': cannot convert from 'System.Drawing.Cop ...Show All

8788899091929394959697989901234

©2008 Software Development Network

powered by phorum