winforms

How do I tell the designer that my custom winforms control has a fixed height?

I've made a custom control and overridden SetBoundsCore such that the height of the control is fixed. I'd like the designer to show the same sort of resize boxes as the NumericUpDown has - just one at each end - so that it's clear that the control has a fixed height. How do I tell the designer that my control has a fixed height? ...

ListView onScroll event

Hi, I’m programming one easy C# application, and i need onScroll event on Listview. So i created class ListviewEx witch inherits original ListView. I found how to detect scroll message from WinAPI and i modified WndProc method. Now i have this WndProc: protected override void WndProc(ref Message m) { base.WndProc(ref m); i...

How to remove an MDIChild from its parent?

The main goal is to make an MDIChild form, FULLSCREEN. I just want to make my form, free of its Parent and change WindowState and BorderStyle of it for a fullscreen view. Is there any way to do this? ...

How know when a winform is loaded by Process.Start?

I'm in a WindowsForm (c# .net 3.5) and on click of a button launch another external application (also .net 3.5) using Process.Start() and understand when it is available after i have launched it. ProcessStartInfo psInfo = new ProcessStartInfo(@"MyApplication.exe"); psInfo.RedirectStandardOutput = true; psInfo.RedirectStandardError =...

How to add help to windows forms

I have a fairly simple Windows Forms application that I would like to add 'Help' to. What I had in mind was a simple one page html page that describes some details about the application. I think I would have to add some sort of browser to the application to display the html page. Am I missing other options? Looking for suggestions. ...

How do I refer to a windows form control by name (C# / VB)

Suppose I have a label control on a windows form called "UserName". How can I refer to that label programmatically using the label name? For example I can do: For each ctrl as Control in TabPage.Controls If ctrl.Name = "UserName" Then ' Do something End If Next This seems quite inefficient. I would like to do something like: TabPage...

Simple non-fancy Windows application - should I start with WPF or WinForms?

Hello, I'm about to start developing a small Windows application using Microsoft Visual C# 2008 (Express edition). I'm very new to C# and .NET, so this is a newbie question. Should I start with WPF or should I stick with the old WinForms? My application has several screens, all having several text-boxes, check-boxes, combo-boxes, not ...

How to pass a parameter to a WinForm Application?

Hello everybody; I have the next question. I have an application lets call it A and a B application, both C# FWK 2.0 and WINFORMS. In application A I want to open application B passing a parameter to it, but as you know... I cant change the static void main() { } Any suggestions???? Best Regards!!! ...

Winform form closed event

I have 2 forms, Main and Child. When a button is clicked on the Main form, the Child form is loaded. Can I catch from the Main form, when the Child form is closed by subscribing to the closed event of the child form? ...

color chooser (color palette) showing all colors

i would like to have an image like this one on my form. http://www.asptemplate.net/colorpalettegenerator/screenshot1.jpg depending on where the user clicks, i would like the background of the form to turn this color ...

Get total height of a windows form including non-client area?

How to get the total height of a windows form including non-client area? Size does not seem to work for my window (FormBorderStyle = FixedToolWindow, if that helps). ...

.NET application for blackberry?

i have a very simple winform application in vb.net and i was wondering how do i make it work on blackberry and other PDAs? ...

Can't see the designer view in Visual Studio 2008 C# Windows Forms due to weird error.

Hi, when I try to click on the designer tab to get the designer view, I get this error: To prevent possible data loss before loading the designer, the following errors must be resolved: The designer could not be shown for this file because none of the classes within it can be designed. The designer inspected the follo...

Access the Item bound to a DataGridView Row (WinForms)

How would I access the bound item for a specific row for a DataGridView bound to a Custom Collection? ...

Should I continue learning C# with Windows Forms or WPF Applications?

I am starting to learn c# and wanted to create an actual app which one of the two would you start with? ...

Winforms UserControl is not using the inheritance tree I have created. What am I doing wrong.

Hello, I am working on a wizard form framework that will allow me easily create wizard forms. I have a WizardForm form that has a panel on it. My plan is to dynamically load UserControls into this panel on the form. Each UserControl that is loaded onto the form panel must implement certain properties (allowNavigateNext, AllowNAvigat...

Is there a key to suppress anchors in the VS Windows Forms designer?

I have anchors set for numerous control on a Windows form, and now I want to resize the form in the designer without anchors being applied. Is there a key to suppress anchors in the designer temporarily? In the Visual DataFlex Studio, for example, we added the ability to hold down the Ctrl key while resizing in the designer for just thi...

How to select text in a TextBox with the caret positioned at the START of the selection?

I'm using a System.Windows.Forms.TextBox. It is possible to select text by using the keyboard in such a way that the caret is positioned at the start of the selection - by holding Shift and moving the caret to the left. I would like to do the same programmatically. For example, suppose I have a text box with the text "Some sample text"...

How good can Winforms make a UI look using free resources only?

I'm a novice programmer writing my first program (it's in C#), and having to learn as I go. I'd love to have a WPF gui but that might be biting off more than I can chew right now, so I'm looking for examples of good, fresh looking, attractive, UIs done in WinForms that are free. Thanks. Edit: I'm not sure I was totally precise about ...

C# checkedListBox and EventArgs

What am i doing wrong here? be gentle. for checkedlistbox I can update the items very simply by using private void button3_Click(object sender, EventArgs e) { checkedListBox4.Items.Add("whatever"); _or use an object} works great, but what i want to do is send the checkedlistitem a set of items fr...