winforms

Designer Generated Code in Visual Studio C++/CLI Winforms Project

The Windows Forms Designer in C++/CLI projects generates both the declarations and definitions of all event handlers in the header file itself. The .cpp it generates is a mere stub which simply includes the generated header and stdafx.h. I feel that I could reduce compile times if I moved the implementation (i.e. definition) of all class...

How do we specify the client area size of a form in design mode?

I am designing a form in c#. I want to specify the "Client-Area" of the form in the designer. The Size property sets the size of the complete form, including the NC area. Is there any way to set the client area size? ...

Errors in the Windows Forms Editor

I'm currently using Microsoft Visual C# Express Edition (with SP1) for a Project. I'm getting some strange errors in the Forms editor when editing one particular form, the message reads: Type 'System.Windows.Forms.Control' in assembly 'System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' is not...

Working examples of winform/WPF apps

I'm a user interface designer. The project I'm working on is a dashboard that will have several interactive and customizable widgets (think Netvibes, etc.). The development group is going to be using either WinForm or WPF to build the dashboard and widgets. I need to understand the capabilities of each technology better and see a sampli...

Passing information back from a UserControl

I am just getting to grips with the concept of a UserControl. I've created a UserControl to group together a number of controls that were being duplicated on individual pages of a TabControl. Some of these controls are text fields that require validation, and when validation is unsuccessful I need to display an error message. However t...

Microsoft Report Viewer Control not displaying report

I have built a simple report and run it successfully in test winform apps but when I try to run the same report in my production winforms application, the report just doesn't show up in the viewer. I look at the ReportViewer control after InitializeComponent and everything looks fine. Are there debugging techniques or gotcha's that mig...

Can I insert nodes into a TreeView during AfterLabelEdit without beginning to edit them?

I have a subclass of System.Windows.Forms.TreeView that's manually "bound" to a set of hierarchical data. I want the user to be able to edit the labels of the tree, and have the changes reflected back to the data. So I set LabelEdit to true and overrode OnAfterLabelEdit to the tune of: protected override void OnAfterLabelEdit(NodeLabe...

Solution Folders and Toolbox Items incompatible?

In Visual Studio 2005, I've recently reorganized a solution with over 30 projects into 5 solution folders. However, since I've done that, all the custom controls and user controls from my assemblies have disappeared from the WinForms Toolbox. Has anyone experienced this? Are there workarounds? Is this fixed in Visual 2008? I've tried to...

Where to place functional code in WinForms app.

I'm new to C# and I am using VS08, I have created a form but where should I be placing my functional code? Right now I have 2 files: program.cs using System; using System.Collections.Generic; using System.Linq; using System.Windows.Forms; namespace WindowsFormsApplication1 { static class Program { /// <summary> ...

Acessing another form object from a form class method

I have this form class public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, System.EventArgs e) { //This is where I'm working } } from inside the button1_Click method how can I access othe...

Any picture Gallery Control for .NET 1.1 in WinForms?

I need a UserControl to display pictures as a Gallery in Winforms. I have my pictures as a Image Collection but no problem to change to fit Control capabilities. It could be nice if it is for .NET 1.1 but since I'm planning to migrate all our code to 2.0 if the control is in that framework it could be useful in the future If it is fre...

what should i avoid doing on background thread in winforms

besides updating GUI controls from background threads, is there any other operations that should avoid being done on background threads in winforms? ...

InvalidOperationException using PFX w/ Windows Forms

I have two exceptions here. Not sure why they occur because I use Form.Invoke to run UI updates on the UI thread. So first, using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Xml; using System.Windows.Forms; namespace Toplr { using Sy...

.NET UserControl's MouseLeave strange behavior

I have a userControl (.NET 1.1 Winforms) that has a clickable picturebox as a button. Since I have lots of those usercontrols visible at the same time, I thought It could be nice if I just display the picture box when the mouse is over the usercontrol and hide it otherwise. To do so, I handle the MouseEnter and MouseLeave events of th...

UI Design Concepts in WinForms

hi In one certain case I want to disable the tabpannel so that the controlls in the tab panel are disabled. I want to disable the tab pannel but still I want ennable the controls in tab pannel.the need is User cannot switch over to the annother tabpannel in a certain senerio. How can I do this requirement?. by dinesh ...

Component Vs Control

In the world of WinForms .Net controls What is the difference between Component and Control? Can a Control contain Components ? Can a Component contain Controls ? ...

How to display a text as bold in a datagrid ?

Hi I am using a datagrid in window application c#.net. I want to display a text as bold dynamically. Using the below code i am getting the error font.bold is only read only. Datagrid.Rows[0].Cells[0].Style.Font.Bold = true; Is there anyother way displaying a text dynamically in a datagrid ? ...

Is there is any standard screen resolution to develop winform application in c#

Hi I have developed a winform application in 1280 X 1024 pixels.....when using the same screen resolution it shown exactly...But i change my screen resolution to 800 X 600 pixels it shows screen with close button out of screen. How to fix this...is there is any restriction to build an application using a particular screen resolution ba...

DataTable.Select Expression using IN and Like.

Greetings, I have two questions regarding a DataTable.Select(): 1) How to escape potential apostrophes or any other characters that would cause an issue. I'm not worried about SQL Injection. 2) How to use IN with Like, and include results that have a null. 1) Unfortunately, I can't seem to find any advice for the first option since...

How do you make a non-modal topmost dialog that is only topmost in regards to the parent form in WinForms?

Thinking about this for an About dialog but I'm sure it's applicable in other places (say a find box) Sorry if this is a dupe, but I couldn't find this or how to articulate the last part about it only being on top of the parent. How do you make a form that is always on top of the parent form, but is non-modal, but doesn't cover up oth...