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
  • How to find/copy image stored into ImageList controls

    design tutorial question
    3
    0 Votes
    3 Posts
    0 Views
    S
    Dear Goutam , I have tried this ImageList1.Images(i).Save("C:\Test.jpg") Each time file is storing in a given path but when I am trying to open the image then image is not showing. image size is 1 KB. Thanks.
  • Pass value from One form to another

    9
    0 Votes
    9 Posts
    0 Views
    N
    <Thank you for the advice, i always appriciate good advice, you are right there are and its true also time is the only teacher, and most of all with an open mind is true and will to strugle in life and always give your thoughts a possitive direction, if one do that ones mind will always be open. >
  • close form from its usercontrol

    question csharp winforms com
    9
    0 Votes
    9 Posts
    2 Views
    E
    Yeah, Luc Pattyn's reply[^] reminded me of it. Of course a direct reference to the Form is better, that's what I said in my reply, I just forgot that the reference is already there as the TopLevelControl property provided by the framework. Eslam Afifi
  • 0 Votes
    5 Posts
    0 Views
    J
    use a dynamic List<> or an ArrayList or any of the other nice things build into the .Net Framework (can be found under the System.Collections and System.Collections.Generic namespaces) And then start thinking in .Net! Buy a book, learn the basics. Don't get confused by the "C-style syntax" of C# - this IS NOT C in any way!
  • how to make window form control scale with the form

    csharp visual-studio tutorial
    4
    0 Votes
    4 Posts
    0 Views
    J
    Ok, others said what you have to do (doking, manual resizing of the fonts and graphics, etc.) What comes to my mind, when I hear such a requirement is: Is this really what you should do? How many applications have you seen behaving like that (no dynamic layout but real resizing of a static layout)? And if this is real necessary (because you are writing an app for visually impaired, or whatever) you are maybe using the wrong platform. (e.g Scaling is very simple to do with WPF/Silverlight)
  • 0 Votes
    5 Posts
    0 Views
    M
    Luc Pattyn wrote: smells like static abuse Yeah, yeah, where are my global variables, I'll revert to variant shortly. Did the job properly, declared a class, passed the class from the main form to the processing form, used a BGW thread to do the work and everything hangs together nicely. I don't use a lot of threading, I live behind the firewall and don't use a WAN, so latency is rarely an issue. This is slowly changing and the move to Silverlight is going to be interesting! Never underestimate the power of human stupidity RAH
  • 0 Votes
    4 Posts
    0 Views
    K
    Hi members. This is the preview, for what i was trying to achieve the effect. Thanks for your attention. Greets Balkoth
  • Minimize window to gain memory space???

    performance help tutorial question
    11
    0 Votes
    11 Posts
    0 Views
    D
    Heinz_ wrote: So, i think .NET is not the issue here. Actually, .NET increases this little "problem". Your app may be very small and not use any data at all and still take up 20MB of memory when started. When you minimize/restore the window, the memory "usage" may drop to 500K, or whatever... A guide to posting questions on CodeProject[^] Dave Kreskowiak
  • Change .exe icon

    csharp question asp-net winforms
    3
    0 Votes
    3 Posts
    0 Views
    I
    If compiling from command line ( csc ) use the switch /win32icon. If developing in Visual Studio, go to Project, Properties, the in the Application Tab where is says Icon.
  • MDI form with child and child-child forms

    help csharp winforms com question
    4
    0 Votes
    4 Posts
    0 Views
    R
    Great answer Dave. :thumbsup: The mind is like a parachute. It doesn’t work unless it’s open.
  • can window form manipulate keyboard and mouse movement?

    csharp question
    2
    0 Votes
    2 Posts
    0 Views
    L
    yes it is possible. AFAIK you need P/Invoke for mouse automation, see functions SendInput and SetCursorPos in user32.dll; for keyboard automation the .NET System.Windows.Forms.SendKeys class could be sufficient. For all of them, you must make sure you are talking to the right window, which needs to have focus; so you will probably need even more P/Invoke and use functions GetForegroundWindow, SetForegroundWindow, GetWindowText, and maybe more. Warnings: 1. you probably need to include some delays, say Thread.Sleep(100), so the target application can react to your automation inputs (which otherwise would come much faster than a human user would provide them); 2. whatever you do it will not be absolutely safe. For one, there could still be a user typing/mousing around; second, target apps may suddenly throw unexpected stuff at you, maybe a dialog telling you the disk got full, the network connection was lost, etc. :) Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.
  • Managing tabs in a multiline tab control

    question
    2
    0 Votes
    2 Posts
    0 Views
    L
    ruanr wrote: Is that at all possible? Yup. Did you run into a non-working insert method? If yes, then there's a workaround[^]. IntPtr h = tabControl.Handle; tabControl.TabPages.Insert(0, "test"); Alternatively, you could move pages around as shown below :) var tabControl = new TabControl(); tabControl.Parent = this; tabControl.Dock = DockStyle.Fill; tabControl.Multiline = true; Controls.Add(tabControl); // Create some tabs tabControl.TabPages.Add("bla"); tabControl.TabPages.Add("bla2"); tabControl.TabPages.Add("bla3"); // Swap tab 0 & 1 var temp = tabControl.TabPages[1]; tabControl.TabPages[1] = tabControl.TabPages[0]; tabControl.TabPages[0] = temp; I are Troll :suss:
  • DataGridView Custom Cells/Columns problems

    csharp css visual-studio testing
    3
    0 Votes
    3 Posts
    0 Views
    K
    I'm sorry that you feel the need to reply to messages without reading them. As I said, I've had a lot of unsuccessful testing with various methods of accomplishing dynamic visibility of cells. Your suggestion is just one of a half dozen that I already desperately tried. It does NOT work. It hides an entire column. I really need an answer to my current situation for which I believe I have provided an entire independent functioning example. :zzz:
  • 0 Votes
    4 Posts
    0 Views
    S
    Hi, Try installing "ASimpleProjectSetup" This utility helps Windows display the apps developed in .NET. You can download it from Microsoft website. If case you cannot find any link for this, search for the .NET framework setup and you will see a link for "ASimpleProjectSetup" at the bottom of the page. Please tell me whether this solution works or not.
  • 0 Votes
    2 Posts
    0 Views
    R
    o0romeo0o wrote: I need help with my report Who is the creator of the report object? This sounds more like a question for them. The mind is like a parachute. It doesn’t work unless it’s open.
  • Save DataGridView To Database

    database question
    3
    0 Votes
    3 Posts
    0 Views
    L
    By little googling[^], see what I found. HTH Jinal Desai - LIVE Experience is mother of sage....
  • Dataset and Crystal Reports

    question
    3
    0 Votes
    3 Posts
    1 Views
    N
    you are right but what i want to do here is: 1) Not to use the dataset control in which i create tables for each report. if i create a datatable it is not accepting to through values in the crystalreport datasource. However all the columns are the same on both sides.
  • Control Binding of a bool isn't updating

    question wpf wcf help tutorial
    3
    0 Votes
    3 Posts
    0 Views
    D
    You'll need to implement the OnBoolValueChanged event or OnPropertyChanged after the boolValue = value assignment. http://krisvandermotten.wordpress.com/2006/10/19/properties-with-property-changed-event/[^] http://social.msdn.microsoft.com/forums/en-US/csharpgeneral/thread/1e742062-bf41-48cf-bd2f-54bdc9c5b78d[^] Personally I prefer the OnXXXChanged because I'd rather not write a gigantic switch in the OnPropertyChanged handler.
  • Legal Billing Software

    html com
    4
    0 Votes
    4 Posts
    0 Views
    A
    You are not even on the right website(forget the forum). The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
  • T9 predictive text in Windows Forms

    winforms hardware question workspace
    5
    0 Votes
    5 Posts
    1 Views
    L
    G-Tek wrote: Has anyone seen or worked with anything like this in the past? Not T9, but been playing with something similar. Kinda started with a Wiktionary-download, gives you a decent dictionary. Once that was in place, started fetching websites to do a statistical analysis. Read a few sites in a loop (of the correct target-audience) and mark how often a word follows the previous word. Thus resulted in a crash of my machine :) Filtered out all noise-words for the analysis, as there's a lot of words that might follow the word "this". The remark on the target-audience would be important because "this" often has a different meaning on the CodeProject-site than in normal conversation. ..and that's when I stopped playing with it, my harddisk isn't that large. You wouldn't need the complete resultset to give decent options as a prediction; only the top 5000 or so. Still, sounds like a lot of work, and the method that I described here is probably one of the less efficient ways to do it. I are Troll :suss: