winforms

Best .NET graphics library for 3D sphere drawing?

I am going to be making an application that lets users input several parameters for a bowling ball layout, and then show what that layout would look like on the ball. I have found some good resources for sphere math, so if I have a sphere whose center is (0,0,0), I will be able to get the values of the points I need on the surface of th...

Copying entities between multiple databases with NHibernate

I have a desktop (winforms) application that uses a Firebird database as a data store (in embedded mode) and I use NHibernate for ORM. One of the functions we need to support is to be able to import / export groups of data to/from an external file. Currently, this external file is also a database with the same schema as the main databa...

.net windows forms & picking Vista fonts

I'm building a .net application with windows forms. I'm pondering on the following problem: If I specify fonts in my application that are available only in Vista and Office 07, what will happen when the application tries to run in a machine without these ? I suppose the system won't be able to fall back to a font of it's family, since t...

WinForms: what is the best control for GDI+ drawing surface?

I think you can do GDI+ drawing in just about any window in a .net windows forms project, but what do you recommend as the best built-in control for containing custom drawing? I'm going to be drawing my own x-y plots, text and images. I could use a Panel, UserControl, etc. ...

Best way to deal with users double-clicking buttons in a winforms app?

I'm working on a WinForms app and I have a user control in it. The buttons in the user control raise events up to the form to be handled by other code. One of the buttons starts some processses that will cause problems if they run simultaneously. I have logic in the code to manage the state so typically a user can't run the process if...

How do I make a Windows Forms control readonly ?

Returning to WinForms in VS2008 after a long time.. Tinkering with a OOD problem in VS2008 Express Edition. I need some controls to be "display only" widgets. The user should not be able to change the value of these controls... the widgets are updated by a periodic update tick event. I vaguely remember there being a ReadOnly property th...

How do I highlight a selection made programmatically in a Winforms TextBox

I've not gone into much research here, but the intuitive thing is not working: private void SerachButton1_Click(object sender, EventArgs e) { String serchTerm = searchTerm1.Text; String text = usualTextBox.Text; Int32 index = text.IndexOf(serchTerm); if (index >= 0) { usualTextBox.Select(index, serchTerm.Length);...

Using system.windows.forms with XNA

Hey guys, I am making a game that uses XNA. I would like to add things to the game such as buttons, textboxes, labels, tooltip texts, and other stuff that comes with system.windows.forms. How do I merge system.windows.forms with XNA? Are there any API's or DLL's that I could implement to get this to work? Thanks, BenShums ...

How to specify a Colour in config

How would I specify a color in app.config and then convert that into an actual System.Drawing.Color object at runtime? ...

WYSIWYG Control for Winform

I am looking for a free WYSIWYG editor control to be used in a Winform application. The applications primary language is VB but using C# is also an option. To clarify I need a rich text editor control that has a formatting bar. I have looked all over the web and the only options I can find are expensive control packages that have more th...

Eliminating Windows forms refresh artifacts

We have a fairly complicated GUI in windows forms using C# and .Net 2.0. My problem is that whenever I drag any window over the GUI, it leaves artifacts over the form. I can't for the life of me figure out how to eliminate it. I've tried enabling double buffering, but it only helps, doesn't eliminate the problem. Other applications don't...

How to bind controls to the DataGridView

I'm new to .NET, so please be patient with me ;) On my Windows Form, I have a DataGridView that is bound to a data source. Since my grid is read-only, I have a set of controls (textbox, checkbox, etc.) outside the grid that will be used to edit the data. I want the controls to be binded to the currently selected row in the grid. Curren...

stopping a function executed on a winform button click

In a simple winform application, I call a function that endlessy create files on a button click event. I add Application.DoEvents() to the loop. I press the red X to close the form. the form closes, but files continue to be created ... I think its on the buttons thread, but shouldnt it be a background one ? trying changing Thread.Cur...

Validation controls for Windows forms?

Are the validation controls available in Visual Studio 2005 for Windows Forms like they are for Web Forms? I don't see them. ...

Updating a Database from DataBound Controls

Hi. I'm currently creating a WinForm in VB.NET bound to an access database. Basically what i have are two forms: one is a search form used to search the database, and the other is a details form. You run a search on the searchForm and it returns a list of Primary Keys and a few other identifying values. You then double click on the entr...

Help with winform treeview isSelected weirdness.

In the NodeMouseClick event I'm trying to load some objects from the Node.Tag. Before I do so I check e.Node.IsSelected. When run regularly IsSelected is false....if I stick a break point around there and check e.node.Isselected, the value changes on me and becomes true. Why? ...

Download file with Resume capability for windows servers

Hi, I am building an Auto Updater for a winforms desktop application. When the update is downloading, how can I provide a Resume download capability in case the customers internet connection breaks? ...

HOWTO: Paint a dotted line in .NET (WinForms)

Hey all, Pen p = new Pen (Color.Black) gives me only solid line pen. I am trying to have a dotted (or dashed) lines, Can't seem to be able to google it up successfully, will much appreciate any help on this one. ...

Override ShortCut Keys on .NET RichTextBox

I'm using a RichTextBox (.NET WinForms 3.5) and would like to override some of the standard ShortCut keys.... For example, I don't want Ctrl+I to make the text italic via the RichText method, but to instead run my own method for processing the text. Any ideas? ...

MDI Parent Menu and Child Menu

I am using VB.Net on Winforms Development developing an MDI application. In my Parent form, I have a menu strip. In my child forms, I also have a menu strip attached to each form, which invokes a different set of command when accessed. Is it possible then that in an MDI form, the child form which is currently active be the menu that w...