winforms

Image Resources in WinForms

I want to store images in a .dll file and use them for my winform application. but Im not able to load .dll content System.IO.Stream stream; System.Reflection.Assembly assembly; Image bitmap; assembly = System.Reflection.Assembly.LoadFrom(Application.ExecutablePath); stream = assembly.GetManifestResourceStream("global::te...

How to determine if a Font is a Symbol font (eg Wingdings)

Given a FontFamily is there a way to determine whether the font is a Symbol font? I'm trying to display a list of fonts to the user in a Window Forms application, but I want to remove the fonts that are Symbols only so that they can't choose a font that cannot be used. ...

When i am adding eventHandler on combo in datagridview, its adding eventHandler to all other combo of same datagridview

i am using VS2005 (c#.net desktop application). when i am adding eventHandler to a combo of datagridview, its automatically adding same eventhandler to all other combos of same datagridview.. my code: private void dgvtstestdetail_EditingControlShowing(object sender, DataGridViewEditingControlShowingEventArgs e) { DataGrid...

ASP.Net Create User Control with Strong Password

I need a control that will accept an email address and password/verify with a password strength indicator. Has anyone seen a similar type control? ...

Creating C# form fields with events based off of a text file

I need to generate windows form fields based off of a text file that I am parsing. I also want to automatically generate validation event handlers which all will be basically the same only the form field and the regular expression which is used to validate the field will change. I'm having a difficult time figuring out the quickest and...

ThreadStateException when using QueueUserWorkItem in a Timer

I have a ThreadStateException in my WinForms application. Step to reproduce: Create simple winforms app Add a Timer In click event, do : timer1.Interval = 1000; timer1.Tick += timer1_Tick; timer1.Start(); with void timer1_Tick(object sender, EventArgs e) { ThreadPool.QueueUserWorkItem(delegate { StringCollection pa...

Problem dragging Winforms TreeNode to WPF List

I'm having some problems dragging a WinForms TreeNode to a WPF ListBox. I set the ListBox.AllowDrop = true and subscribe the DragEnter and Drop events. The events are raised when they should but I think the Args are a bit messed up. I'm trying to filter the objects that can be dropped into this specific target. I just started by trying...

Databound Listbox in Wizard loses selections on page change

I downloaded the source code from this tutorial after a failed attempt to make my own Wizard. The control works great and is integrating nicely into my program. I have one minor problem, though. I have a page that has both a databound ListBox and a databound TreeView. When changing to the next or previous page, the TreeView maintains its...

System.Drawing - bad text rendering using DrawString on top of transparent pixels.

When rendering text into a bitmap, I find that text looks very bad when rendered on top of an area with non-opaque alpha. The problem is progressively worse as the underlying pixels become more transparent. If I had to guess I'd say that when underlying pixels are transparent, the text renderer draws any anti-aliased 'gray' pixels as sol...

What is the recommended way to handle different user roles in a C# application?

I'm going to make a small application for a business that will be used locally for scanning, and storing documents in a database located on the local machine or on a machine located in the same LAN. I could create a table called Users with username and password and according to the usertype ID show a form, or another form. But I'm more ...

UI Design, incase of numerous situations

Hi... I'm creating a web form, where in there are around 12-15 Input Fields... You can have a look at the screen and The request is such that depending on the data the user selects in the Gridview and the DropDown list, the appropriate Textboxes and CheckBoxes needs to be displayed. Some times the conditions are very direct, like wh...

Databound Label text displays old data upon save. Re-open record and data is correct?

I have a windows forms application. I have a main form and I have a button on this form to set a "Qualified" date/time stamp. I have a Databound label control that I set the value when the user clicks the button. This date/time stamp is working as far as displaying but when you click the save button it either shows blank or the previous ...

In a Windows Form application, how can I simply scan an image using a plugged in Scanner?

User puts a piece of paper on the scanner. User presses a button on my application. Scanner works its magic and my windows form application gets the image and puts it in a pictureBox. What would be the path of least resistance if I wanted to make something like this? I don't need the user to configure colors and settings, etc. Just si...

VB2008 Resolution-based resizing

Hi, Usually I am a web developer so this is probably a very novice question. I recently made an app in VB2008, but I developed it in a huge reso (1920x1200). The person that will be using it still uses 800x600 reso. Is there any simple way I can resize the entire interface to fit any resolution? I didn't really think about it at all whi...

Control init lag at startup

I get a small lag at the controls I'm using when I start up my app. Can I show the main form after the controls are drawn? ...

Reading email content

Hi, Hope someone may be able to help. What i am looking to do is create a small winform app in c# to read the content of a email from a pop account, and upload key values to a sql automatically. The email format is always the same for each email, eg, First name : Last name : Phone number : etc... Currently the emails are being store...

Aero Glass Buttons Like Windows Media Player?

Hi everybody, I am making making a program and I want to have a Aero Glass set of controls just like Windows Media Player, I found this: http://blogs.msdn.com/b/tims/archive/2006/04/18/578637.aspx but it just draws black. I also found a control that had the media player controls built in right ton the glass but it was no good it didn't w...

Winform datagridview selection is wrong after editing.

I am using a winform datagridview. The datagridviews datasource is a binding source. The gridview is using the CellEndEdit event to update the datasource. The datasource gets updated and the following property is set: public List<Collection> Collections { set { this.SubjectCollectionDOBindingS...

C# getting mouse coordinates from a tab page when selected

I wish to show the mouse coordinates only when i am viewing tabpage7. So far i have: this.tabPage7.MouseMove += new System.Windows.Forms.MouseEventHandler(this.OnMouseMove); protected void OnMouseMove(object sender, MouseEventArgs mouseEv) { Console.WriteLine("happening"); Console.WriteLine(mouseEv.X.ToString...

DataGridView fails SelectedCells property

Hi! in my project I have 3 DataGridView and I need to retrieve the SelectedCells of the grid in 2 grids this works fine, but in one ( and the code is exactly the same of the other 2) the grid.SelectedCells.Count is 1 but If I go in the inspector to view which cell is selected, the result is 0,0... thanks ...