I have a windows application that uses an assembly that stores some configuration settings in the default application settings.
The settings can be changed in run time and are persisted thus:
Properties.Settings.Default.SelectedCOMPort = options.SelectedCOMPort;
Properties.Settings.Default.Save();
The settings are saved correctly and...
I've got a Winforms application that I am in the process of translating into Chinese. I've got a numeric text box that validates the input with a regular expression. When the user is entering text with IME, numeric digits don't seem to come in as numeric digits.
On possible work around I have found is to set the ImeMode property of the...
Hi.
I'm creating a regular windows application that will be distributed to several users on my department. I'll need to include some connectivity passwords on the App.config file, and I obviously don't want end-users to just fire up notepad and look at the passwords.
Several articles point on how to encrypt/decrypt configuration sectio...
What is the most accurate way to move a node up and down in a treeview. I got a context menu on each node and the selected node should be moved with all its subnodes.
I'm using C# .Net 3.5 WinForms
...
I have a panel that renders a special header, this works all fine and good - but when I dock other controls inside of that panel, they size to fit underneath the header.
My thought was to try and catch this and control it somewhere. Getting the DisplayArea doesn't work - then the header doesn't draw in the right place. Is there any way...
I am currently using Process.Start to send simple emails from my WinForms app. Can you think of any way to add a file attachment to the email? (Edit: using Process.Start?)
Here's what I use now:
Process.Start("mailto:[email protected]?subject=" + HttpUtility.HtmlAttributeEncode("Application error report") + "&body=" + body);
...
i have generated picturebox dynamically... now i have to displaying Different images on that picture boxes after that when i click the particular picture box it should be displayed in the next form Picture box.... how do i know the particular picturebox got clicked.... and How can I do it... reply me.. Thanks In Advance..
and my coding...
I have a DataGridView bound to a bindingsource which is bound to a List<T>. The user clicks a row that goes to a form with textboxes etc. The textboxes are databound like so:
if (txtID.DataBindings.Count == 0)
txtID.DataBindings.Add("Text", bindingSource, "Title");
I want to be able to detect if the user has modified...
Lets say we have a form consisting of 20+ controls, for example buttons.
We want to create handlers for the On-click event for all of them.
The usual way is to go to the designer and double-click each button to have it automatically create the function.
Another way is to create them yourself in code, after the InitializeComponent() func...
I have a simple program that has backgroundworkers, and it runs with no stop, and no matter when I close it, it will always have some still running (or all of them) and I've noticed that closing the application doesn't completly kill it. After running it some times, there are processes (1 for each run) that remain on the process tab of t...
I have 15 BackgroundWorers that are running all the time, each one of them works for about half a second (making web request) and none of them is ever stopped.
I've noticed that my program takes about 80% of my computer's processing resources and about 15mb of memory (core 2 duo, 4gb ddr2 memory).
It it normal? web requests are not hea...
In Flex there is the ViewStack component. Does C# have a similar control?
If so, which? If not, how do you create similar behavior?
...
Is there an easy way to programatically setting a property value on a control such that it will be persisted in the designer-generated code?
I imagine a piece of code in the control constructor or load event which is executed when i open the control in design mode, but sets a property such that it will be persisted the same way as if I...
Hello,
i have an application where my user changes font and font color for different labels etc and they save it to a file but i need to be able to convert the font of the specified label to a string to be written to file, and then when they open that file my program will convert that string back into a font object. How can this be done...
I've got a winforms application I'm writing that posts files to a web application (not mine). I've got things working just fine as far as posting the files themselves go, my issue is that I'd like to provide some indication of how far along I am with the sending the request.
The code below is my attempt to use BeginGetResponse to that ...
Hopefully I am stating that right. I have a WinForm(3.5) app that has 1 Form that is broke into two regions. 1 is the Navigation and the other, a Panel, is the Content. You select what you want in the Navigation Portion, i.e. Demographics, and then it embeds a UserControl containing all the Demographics controls in the Panel.
What I ...
Here is scenario.
FormA loads.
ClassA is instantiated at the form class scope.
User does something that causes event ClassA.SomeEvent to be handled by method FormA.SomeEventHandler()
User closes FormA
Now what happens when the garbage collector makes its rounds?
Since FormA should be disposed, but a reference to it is made by ClassA.
...
I want to have it such that left clicking on the NotifyIcon also causes the context menu (set with the ContextMenuStrip property) to open as well. How would I achieve this? Do I have to handle Click and figure out the positioning myself? Thanks!
Edit: showing the menu with trayIcon.ContextMenuStrip.Show() results is a few undesirable...
The full .Net framework has an inherited UserControl but this option isn't offered by Visual Studio when creating a new control in a Compact Framework project.
Manually changing the ancestor class of a user control to another user control results in an exception being thrown by the designer when subsequently trying to open it.
Anyone k...
I'm using winforms and I've got a comboBox that represents an IQueryable. Below the combobox is a series of textboxes that I would like to be bound to the currently selected from the combo box.
Here is my code.
public partial class TestForm : Form
{
public DataClassesDataContext DataContext;
public IQueryable<T> datasource;...