I was thinking of centralizing this functionality by having a single method that gets passed an AppState argument and it deals with changing the properties of all GUI elements based on this argument. Every time the app changes its state (ready, busy, downloading so partially busy, etc), this function is called with the appropriate state ...
I have created a mutli-column combobox in VB.net 2008 using windows forms 2.0. I am having trouble accessing data once selected to use in the remainder of the form. There does not seem to be a selected event to use in conjunction with the winform 2.0 combobox.
Does anyone have any experience using winforms 2.0? Also I guess a better que...
I am from a c# background and am converting a vb.net windows forms app to c#.
I have a windows form called associateForm.
In code the developer references associate form like so:-
Private Sub NotifyIcon1_MouseClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles EMS.MouseDoubleClick
If e.Button...
In ASP.Net when you're using Master Pages, you can provide the page a "MasterPage Type" pre-processor command along these lines:
<%@ MasterType VirtualPath="~/MasterPage.master" %>
This is used to provide you access to methods and properties that are defined in the Master page's codebehind. By default, when you use:
Page.MasterPage
...
When answering another question I started to wonder how I could Add new properties to all controls in a form just like the ToolTip-control does.
For example I could use that to Add a "IsDirty"-flag to all textboxes just by adding the component to the form and it would handle this for every textbox.
When adding the tooltip-control to th...
I am binding a List to a DataGridView. One property of the SomeObject class will be a status code (ex. Red, Yellow, Green). Can I "bind" the status to the background color of a cell easily? How about binding to a tooltip also?
...
I have thread exception handler which saves the exception stack trace and should close the application. I call Applicatoin.Exit, but that only closes the window, living the app running windowless.
I know, that this usually happens because some background threads are still running. I attached windbg to the windowless process and there s...
Is there a way to make a DataGridView have no cell selected? I notice even when it loses focus() it has a at least one active cell. Is there another mode that allows this? or some other trick?
...
Hello again,
A few hours ago I found that it's really easy to display *.rtf document using standart .net 2.0 winforms control (RichTextBox). It's really cool that it can display even pictures, but for me there's one missing feature - hyperlinking.
I prepared *.rtf document with a few hyperlinks to paragraphs inside document. Then I put t...
I have a very complicated .NET application that contains cut/copy/paste functionality. I want to enable/disable cut/copy/paste buttons depending on the selected control/content. The app has many user controls. What is the best way to achieve this?
Thanks
...
Are declaring custom .NET event such as this, more common in a winform app than webform?
...
I have .NET app with a floating point value that I want to adjust up and down by a user adjustable increment with something like a spinner control. Before I go off and build my own, does something like this already exist?
...
I have a binary field in my database that is hard to describe in a UI using a single "Is XXXX?"-type checkbox. I'd rather use a pair of radio buttons (e.g. "Do it the Foo way" and "Do it the Bar way"), but right now all the other fields on my form are data-bound to a business object. I'd like to data-bind the pair of radio buttons to t...
I need to be able to determine when ContainsFocus changes on a Control (specifically a windows form). Overriding OnGotFocus is not the answer. When I bring the form to the foreground, ContainsFocus is true and Focused is false. So is there an OnGotFocus equivalent for ContainsFocus? Or any other way?
...
I have a (varchar) field Foo which can only be specified if (bit) Bar is not true. I would like the textbox in which Foo is displayed to be disabled when Bar is true -- essentially, FooBox.Enabled = !isBar. I'm trying to do something like
FooBox.DataBindings.Add(new Binding("Enabled", source, "!isBar"));
but of course the bang in th...
I have a control that is created like so:
public partial class MYControl : MyControlBase
{
public string InnerText {
get { return textBox1.Text; }
set { textBox1.Text = value; }
}
public MYControl()
{
InitializeComponent();
}
}
partial class MYControl
{
/// <summary>
/// Required de...
I've encountered an issue with the ordering of docked UserControls. I have 2 that are docked to "Top", and the order that they appear is the opposite of what I wanted.
What I've tried:
I tried reversing the order in the .Designer.cs to make it work, and while that worked in the UI Designer, it reverted while running!
I've also ...
i have played around with dynamic data website. is there something similar for winforms.
if there isn't anything out there for doing the same with winforms than the question would be why not? we have a massive ERP application that we want to migrate from AS400 to .Net
Winform application. my initial thoughts were to have all the maintena...
I have recently started learning F#, and this is the first time I've ever used WinForms. Here is my code.
#light
open System
open System.Windows.Forms
let form =
let temp = new Form()
let ms = new MenuStrip()
let file = new ToolStripDropDownButton("File")
ignore(ms.Items.Add(file))
ignore(file.DropDownItems.Add("Test...