Skip to content

Windows Forms

Desktop and Windows Forms development

This category can be followed from the open social web via the handle windows-forms@forum.codeproject.com

2.1k Topics 7.1k Posts
  • tableLayoutPanel gell cell by mouse hover

    question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Readonly ComboBox - Please give help?

    csharp design help question
    12
    0 Votes
    12 Posts
    0 Views
    V
    that is ok but i want the same style in dropdown not in the dropdownlist thanks for your reply N.K.Veeramani Software Engineer InteriTech SDN. BHD., Malaysia
  • 0 Votes
    4 Posts
    0 Views
    A
    if you want to run it pragmatically then you can use socket programming to do that.
  • how to transfer data from textbox to gridview?

    tutorial question
    6
    0 Votes
    6 Posts
    0 Views
    A
    add a string variable int the form that has the grid view. overload the constructor that take a string argument. You have to initialize the string variable by the given parameter.Then call the constructor from the form that has the texbox as follows: gridviewform f = new gridviewform(texbox1.text); f.Show(); write this code in the formload event of form that has the grid view. int p = dataGridView1.Rows.Add(); dataGridView1.Rows[p].Cells[0].Value = your string variable
  • 0 Votes
    5 Posts
    0 Views
    A
    You can disable the full datagridview as you don't want to make it readonly. dataGridView1.Enabled = false;
  • paging datagridview in vb.net

    csharp
    7
    0 Votes
    7 Posts
    0 Views
    A
    OOps!!! sorryy
  • 0 Votes
    2 Posts
    0 Views
    A
    when you click any hyper link or button it generally navigate to new page or refresh this page. This event can be got by the navigating event of webbrowser control of .net. see example. suppose webBrowser1 is added in a windows application. private void webBrowser1_Navigating(object sender, WebBrowserNavigatingEventArgs e) { MessageBox.Show(e.Url.PathAndQuery.ToString()); }
  • problem with datatable [modified]

    csharp css help question
    5
    0 Votes
    5 Posts
    0 Views
    A
    Try the following. It may help you. Remember that you have to initialize check box values at first. private void Form1_Load(object sender, EventArgs e) { int p = dataGridView1.Rows.Add(); dataGridView1.Rows[p].Cells[0].Value = true.ToString(); dataGridView1.Rows[p].Cells[1].Value = false.ToString(); } Handle the following event of datagridview private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) { if (dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString().Equals(false.ToString())) { dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = true.ToString(); MessageBox.Show("true"); } else { dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = false.ToString(); MessageBox.Show("false"); } } call the method in appropriate if else condition.
  • 0 Votes
    4 Posts
    0 Views
    L
    I don't think this[^] is the complete answer, but it may point you in the right direction.
  • 0 Votes
    3 Posts
    0 Views
    P
    thank you Shameel. I think this is a good solution, but not a perfect one. And i don't think Microsoft Visual Studio team has done this by this means. Seems the popup window can never be activated, by that I mean either the window is of WS_EX_NOACTIVATE style or it responds WM_MOUSEACTIVATE by MA_NOACTIVATE. I made some test code on this using Winform. The popup window was made by a Form window hosting a ListBox window, I overrided the CreateParam to append the WS_EX_NOACTIVATE style for both two windows, I also overrided WndProc to make them respond WM_MOUSEACTIVATE by MA_NOACTIVATE. But all these didn't work:^^( Maybe I have misunderstood WS_EX_NOACTIVATE or WM_MOUSEACTIVATE?
  • custom DataGridView column type and it's properties!

    question design
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • 0 Votes
    2 Posts
    0 Views
    L
    Check your settings[^] :) I are Troll :)
  • Form layout at runtime differs from design

    design question
    9
    0 Votes
    9 Posts
    0 Views
    U
    Ok, I finally found the solution. If I set the buttons and labels 'FlatStyle' property to 'Sytem' in stead of 'Standard', the form shows up correctly in run-time. However, I'm still wondering why there is a difference between setting EnableVisualStyles in code (showing the text different then in the designer) and setting 'Enable XP Visual styles' in the project properties (showing the text the same as in the designer)...
  • Beyound understanding PING problem

    help
    5
    0 Votes
    5 Posts
    0 Views
    L
    Hi, if the PING utility, with all its options, does not satisfy your needs, you may have to create your own; you then could have a look at the System.Net.NetworkInformation.Ping class :) Luc Pattyn I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages Local announcement (Antwerp region): Lange Wapper? 59.24% waren verstandig genoeg om NEEN te stemmen; bye bye viaduct.
  • Report viewer control problem in Windows forms

    csharp winforms help dotnet
    5
    0 Votes
    5 Posts
    0 Views
    E
    Hi, Along the lines of what Henry suggested, is there data in ds.Tables[0].DefaultView (You said there are rows in the dataset, but how about the default view?) Also, looking at what I've done when using the report viewer, I've also set the LocalReport.ReportPath to the path of the .rdlc file, as well as using the ReportEmbeddedResource. I'm not sure it's necessary, but maybe you can try it
  • decrypt the dataset

    database help
    4
    0 Votes
    4 Posts
    0 Views
    D
    No, I'm not giving you any code. You've already got the code that does the job. For some reason, you've either not following what youre passing into the encryption/decryption methods or you're not storing or retrieving the data from the database properly. A guide to posting questions on CodeProject[^] Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic      2006, 2007, 2008 But no longer in 2009...
  • decryption

    database help
    2
    0 Votes
    2 Posts
    0 Views
    D
    Don't post the same question again in the same day. You just posted this less than 4 hours ago. A guide to posting questions on CodeProject[^] Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic      2006, 2007, 2008 But no longer in 2009...
  • paging for datagridview

    4
    0 Votes
    4 Posts
    0 Views
    V
    Well, I downloaded the code from that article, it compiled and yeah it is a Windows Forms Application. You have to go through the complete article to understand how to implement paging in DataGridView. Good Luck!! If you fail to plan, you plan to fail! Books are as useful to a stupid person as a mirror is useful to a blind person. - Chanakya
  • 0 Votes
    2 Posts
    0 Views
    M
    This thread seems to be related: http://www.eggheadcafe.com/software/aspnet/32319410/defaultvalue-attribute-on.aspx
  • DataGrid likes delphi's TDBCTRLGRID

    delphi
    2
    0 Votes
    2 Posts
    0 Views
    B
    Hi i'm searching for the same Control in WPF.