Is there an easy method to restore a minimized form to its previous state, either Normal or Maximized? I'm expecting the same functionality as clicking the taskbar (or right-clicking and choosing restore).
So far, I have this, but if the form was previously maximized, it still comes back as a normal window.
if (docView.WindowState == ...
i have a winforms applicatoin that has a lot of implementations of IOrderDataLoader. Other teams are starting to build their own new implementations of IOrderDataLoader. So we switched our app to look in a directories of Dlls and load all classes that implement IOrderDataLoader using reflection. This way other groups can deploy their ...
Is it possible to embed a DOS console in a Windows Form or User Control in C# 2.0?
We have a legacy DOS product that my Windows app has to interact with, and it's been requested that an instance of the legacy product should run within the Windows application.
At the moment, I'm using the user32.dll to locate the window that the DOS pro...
I've been a .NET developer for several years now and this is still one of those things I don't know how to do properly. It's easy to hide a window from the taskbar via a property in both Windows Forms and WPF, but as far as I can tell, this doesn't guarantee (or necessarily even affect) it being hidden from the Alt-Tab dialog. I've seen ...
I'm looking for a book or a good resource about the following subjects :
Best Practices on Windows Forms design (such best way to design GUIs -using anchors-, using default fonts, avoiding changing colours etc.)
Advice about common GUI pitfalls (usability, accessibility, compatibility)
Basically I've got a WinForms application and I...
Ok we have a number of solutions all with a lot of shared binaries:
what we do is the following.
In a shared drive we have this following layout where there is a directory for every binary dependency and a sub directory for every version
BinaryDep1
-----------Volatile
-----------1.0
-----------1.1
-----------1.2
BinaryDep3
--------...
Basically the Title says it all, I need to keep the arrow keys from being able to scroll through my various tabs. Anyone know of a way to do this?
...
In a simple dialog app, using designer, I've set up the usual shortcut keys for cut, copy, paste and delete in the edit menu.
My problem is that I only want to handle delete events when a certain tree control is in focus. Otherwise, in my datagrid control for example, I want delete to work as usual.
What's the best way to do this? Curr...
When a ComboBox is clicked this causes it to be selected in the window. Is there a way to perform the equivalent of a javascript blur()
...
Short version
How do i use an API call when i cannot guarantee that the window
handle will remain valid?
i can guarantee that i'm holding a reference to my form (so the form is not being disposed). That doesn't guarantee that the form's handle will stay valid all that time.
How can a form's window handle become invalid even though ...
I'm writing a touch screen .net winforms application and need a combobox with a larger dropdown arrow. Is there any way to resize the arrow, or am I looking at writing a custom control?
...
I've got this code in a pair of button click event handlers on a C# form:
class frmLogin
{
private const int SHORT_HEIGHT = 120;
private const int LONG_HEIGHT = 220;
private EventHandler ExpandHandler;
private EventHandler ShrinkHandler;
public frmLogin()
{
InitializeComponent();
ExpandHandler =...
Hi,
Imagine I use the .NET graphic classes to draw a rectangle.
How could I then assign an event so that if the user clicks a certain point, or a certain point range, something happens (a click event handler)?
I was reading CLR via C# and the event section, and I thought of this scenario from what I had read.
A code example of this w...
I've got a couple simple Windows Forms apps that I'd like to add crash reporting to. Something that will give me info on what crashes are happening on user's machines (wrt my app, of course), including stack traces, logs, and screenshots, and a UI component for asking the user whether they want to upload it, etc. My apps are free, so I'd...
Why the FontFamily param of the Font object is a string and not an enum?
...
Hello
So, I have a DataGridView using as datasource a BindingList
DataGridView.DataSource = new BindingList<Car>{...}
Where
public class Car
{
public ColorName Color { get; set;}
}
with
public class ColorName
{
public int Id {get; set;}
public string Name{get; set;}
}
and I use a Combobox column:
DataGridViewCom...
I'm looking for a good pattern to resolve the following circular reference in a Windows Form application:
Assembly 1 contains a Windows Form with an Infragistics menu item ".Show"ing a Form in Assembly 2
Assembly 2 contains a Windows Form with an Infragistics menu item ".Show"ing a Form in Assembly 1
The menu has generally the same i...
I am getting a strange error on a remote windows clients (WinForm application using C# 2.0)
Error Message: Access to the path 'c:\ApplicationFolder' is denied.
Stack Trace: at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 right...
so i have a winforms apps that downloads a set of data syncronously on startup. This obviously takes a while but then when any of the services or GUI classes load, they all have this data. I could change this to put on a background thread but then every component that needs access to this data would continuously have to get notified wh...
Duplicate Of : http://stackoverflow.com/questions/2527/c-treeview-context-menus
I've got a context menu on a Treeview, when the user right clicks it supposed to change based on the currently right clicked node's tag object.
Currently I'm updating the context menu in after_select event, however this doesn't work when user right clicks t...