winforms

What do you use to create and print forms/documents?

I am not looking to print the screen capture of the UI but a regular form like something you might fill out at the dmv. What do you use to create these forms/documents how do you merge the data into them and print/print preview? ...

Why does the last MDI child form that was closed not get garbage collected?

We've had problems with memory leaks in our application. I've managed to replicate one of the problems with the following simple example: Replication setup 1) Create the following helper class which will be used to track object creation/destruction. public class TestObject { public static int Count { get; set; } public TestO...

C# RichTextBox control, making non-URLs hyperlinks?

In a richtextbox I see there's DetectURLs and an event to go along with that... Is there a way to set up a word or series of words to act as a hyperlink even though they are not a hyperlink? My specific use is that I'm writing a ticker program that will scroll information across the bottom of the screen, I would like for some informatio...

Databinding controls, best practices for encapsulation

I've recently been using data binding in c#, and while the way I am doing it is straightforward and works, it does not feel like the best way. For example, I have a manager class, ie UserManager which has the following interface: class UserManager { public IList<User> Users { get; ...} public AddUser(...) public RemoveUser(...) }...

Only display ToolStripMenuItem icons

I have a Windows Forms ToolStripSplitButton which shows only an icon. I have added some ToolStripMenuItems and I have set their DisplayStyle to ToolStripItemDisplayStyle.Image. The drop down display the area for text (but it's blank), and the image to the left of the empty text area. Is there a way to get rid of the text area so it on...

Which property stores the controls a GroupBox contains?

I have a GroupBox control that has a bunch of controls inside, but when I use the .Controls property, it's empty. Is there another property that stores these controls? EDIT: Here is the groupbox code: using System; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; using System.Data; using System.Text...

Windows Form publish to a different application

Hi, I have a Windows Form application. Version 1 of my app has been released for a while and client is using it. Version 1 of the app is connected to the production database. I have been developing on version 2 of the app and I plan to released a beta version for the client. Version 2 of the app will be connected to the test database, s...

Easiest way to synchronize a dialog form with a datagridview row ?

I have a datagridview with a row id from a database. I want to open a dialog form pointing to to the same row. What's the syntax for doing something like Detail.BindingContext = Gridform.BindingContext Since my other question was close http://stackoverflow.com/questions/1527887/how-to-point-to-use-same-datasource-and-currencymanager-f...

Why can't I access the public System.Windows.Forms.BindingSource of a form?

I have a form1 with a binding source created by VS as private System.Windows.Forms.BindingSource bindingSource1 I have changed private to public Sill Intellisence doesn't recognize form1.BindingSource within another form2 Form1 form1 = new Form1(); form1.bindingSource1 = ...; Why ? ...

Load a DataGridView using Linq to SQL

How can I use Linq-To-SQL to load a DataGridView? Would the following work? DCDataContext db = new DCDataContext(); dataGridViewJobs.DataSource = db.jobs.Select(p => p.closeDate <= DateTime.Now); ...

Displaying Progressing Messages in windows

I have a window form containing a richtextbox. Upon button click event, as the process under this button click event takes time, i wanna display progressing messages in richtextbox. Like on every 500 records updates, i wanna display "500 records updated" and then "1000 records updated", and so on. Right now, my messages display only wh...

How to point to use same datasource and currencymanager from a second C# form ?

Possible Duplicates: Easiest way to synchronize a dialog form with a datagridview row ? Why cant I access the public System.Windows.Forms.BindingSource of a form? Possible duplicates: Why can’t I access the public System.Windows.Forms.BindingSource of a form? Easiest way to synchronize a dialog form with a datagridview row...

Tutorials on how to create composite controls in Windows Forms?

Anyone knows any tutorials with this topic? I searched the net but I see mostly asp.net controls, not winforms. ...

Hiding unwanted properties in custom controls

Is this the way to hide properties in derived controls? public class NewButton : Button ... [Browsable ( false )] public new ContentAlignment TextAlign { get; set; } Also this hides the property in the Properties window in the designer but how can I also hide the property in code? ...

Is this an abuse of the Settings Feature?

I've been storing collections of user settings in the Properties.Settings.Default object and using the Visual Studio settings designer (right-click on your project, click on Properties and then click on the Settings tab) to set the thing up. Recently, several users have complained that the data this particular setting tracks is missing, ...

Can NumericUpDown control do this?

Hi All, I'm experimenting with the NumericUpDown control and have a question regarding its' flexibility. Basically, what I would like to do is display year ranges like so: 2006-2007; 2007-2008; 2008-2009; 2009-2010 Obviously, I would like the control to cycle through a range similar to this when the buttons are pushed. If this is po...

How to move a form while the mouse is being held down?

I have a Windows form which does not have a border, titlebar, menu, etc.. I want the user to be able to hold the CTRL key down, left-click anywhere on my form, and drag it, and have it move. Any idea how to do this? I tried this, but it flickers, a lot: private void HiddenForm_MouseMove(object sender, System.Windows.Forms.MouseEvent...

Setting Colour on the Editor part of UltraCalendarCombo

Hi, Does anyone know how to colour the editor part (where you can type in the date) for the UltraCalendarCombo (winforms one) programmatically (i.e. without using the Style Library files)? I want to set the background to a different colour whenever the control has focus but can't find any properties or methods to do this. Thanks ...

Is the any free library that implements message queuing similar to MSMQ (Microsoft Message Queuing)?

I am interested in using a free library that has features similar to MSMQ to send/receive messages among 3 app domains in a win form application. I only need the private queue functionality (No public queues or AD support) Please provide links and some advantages/disadvantages . I am happy to open sub questions if you think you need more...

What's the difference?

Possible Duplicate: String vs string in C# What's the difference between string and String, if any? They both seem to perform the same funtion, but the casing is different. So, there are only TWO things that are different (that I know of) and they are: When spelled with a capital letter, the color of its text is Blue in VStudi...