Disposing a control from by calling its own BeginInvoke() is a good idea or bad idea? Or shall I use the parent control or something like that to accomplish this task?
I'm using Invoke because I'm accessing the control form another thread.
...
Hi how to display seleted item values in multi selected listbox using winforms.
can somebody give me a sample code snippet?
thanks in advance
...
I have a normal textbox in my application. I can paste to it using my mouse but Ctrl+v does nothing.
How do I fix that?
...
I have c# windows form which have several controls on it, part of the controls are located one on another. I want a function that will take for input a control from the form and will return the image that has to be behind the control. for ex: if the form has backgroundimage and contains a button on it - if I'll run this function I'll got...
I am looking for a third party component that could handle spellchecking for Windows forms (.Net 2.0 or .NET 3.5) I have the following requirement:
1) The component should be able to use Open office dictionary (Need to use a Swedish dic I think the OO is the best one)
2) Be able to underline in the UI while typing, like word. (Don’t w...
In other words, if I want to write a winforms db application with an appearince like VS that has docked panels and also the ability to show/hide forms within some of those panels, how would I structure the interface? How would I have the ability to open several disparate forms at different times (with big data grids on them) while avoidi...
Using VS2008, C# and .NET 3.5
I am using databound DataGridView controls to display tabular data read from a web service. In several cases, there is a numeric column that needs to be sorted. I have tried a couple of different ways to get this to work, but the column still ends up sorting alphabetically (ie, 1, 10, 2, 3 instead of 1, 2...
I'm trying to set a Windows Form on secondary monitor, as follows:
private void button1_Click(object sender, EventArgs e)
{
MatrixView n = new MatrixView();
Screen[] screens = Screen.AllScreens;
setFormLocation(n, screens[1]);
n.Show();
}
private void setFormLocation(Form form, Screen scr...
I want to make it so that no matter which control has focus, it will do my event. So that I dont have to write a keydown event for all 137 of my objects. Is this possible?
Thanks
...
Hi there. Ok, I know this has been asked a million times before (and people also start off their StackOverflow question in the very same way XD), but I would like to know how to achieve the following:
The application first launches a login box
If the login is successful, then the splash screen must show (on a separate thread).
While t...
I'm still plagued by background threading in a WinForm UI. Why? Here are some of the issues:
Obviously the most important issue, I can not modify a Control unless I'm executing on the same thread that created it.
As you know, Invoke, BeginInvoke, etc are not available until after a Control is created.
Even after RequiresInvoke return...
i have one texbox in form that user insert persian DateTime
i want convert persian date to Datetime for Save in sql
thanx for answers
...
If a set of controls on a WinForm have had DataBindings created and attached at runtime, should they be removed when the Form is closed? Or will the GarbageCollecter deal with them?
...
I had a wild thought today. I've been discovering that my users like my web UIs more than my WinForms UIs...but there are good reasons to still write a 'smart client' application.
Can I write my application UI in ASP.NET/MVC, host it inside my client exe, and locally access it using the IE control in my winforms app?
Is there a lightwe...
Hi!
I have a form which encapsulates all the functionality, but works with a concrete Type T1.
Now I want to create the same form with the difference, that it will use another Type T2.
T1 and T2 don't inherit from anything, so I can't use inheritance.
How could I do that without copying the whole code again and again?
I was thinking ...
My problem is this:
I have two threads, my UI thread, and a worker thread. My worker thread is running in a seperate class that gets instantiated by the form, which passes itself as an ISynchronizeInvoke to the worker class, which then uses Invoke on that interface to call it's events, which provide status updates to the UI for display....
I would like to take a column header text for tow columns. How would you do this?
Like this
| FULL NAME |
| first | last
I show First & last in one column
...
How can i handle winforms keydown event?
Actually i tried like this
private void test_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Escape)
{
test2 tst2 = new test2();
tst2.Show();
}
}
but it is working only one time. What is the problem?
...
I have a form with a DataGridView that opens a details form on a double click.
When opening the second form I set it to use the same DataSet instance as the parent form. i now want to make sure the second form is pointing at the same DataRow as the parent as well.
At first I just sent in the Position property of the parent form's Binding...
Hi,
I am writing a simple framework for testing WinForm apps, which is running in process. I am using Application.OpenForms to find the control I need to change in the current test step. However, I am sometimes getting errors that the collection was modified (probably by some other thread). How can I lock this collection, to make sure t...