winforms

On XP, how do I get the tooltip to appear above a transclucent form?

I have an form with an Opacity less then 1.0. I have a tooltip associated with a label on the form. When I hover the mouse over the label, the tooltip shows up under the form instead of over the form. If I leave the Opacity at its default value of 1.0, the tooltip correctly appears over the form. However, my form is obviously no long...

Is learning WinForms worthwhile? Is it outdated?

I just completed two WinForm applications as part of an intensive course. Just wondering about the technology overall... should I move onto something new, or is WinForms still viable for the future? ...

Growing user control not updating

I am developing in C# and .Net 2.0. I have a user control that draws cells (columnar) depending upon the maximum number of cells. There are some drawing routines that generate the necessary cells. There is a property NumberOfCells that adjust the height of this control; CELLHEIGHT_CONSTANT * NumberOfCells. The OnPaint() method is overr...

Sizing issues while adding a .Net UserControl to a TabPage

I have a complex Windows Forms GUI program that has a lot of automated control generation and manipulation. One thing that I need to be able to do is add a custom UserControl to a newly instatiated TabPage. However, when my code does this I get automatic resizing events that cause the formatting to get ugly. Without detailing all of the ...

Is there a tool that can convert C# 1.1 Forms design to the more recent standard?

The old code, as we know, is dangerous because both GUI layout and business logic are mixed into one. Separating the two can be a tedious and an error-prone task. Is there a tool that can do this for me? Thanks. EDIT: The pretty obvious way of keeping the UI and the logic separate is through introduction of a partial class. I hope that...

Passing data to Winforms UI using BeginInvoke

I am a C# newbie and have a class that needs to pass row information to a grid in the windows form. What is the best way to do it? I have put in some example code for better understanding. public class GUIController { private My_Main myWindow; public GUIController( My_Main window ) { myWindow = window; } ...

Managed form as child of unmanaged HWND

I need to show my System.Windows.Forms.Form as a child window of an unmanaged C++ HWND. This is the C# SDK code that retrieves the NativeWindow: public static NativeWindow MainWindow() { Diagnostics.Process process = Diagnostics.Process.GetCurrentProcess(); if (null == process) return null; IntPtr handle = process.MainWindowHa...

how to get all controls of win form?

i have a win form named A , A contains lots of different controls ,first contains a main groubbox and this groupbox countains lots of table and others group boxes. i want to find a control which has tab index 9(example) in form A but i dont know which groubox contains this control. how i found this control. regards Shailesh ...

The benefits and hassles of moving entirely to a WPF Project

Hi, I have a project that i started as a WinForms application as that was the format i was confortable with at the time. I have since started dabbling in WPF an introduced some WPF UserControls (mainly grids) into my project and absolutely love them. The question i have is, is there any real advantage to me changing the UI Project of my...

How to create column of type password in gridview?

Hi, I am creating an application in which user selects files and provides credentials to open that file. For that i have created three columns in a gridview. User enters password in password column. I want to display '*' in place of characters like we can create a textbox of password type. I have tried this code on 'GridView_CellClick' ...

Add Data to DataRepeater Control in winform

hi. Visual Studio 2008 service pack 1 comes with Visual Basic Powerpack and has DataRepeatr control. i want to know that how I can add data in this control. i have in memory data. the examples i found on net are about binding DataSet to DataRepeater by fetching data from database. i want to bind in memory data. how to do this. ...

Controls moving from one tab page to another.

I am using Visual Studio 2008 and recently a wierd bug has appeared. In my forms I have a tab control with multiple tab pages. I can place a control on a tab page fine, but when I move it by way of clicking it and dragging it to another location, it leaves behind an outline of where it should be. Looking around, it has moved to the fi...

Datatable and Datagridview.

I have datatable table like id name address phoneno 1 abc kfjskl 798798 2 bcd kjdsfl 808909 3 899009 fjsh kjllkjl 5 jfkd And I am displaying this value in the datagridview by code dataGridView1.ColumnCount = Table.Columns.Count; dataGridView1.RowCount = Table.Rows.Count; for (int i = 0; i < dataGridView1.Ro...

Winforms, creating padding when using Dock properties.

How do I add padding, or some space between the textboxes when using dockstyle.top property? for(int i =0; i< 10; i++) { textboxes[i] = new TextBox(); textboxes[i].Dock = DockStyle.Top; mypanel.Controls.Add(textboxes[i]); } The code above puts textboxes right beneath each other. Can't figure this out without using mass pa...

Preventing the "[YourProgramName] has stopped working" dialog on unhandled exceptions.

I have a WinForm application, with some dependencies on an external library that can on occasion cause an exception outside of the running threads context. As it stands now, this is completely OK behavior ( well, except of course the exception ) and we wired up AppDomain.CurrentDomain.UnhandledException to simply restart the program. ...

Using Visual Studio 2010 Express to create a surface I can draw to

I'm coming from a Java background and trying to port a simple version of Conway's Game of Life that I wrote to C# in order to learn the language. In Java, I drew my output by inheriting from JComponent and overriding paint(). My new canvas class then had an instance of the simulation's backend which it could read/manipulate. I was then...

How can I tell if a given hWnd is still valid?

Please forgive my ignorance, I'm completely new when it comes to winforms programming. I'm using a third-party class that spawns an instance of Internet Explorer. This class has a property, hWnd, that returns the hWnd of the process. Later on down the line, I may want to reuse the instance of the application if it still exists, so I ne...

Looking for suggestions about an architecture of a MultiThreaded app.

Hello everyone. I am looking to develop a multithreaded application that will be running in unconditional loop and processing high volume of data. High volume is 2000+ records per minute. Processing will involve data retrieval, calculations and data updates. I need the application to perform so that there is virtually no back log, meani...

ToolStripComboBox -- autosize to items

I have a ToolStrip with a ToolStripComboBox control on it, and I would like it to autosize to fit the widest item in the drop down list. How can I accomplish that? The "Autosize" property is set to "true", but it doesn't seem to be making any difference. I've been banging my head over this for a while. Is it even possible? ...

I want my link labels to link to an image saved on my desktop?!?! Is This possible??

Is it possible to link my labels to and image saved on my desktop??? private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { } ...