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
  • SQL Connection problem in Windows Service

    help sysadmin database sql-server workspace
    4
    0 Votes
    4 Posts
    2 Views
    P
    You might want to tell the OP this. I already know how to do this. *pre-emptive celebratory nipple tassle jiggle* - Sean Ewington "Mind bleach! Send me mind bleach!" - Nagy Vilmos CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier
  • 0 Votes
    2 Posts
    2 Views
    L
    This is not a valid question, no one is going to provide you with a working project on demand. Go and search the CodeProject articles[^] for sampl tutorials and code. One of these days I'm going to think of a really clever signature.
  • Invoking excel thru a .bat file

    4
    0 Votes
    4 Posts
    5 Views
    L
    Well you certainly need some compiled program. One of these days I'm going to think of a really clever signature.
  • .docx to .pdf conversion

    question
    4
    0 Votes
    4 Posts
    5 Views
    A
    Member 8574327 wrote: Could you please provide me some example?? No, there are a few well documented ones on the Internet. Google is your friend Full-fledged Java/.NET lover, full-fledged PHP hater. Full-fledged Google/Microsoft lover, full-fledged Apple hater. Full-fledged Skype lover, full-fledged YM hater.
  • DataGridView Collapse Top Border

    css question
    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • Infragistics UltraGrid

    help tutorial question
    2
    0 Votes
    2 Posts
    2 Views
    A
    There are two solutions given here[^]. One of them might help you. Windows Phone Apps - XKCD | Calvin | SMBC | Dilbert | Speed Dial
  • about c#

    csharp
    3
    0 Votes
    3 Posts
    3 Views
    L
    Yes. And I want two of them. With mayonnaise. Bastard Programmer from Hell :suss: if you can't read my code, try converting it here[^]
  • EditingPanel Erasing Top Cell Border

    css graphics tutorial question
    2
    0 Votes
    2 Posts
    2 Views
    M
    I guess a few hours of sleep help sometimes...I think that this is the way... Private Sub Grid_CellPainting(sender As Object, e As System.Windows.Forms.DataGridViewCellPaintingEventArgs) Handles Grid.CellPainting Try 'Paint the cell if the edit control is visible If Grid.EditingControl IsNot Nothing Then Dim g As Graphics = Graphics.FromHwnd(Grid.EditingPanel.Handle) g.DrawRectangle(Pens.Red, Grid.EditingPanel.ClientRectangle) g.Dispose() End If Catch ex As Exception Debug.print(ex.Message) End Try End Sub
  • 0 Votes
    4 Posts
    2 Views
    I
    you can use inno setup to create your install programme, this little app can do anything if you write a pascal-like script. just find that if the folder is exist and do the sub prog to do the next work.
  • Windows Form

    csharp tutorial
    7
    0 Votes
    7 Posts
    2 Views
    L
    BillWoodruff wrote: First, I believe that Child Forms should never be used, that they lead to awkward user-interfaces, and the old MDI-architecture ..I'd like to see a version of Visual Studio with an SDI-interface. MDI isn't dead, it's merely abused a lot. We'll say the same thing about that Ribbon on a few years :) BillWoodruff wrote: I think you can get better responses to this scenario if you describe what the function of your proposed use of "Child Forms" are, in relation to their "Parent" Form. Good point; when an apparant beginner talks about child-forms, I usually assume (I know, we should check, not assume) that they need to display a dialog, and that they forgot to specify the owner of the form (often confused with the parent). +5 for giving a very elaborate answer that does not only benefit the TS. Bastard Programmer from Hell :suss: if you can't read my code, try converting it here[^]
  • Windows Forms Application With Collapsible Panel

    winforms help tutorial question
    5
    0 Votes
    5 Posts
    4 Views
    B
    Good point, Ger, Indeed, a given UI of this type (sub-panels in a Panel) is may be designed to allow any number of sub-panels to be expanded, or collapsed,or "accordion style," allow only one sub-panel to be open at-a-time: that may mean you need to deal explicitly with visibility, assuming you have the Panel's 'AutoScroll property set to 'true, and there are sub-panels in the Panel's ControlCollection which are scrolled out of view. I assume you add these controls to your sub-panels at run-time because: either you don't know the number of rows until run-time, or, the end-user may set a parameter that affects number of rows to be rendered into sub-panels on Load, or the user "on-the-fly" changes the number of rows they want rendered into sub-panels (via selection or query or whatever). Personally, I'm a "true believer," in this situation, in creating a UserControl that can be multiply instantiated, that contains all sub-elements: such as the ones you described: image,label, command button, and then keeping a Collection of those back on the "ranch" (some "MainForm") in a form of a Generic Dictionary, which will vary depending on the scenario, but may be like: Dictionary<subPanel, bool>, where the Boolean might indicate if its "open," or "collapsed." ... edit ... Assuming a scrollable outer container Panel: if the user does some selection activity ... outside the container Panel ... that will then determine that sub-panel#x needs to be visible, you may have to adjust the scroll-position in your code, if the targeted sub-panel is currently scrolled out-of-view: this is a reason why I like using a generic collection here: to get away from code like panel2.ScrollControlIntoView(panel2.Controls[0]); ... end edit ... But, that's just another recipe from Mama's Kitchen, and I am not questioning the way you are doing things now: just extending your comment a bit. "Each scenario may require a different UI solution that is optimal" is such a cliche, that I won't even mention it here :) best, Bill "Everything we call real is made of things that cannot be regarded as real." Niels Bohr
  • Windows Form Application Size Issue

    design help tutorial question announcement
    4
    0 Votes
    4 Posts
    3 Views
    B
    I believe Bernard Hiller gave you the correct answer (I voted his answer #5, naturally): move the call to InitializeComponent() to before your Form and Panel adjustment code. An edge-case hypothesis could be: the monitors have different aspect ratios, but I doubt that. best, Bill "Everything we call real is made of things that cannot be regarded as real." Niels Bohr
  • Wrapping of Data Grid View column

    css tutorial question
    2
    0 Votes
    2 Posts
    4 Views
    9
    It doesn't wrap until you move to a new cell and thus complete the edit.
  • open web page with out address bar from win forms

    help
    4
    0 Votes
    4 Posts
    2 Views
    L
    vikaskardode wrote: without using WebBrowser control Awesomium[^] Open Webkit#[^] Mono's WebBrowser[^] Enjoy :thumbsup: Bastard Programmer from Hell :suss: if you can't read my code, try converting it here[^]
  • 0 Votes
    4 Posts
    4 Views
    L
    BillWoodruff wrote: is it really worthwhile to write this up Yes, it is. Not every shop uses WPF, a lot of them still build on the controls that they and their customers are familiar with. I'm still using WinForms as WPF isn't implemented in Linux. Yes, Gtk# might be an alternative, but that would introduce a learning-curve for anyone unfamiliar with Gtk#. Bastard Programmer from Hell :suss: if you can't read my code, try converting it here[^]
  • Ironspeed for winforms application?

    csharp winforms performance question
    7
    0 Votes
    7 Posts
    5 Views
    P
    These messages have been reported as spam. They will be removed. *pre-emptive celebratory nipple tassle jiggle* - Sean Ewington "Mind bleach! Send me mind bleach!" - Nagy Vilmos CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier
  • Display large content in windows application

    tutorial question
    3
    0 Votes
    3 Posts
    3 Views
    L
    Mycroft Holmes wrote: And the answer is just as useless as the question! But gets a 5 for trying. :) speaking as ...
  • 0 Votes
    2 Posts
    2 Views
    P
    If you have a question about something you found in one of the articles, you should ask the question in the forum at the end of that article. It's very, very unlikely that Lee Paul Alexander will happen on the question in a none related forum, whereas he gets an email if you ask on that article. *pre-emptive celebratory nipple tassle jiggle* - Sean Ewington "Mind bleach! Send me mind bleach!" - Nagy Vilmos CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier
  • Error while binding datatable to the superlist control

    help wpf wcf data-structures
    4
    0 Votes
    4 Posts
    2 Views
    D
    I don't have the time to go spelunking through that code and adding/fixing support for binding. If you've got a question, post it in the forum at the bottom of the article. A guide to posting questions on CodeProject[^] Dave Kreskowiak
  • 0 Votes
    2 Posts
    2 Views
    L
    I already did, and you didn't take the effort to respond. Are you expecting a different answer today? Bastard Programmer from Hell :suss: