Hello,
I have a .NET TextBox with AutoComplete feature on the form. The form has also AcceptButton and CancelButton defined. If I try to commit a suggestion with Enter key or close drop down with Esc, my form closes.
How can I prevent this behavior?
...
I'm using a WinForm configured as a FixedToolWindow. I've set ShowInTaskbar to be False - I'm using a NotifyIcon to manage restoring the window, once it's been minimized.
When I minimize the window, it becomes a bar in the bottom left corner of the primary screen - a window title bar, I'm guessing. I can move it and if I then restore ...
Or is there any better suited 3rd party control for this purpose?
...
Hello,
I formed class template that represent two dimensional array :
template<class T>
class Array2D {
protected:
public:
T *data;
const unsigned rows, cols, size;
Array2D(unsigned r, unsigned c) : rows(r), cols(c), size(r*c) {
data = new T[size];
}
~Array2D() { delete data; }
void...
I want to use in my WinForms application a font used in .net console application.
What font do I need to use?
Lucida Console is not the font that is being used in .NET Console application as I see it. So Lucida Console is not the one I want.
...
I have a MDI form that will open a logon form so the user can be authenticated
when the user hits the logon button and is properly authenticated i wanted to trigger an event that the parent form could pick up and change some variables ((authenticated = true) for example)
I understand how to do this in something like a textbox or a cost...
Windows forms has the handy ControlPaint.DrawImageDisabled to paint a color image in a grayed-out, disabled state. Is there a way to determine, for a given color, what the disabled color would be (as if it were drawn by DrawImageDisabled)?
...
I am using winforms, and I update a text box once in a while (showing messages).
however, when the text reaches the end of the box it produces scrollbars and I don't know how to scroll down to the bottom. The only thing I see is ScrollToCaret, but Caret is at the beginning of the text. What is the command to scroll?
...
I have been working on keeping things object oriented for my project. Currently, I'm using a .DLL which supplies all of the app's classes to the WinForms project acting as the presentation layer.
My .DLL will, for example, return a SortableBindingList(Of T) to code in a form. The SortableBindingList(Of T) comes from here. Let's assume a...
Is there a way for a Windows Forms application to detect if any flags have been added to the command/shortcut used to launch it? Like if I wanted to go "app.exe /flag", can I get the "/flag" somewhere programatically?
...
I have a form. This form has a user control. This user control has a panel and a context menu. The context menu is not attached to the panel. There are other controls that are dynamically created and added to this panel. One of those controls is a button. When you click this button, I set the contextmenustrip property to my context menu....
Hello,
I have a custom user control on my windows forms. This control has a few labels on it.
I will be dynamically displaying an array of these controls on my form which will contain different bits of data.
What I am trying to do is know which user control was selected when I click on it.
This works when I click on an empty space o...
I have a form with a DataGridView showing a list of customers, and some text boxes below showing details of the customer selected in the grid.
I have a Customer class and a CustomerList class of Customer objects, and a BindingSource with DataSource set to a CustomerList. The DataSource of the grid is this BindingSource.
Binding the tex...
In my winforms application i am hashing the connection string in local level.
But here a couple of questions.
After my app decrypts the connection string, the connection string info is sent in clear text? And since my app is installed locally the man in the middle could be ANY user?
How can i protect the connection string, becides th...
How can I prevent the firing of multiple events of the same kind triggered by a single action?
For example, I have a ListView containing some items. When I select or deselect all items, the SelectedIndexChanged event is fired once for each item. Rather, I would like to receive a single event indication the user's action (selection/desel...
The below code is the close routine of an Access App our BA wrote. When executed it is not only closing the Access App but my C# winform app as well, on the same computer. The Access app is named DME Referral and my winform app main process runs in the Task Manager as MATRIX.exe.(Yes I am programming the MATRIX...never allow a group of...
Imagine the code below. Only the first window appears on the top, all of subsequent windows won't nor can they be programatically focused for some reason (they appear in the background). Any idea how to workaround this? BTW, static methods/properties are not allowed nor is any global property.
[STAThread]
static void Main()
{
...
I made a custom text box yesterday with its own validator:
public partial class CustomTextBox : TextBox
{
ErrorProvider errorProvider;
public CustomTextBox()
{
InitializeComponent();
errorProvider = new ErrorProvider();
errorProvider.DataSource = this;
}
protected overri...
So I have a TreeView that starts off empty. Sequence of events is as follows:
Add a new root node. Code makes the label edit box pop up immediately, and I give it a name.
Add a new subnode to that root node.
Add a new root node, after the first one. The label edit box pops up, and I give it a name.
The second root node takes on its n...
Hi,
Firstly I know that there are many question and solutions to correct thread marshalling from threads other than background threads. All the questions and solutions I have found have focused on scenarios where the list or business object itself raises an event that the
Windows form can subscribe to and then correctly marshall the upd...