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
  • i need to design a window form application

    database csharp design tutorial
    5
    0 Votes
    5 Posts
    3 Views
    L
    similar question as above. please read thatraja's answer[^] Maulik Dusara Sr. Sofware Engineer
  • Any suggestions about barcode generation?

    html com help tutorial question
    2
    0 Votes
    2 Posts
    4 Views
    L
    Firstly your link is broken, it should read: http://www.keepautomation.com/products/net_barcode_winforms/linear_barcodes.html[^]; did you not use copy and paste? Secondly you need to show a bit more of your code and explain exactly what difference there is between tha size you see and the size you expect. Unrequited desire is character building. OriginalGriff I'm sitting here giving you a standing ovation - Len Goodman
  • VB.NET and Bar code reader

    csharp
    3
    0 Votes
    3 Posts
    2 Views
    B
    Hey! I wanna recommend you a website(http://www.keepautomation.com/guide/vbnet\_barcode\_generator.html) which provides 20+ high quality linear and 2D barcode generator with detailed tutorial. They are easy to be add to various reporting projects.Check this out. Worth a try!Good luck!
  • Do any ad platforms exist for desktop apps?

    csharp winforms sales question
    4
    0 Votes
    4 Posts
    3 Views
    D
    It's a long list. Keep reading. Truthfully, it's rare to see ads in a desktop app. I don't think you're going to find anyone with any experience in it. There may be 8,000,000+ members here, but only a handful of those are regulars here and answer questions. You are most likely doing your own research on this one. A guide to posting questions on CodeProject[^] Dave Kreskowiak
  • [VC++] Getting mouse position

    c++ winforms graphics game-dev data-structures
    2
    0 Votes
    2 Posts
    2 Views
    L
    The MouseEventHandler[^] delegate should provide what you want. Unrequited desire is character building. OriginalGriff I'm sitting here giving you a standing ovation - Len Goodman
  • Listview in Details view - images not visible in selected item

    csharp question
    3
    0 Votes
    3 Posts
    4 Views
    L
    I believe there is a SelectedImage property in the ListViewItem class that will do the trick. Just straight out of head, didn't try though.
  • MouseDown event missed in custom Button class

    graphics help com design question
    2
    0 Votes
    2 Posts
    2 Views
    P
    I tried your code and the mouse down event is being triggered.
  • hi everyone!

    12
    0 Votes
    12 Posts
    4 Views
    P
    This CodeProject article may be helpful to you Fast Colored TextBox for Syntax Highlighting[^]
  • Windows Form , C++/CLI and Android

    c++ android winforms com question
    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • 0 Votes
    5 Posts
    3 Views
    L
    in a GPU things are quite different: it is dealing with streaming data, performing "simple" operations on a sequence of pixels, without much state involved, with tailored memory ports, and highly predictable. More cores means a smaller screen area per core, hence faster. Video processing is inherently a candidate for parallel processing; your average web browser, spreadsheet, whatever, isn't. :) Luc Pattyn [My Articles] Nil Volentibus Arduum Fed up by FireFox memory leaks I switched to Opera and now CP doesn't perform its paste magic, so links will not be offered. Sorry.
  • why does focus always revert to the desktop?

    question tools help
    2
    0 Votes
    2 Posts
    2 Views
    M
    After some more investigation I've found that only legacy apps make the desktop behave this way. For instance if I try this with AutoCAD 2000 or EMACS, both of which I use all the time, my complaint stands. If I try it with say, Notepad and a command prompt they behave OK. So what is at the bottom of this?
  • mdicontainer and child controls overlap

    help
    6
    0 Votes
    6 Posts
    4 Views
    S
    From what I have read Is that the MDI Parent merges certain controls with child forms. The controls that can't be merged are always placed on top of all other controls including forms So if you need to display any controls while using and MDI approach you need to only place them on the child forms except toolbar menus as these will be merged with the forms at runtime. Lobster Thermidor aux crevettes with a Mornay sauce, served in a Provençale manner with shallots and aubergines, garnished with truffle pate, brandy and a fried egg on top and Spam - Monty Python Spam Sketch
  • c# Winforms with classes.

    csharp winforms help tutorial
    6
    0 Votes
    6 Posts
    4 Views
    B
    Picky-picky: the use of identical names, for both Property Type, and Property Name, in the 'internal Property definition above ... uhh ... makes me nervous :) Yes, it will compile, but I think that then becomes ambiguous code that degrades future maintainability. Consider: we define 'MyClass this way: public class MyClass { // default 'ctor public MyClass() {} // 'ctor where PacketSize is passed in as a parameter public MyClass(int pSize) { PacketSize = pSize; } public int PacketSize { get; set; } } Then, in the "main form:" private static MyClass myClassInstance1; public static int PacketSizeInMyClass1 { get { return myClassInstance1.PacketSize; } } AdminForm adminForm = new AdminForm(); private void MainForm_Load(object sender, EventArgs e) { myClassInstance1 = new MyClass(256); adminForm.Show(); } Now, in the instance of 'AdminForm, we can directly access the PacketSize value in the instance of MyClass: int pSize = MainForm.PacketSizeInMyClass1; This is only one variation of many possible approaches to narrowing the scope of what is exposed, and eliminating complex look-ups (as in your example, where you have to re-create the instance of MainForm by de-referencing this.MDIParent every time you want to access the value of PacketSize). And, each scenario's requirements may demand different approaches: if, using the scenario above there is one and only one instance of MyClass ever created: then that class can be made static, and the code simplified futher. In the example here, we've gone to perhaps awkward lengths to leave MyClass a dynamic class that could have more than one instance created (although, obviously, we haven't shown any other instantiation and its use). "It is the mark of an educated mind to be able to entertain a thought without accepting it." Aristotle
  • WaitCursor, again

    com hardware help
    12
    0 Votes
    12 Posts
    3 Views
    M
    Goal: Have the WaitCursor over a disbled control I experimented a little bit on a small C# form app. Add a Panel to the form and make it the size of the Button you want to add. Add the Button to the Panel and set Dock = Fill (Panel obviously becomes the parent of the Button) Disable the Button (Enabled = false) Set Panel's UseWaitCursor = true When the the app runs, the button will be disabled and the WaitCursor will be visible over it. Conclusion: Use a parent panel to control WaitCursor visibility over a disabled control. It's extra work but you can have what your customer wanted. Cheers, Mike Fidler
  • Remove border of group box

    csharp com announcement
    6
    0 Votes
    6 Posts
    2 Views
    M
    You can use css for the same. :) .GroupPanel, .GroupPanel Legend { text-decoration: none; border: 0; }
  • 0 Votes
    1 Posts
    1 Views
    No one has replied
  • Screen scraping C#

    help csharp com tools question
    11
    0 Votes
    11 Posts
    2 Views
    L
    Sorry, but there was nothing special about what I did, just used the DOM tree to get to the elements I needed and pulled the information from it. It's not the HTML that is the issue but how the content is presented within each element, and I'm sure that the problems I faced (now I understand it a bit better) were the same as any screen scraper. There is nothing special or secret about my code and I'd happily share it but I think there are already a number of articles that describe the process perfectly well; go to Luc's home page for a good start, also JSOP. Unrequited desire is character building. OriginalGriff I'm sitting here giving you a standing ovation - Len Goodman
  • Linking two pages using Visual STudio

    question csharp visual-studio
    3
    0 Votes
    3 Posts
    2 Views
    R
    There are two conditions in Windows form application to open Secod Form from First form. Openning the form in Normal mode: --------------------------------- Form2 objForm2=new Form2(); objForm2.Show(); it will open the second form as normal mode. Openning the form in Model mode: --------------------------------- Form2 objForm2=new Form2(); objForm2.ShowDialog(); It will open the second form as model form.
  • 0 Votes
    3 Posts
    3 Views
    N
    But waht about Control fonts...they are shrinks when resolution chnages
  • try to learn

    design help tutorial
    5
    0 Votes
    5 Posts
    3 Views
    B
    If you really want a 'zoom' to any size functionality, you might look at WPF rather than WinForms. Note that it is technically possible to ... when a screen size change occurs ... to calculate a ratio of change, and to recursively visit every control in every container, and alter the sizes and positions of each one ... and even scale-up the fonts, but, believe me, you do not want to go there ! :) Whether you could actually achieve some "magnification" or "miniaturization" effect by using API calls to change the screen resolution on the fly ... who knows, but I think that, too, would be an uglification (some DirectX games for example, go full-screen). Get a good grip on 'Anchor and 'Dock, and the roles of 'Padding and 'Margin, as others have suggested here, and I think you can achieve a solution that will satisfy you. best, Bill "Last year I went fishing with Salvador Dali. He was using a dotted line. He caught every other fish." Steven Wright