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

Software Development Network >> Windows Forms

Windows Forms

New Question

How to color a particular cell in datagrid based on some condition.
how to sort the date in as array
Exception occurred during store operation
validating a tab page
Application hangs after changing display properties
Exception is not propagated up the call stack
foreach(Form f in AllformsOfApplication)
How do I update the changes from my DataGridView into my SQL table?
How do i populate a datagridview cell with an unbound data after input information on a cell?
Why is a cell ALWAYS selected in my DataGridView

Top Answerers

jatwood
Eric Cann
John Cargill
GinaK
Trev72
Tigers21
LiamD
vijil
Sergey Pikhulya
Fwank79
sitemap
Only Title

Answer Questions

  • siavoshkc Interaction between user controls

    Hello, I'm building an application that uses user control. I have several user controls that interact, for instance: User control A that shows a list of items from the database and user control B that shows the details of the item when a user clicks on an item in the list contained in A. The user controls have no knowlegde of each other. The form in which the controls are contained, manages the interaction. Can any one tell me a model how to implement this Henk Feijt Let UserControl A generate an event when the user selects a new item. Add a property so that the form can read back the required detail(s) of the new item if necessary. Add an event handler in the form and have it call a pu ...Show All

  • Alex Simkin Highlight Rows in Datalistview with Mouse Over

    Hi, I have a datalistview with fullrowselect enabled, I have been trying to get information about how to highlight the full row when mouse is over (not clicking the row). Any ideas Thanks in advance George Thanks Wang, but the DataGridView1.CurrentRow = hti.RowIndex it cannot be done since DataGridView1.CurrentRow is a read only property, am I doing something wrong Thanks Sorry, it's my fault. To highlight rows, you just need to set dgv.Rows[index].Selected = true; I find this in previous post Private Sub DataGridView1_MouseHover( ByVal sender As Object , ByVal e As System.EventArgs) Handles DataGridView1.MouseHover Dim pt As New Poi ...Show All

  • Farhad Tasharofi How can I prevent a listView (View: List) from showing on serveral columns?

    Hello, I have a listView with the View property set to List. What I want to do is simply preventing the listView item from showing on serveral columns. Like this: 1............2.............3 4............5.............6 I want them to appear as follow: 1 2 3 4 5 6 Please note: I don't want to add columns that will be visible to my user. Please help. Thanks. Set the View to Report. Set the other column widths to 0. Set the columnheader resize property to false. This post is off topic for the Visual C# General forum. Moving to the Windows Forms General forum. Umm, that *is* the way the ListView control displays the items when View = List... ...Show All

  • Microsoft Visual How to pass variables between forms

    Hi, I have a login form and the main form of my program, I would like to pass the username that the user typed in the login form to the main form, could somebody help me with this please. Thank you in advance. Hi, This link may answer your question: http://themightycoder.spaces.live.com/blog/cns!EBFBA22CD769E10B!144.entry   Quote: Access a value in one form i.e. the value contained in a text box and use that in another form, possibly to set a label in the original form.  So below is a small fully functioning example (copy and build at will) which shows a form, Form1, with a button and a label.  When the button is clicked it opens up an instance of Form2 which has a textbox ...Show All

  • Rohit Tela last action + hide the main form

    Hi, i create an application that execute a command at the startup and do a last one when the user leave windows (logout/shutdown). Since i haven't found if it possible to capture the logout/shutdown event, i use Private Sub Form1_Closed( ByVal sender As Object , _ ByVal e As System.EventArgs) Handles MyBase .Closed stop_process() End Sub and Private Sub MyApplication_Shutdown( _ ByVal sender As Object , _ ByVal e As System.EventArgs _ ) Handles Me .Shutdown stuff_handler.My.Forms.Form1.stop_process() End Sub since i consider that to leave windows, windows will need to stop my process at the same time. Is there a better way to do the job Now the thin ...Show All

  • Fahad Hanif How do I create an object from a row in a DataGridView / BindingSource?

    I would like to create an Object (say Client) from the currently selected row in a DataGridView. The DataGridView's DataSource is a BindingSource, for which the DataSource is a DataSet containing a single Table of Clients. I have been advised to use the BindingSource.Current property to get the selected item (or row), rather than the DataGridView. I have tried the following: DomainClient c_client = (DomainClient)c_bindingSource.Current; which results in an exception. How can I get around this Thanks in advance, JackStri. Hi, I guess I replied more than year after you posted this. I was facing the same problem, until I found this solution DataRowView rowView = ( DataRowView )e ...Show All

  • mrwebster Center text displayed on the combobox.

    Hi All, Is there a way to center the text that is displayed on the combobox Thanks using System; using System.Text; using System.Windows.Forms; public class CenteredComboBox : ComboBox { public CenteredComboBox() { this.DrawMode = DrawMode.OwnerDrawFixed; this.DropDownStyle = ComboBoxStyle.DropDownList; } protected override void OnDrawItem(DrawItemEventArgs e) { e.DrawBackground(); string txt = ""; if (e.Index >= 0) txt = this.Items[e.Index].ToString(); TextRenderer.DrawText(e.Graphics, txt, e.Font, e.Bounds, e.ForeColor, TextFormatFlags.HorizontalCenter); e.DrawFocusRectangle(); } } Thanks a lot, nobugz Would be nice if the thread is for C#. I am not a well Vi ...Show All

  • Rashar Number the rows in the Datagrid

    Hi Is it possible to number the rows in the datagrid in the first grey column Thanks in advance Hi, LuckyL I take it for granted that you dev an asp.net project, while you are actually deving winform in C#. Well, then reference to: http://64.78.52.104/FAQ/WinForms/FAQ_c44c.asp#q896q Hope it helps. BR Thanks for this reference. It has so much info regarding datagridview. I'll work through that example and hopefully i'll come right. But i should. Thanks a million. Hi, LuckyL It is possible. You can add the a TableCell to the every DataRow in the GridView. Likewise, you can do it in the Datagrid as well. The following code show you how it works: protected void GridView1_RowDataB ...Show All

  • Starck drawing lines between controls

    Hi, My problem is,I am placing a usercontrol and on that again I am placing a another small usercontrol on the design surface this is A likewise there is another usercontrol of the sametype placed one above the other let it be B, now my requirement is I have to draw a line connecting the inner usercontrol of A with the inner usercontrol of B . Since there is no line control in C#.net if I use drawline() I am not able to connect these 2 usercontrols. Can anybody tell me a solution for it . Nithya Priya, In between the two controls,place a label of very small thickness and extend it to the width of the controls.Give it the background color of your choice.The choice of label is because label isnt focused when the user tabs a ...Show All

  • Gravy Open IE and Navigate from VB.Net

    Can anyone tell me how to open Internet Explorer and navigate to URLs from vb.net When the user clicks a button on my windows form I would like it to navigate to a URL in Internet Explorer. If there is already an IE window open, I would like it to reuse it. Something like this: If (IE is not open) then Open IE End If Navigate to URL Thanks System.Diagnostics.Process.Start("iexplore http://www.yoursite.com")   not quite I believe, unless you get a handle of the window then do some Win32 call like SendMessage or something. The reason is because you are killing the process, which means it gets rid of it completely.   I guess you could maybe do this, and see if it helps   if myProces ...Show All

  • lucerias Error creating clickonce package with .NET 3.0

    I am having a problem publishing a clickonce package with the .NET 3.0 runtime as a prerequisite. I have installed the September CTP of ORCA's extensions for VS 2005, the associated Windows SDK and the associated .NET runtime. Since the live version of .NET 3.0 has been released I uninstalled and reinstalled .NET 3.0 (but this didn't change the file used in the prerequisite dialog box for clickonce). I have no problem publishing a clickonce with .NET 2.0 as a prerequisite, however, when I try and add .NET 3.0 the project will not publish and I get errors indicating that the .NET 3.0 runtime does not have a public key or hash, and no home site attribute has been provided for the .NET Framework 3.0 package. I assume I just need to locate an ...Show All

  • AmineYA SendKeys.Send("+{F9}") problem

    Hello All I have a small problem with Sendkeys My first function sends the send keys (Shift + F9) to keydown event. My problem is how to capture this Shift + F9 conditionly Private Sub cbZoom_Click( ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cbZoom.Click Try Me .dgvDocuments.Focus() System.Windows.Forms.SendKeys.Send( "+{F9}" ) ' Shift + F9 Catch Err As Exception System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.Default End Try End Sub Private Sub dgvDocuments_KeyDown( ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles dgvDocuments.KeyDown If (e.KeyCode ...Show All

  • anisk Can't Modify body of an mail Item.

    I am trying modify an outlook mail item. I want to add an image to the existing mail item. So i try to read the body of the mail item and then find a place to insert it. code goes like this: Microsoft.Office.Interop.Outlook._Application olApp = new Microsoft.Office.Interop.Outlook.ApplicationClass(); Microsoft.Office.Interop.Outlook._NameSpace olNs = olApp.GetNamespace("MAPI"); Microsoft.Office.Interop.Outlook.MAPIFolder oContacts = olNs.GetDefaultFolder(Microsoft.Office.Interop.Outlook.OlDefaultFolders.olFolderContacts); Microsoft.Office.Interop.Outlook.MailItem oContact = (Microsoft.Office.Interop.Outlook.MailItem)olApp.CreateItemFromTemplate(@"C:\Projects\Resource\Westpac Alert.oft", oContacts); Microsoft.Office.Inte ...Show All

  • Bill Reiss Datagrid navigation

    Hi all, I have a datagrid in my aplication form that I fill in the fly by C# code. Basically, the datasource is an ArrayList. What I want to do is enable the user to not only edit the data in the grid (which is easy), but also change the order of the lines. The best solution will be to add 2 Up and Down arrow on the form to allow the user to do it. That will be the most friendly solution. Does anybody know how I can achieve this with C# Thanks in advance, Bertrand Thanks Bob, I already found this. So everything works as required. If anybody wants to see the code, just email me. Thanks, Bertrand Hi Bertrand: we can use : this .dataGridView1.CurrentCell.RowIndex this .dataGri ...Show All

  • Vasanths R MDI: getting form handle affects child focus

    Hello: I have a MDI and multiple child forms. The only way to bring a child in focus and to the front of the other forms is by clicking on the titlebar. I have discoverd that this occurs only when I set a property on the form to the form's handle in the new() sub. It does not happen if I do this in the load event Why does this happen. here is the code for the child Public Sub New ( ByVal pParentID As Int64, ByVal pAppRule As Int32) ' InitializeComponent() ' Add any initialization after the InitializeComponent() call. FormID = Me .Handle ParentID = pParentID ApplicationRule = pAppRule End Sub Thanks for any help on this. smhaig Creating ...Show All

505152535455565758596061626364656667

©2008 Software Development Network

powered by phorum