I have some of the values saved in app.config file, I want to create a WinForms application which shows all the AppSettings values in a Form.
In the form user can change the settings values, after making changes the user can press the Save button and on this I want to save all the values back to the app.config file.
Is there any way to...
I have a WinForms app. that when a button is clicked retrieves a bunch of data from database formats it and displays it to the end user.
The operation can take 10 - 30 seconds.
I would like to display a message to the user in a Dialog just saying "Be patient the operation is running" while the operation is running and then close when th...
I'm a little new to GUI things, but I read about Webkit, Presto etc.. all these layout rendering things.
How do they for example draw HTML etc. on my Windows form? Take Opera, I've this window form... all that flash, and images, text. Is that all GDI for example? Or have they created their own API for that? And that API, who does that ta...
The scenario...
I have two forms, F1 and F2.
F1 contains a couple of radio buttons with a single event handler attached to the click event of both.
F1 also contains a MainMenu, one option of which opens F2 using ShowDialog().
F2 contains a MainMenu, one option of which sets the DialogResult of F2 to DialogResult.OK, thus closing the di...
in MSDN I found CloseReason.UserCloseing to know that the user had decided to close the form
but I guess it is the same for both clicking the X button or clicking the close button.
so How can I differentiate between these two in my code?
Thanks all.
...
I'd like to customize the standard user controls look (buttons, dgv, txtboxs ... etc) and the layout of my forms to a state of art modern interface like any decently built application. How can I do that?. What to look for? any articles, books .. etc that might be of help!
...
I'm running into an issue using a DataGridView bound to a iBindingListView implementation (third party dll) attached to a large collection.
There's a certain property in my collection type, named MyDateTime, which is a value class similar to DateTime, but also with some legacy code.
This struct implements iComparable, iComparable<T>, ...
My form has a group box which contains two overlapping rectangles. The form's other controls are two sets of four numeric up down controls to set the rectangles' colors. (nudF1,2,3 and 4 set the rectangle that's in front, and nudB1,2,3 and 4 set the rectangle that's behind.) Everything works fine, except that the rectangles do not disp...
I have seemingly simple problem in Winforms.
I want to implement a collection that can be used as a DataSource for a listbox. I intend to use it for simple strings. Like so:
MyBindingCollection<string> collection = new MyBindingCollection<string>();
listbox.DataSource = collection;
I've read that all I need to implement is IList inte...
Hi,
I am working on a form with datagridview and webbrowser controls. I have three columns as URL, username and password in datagridview. What I want to do is to automate the login for some websites that I use frequently. For that reason I am not sure if this is the right approach but I created the below code. The problem is with the ar...
I use SendCompletedEventHandler of SmtpClient when sending a list of emails.
The SendCompletedEventHandler is only called when have already sent all emails in the list.
I expexted, that SendCompletedEventHandler is called when an email is sent.
Is there something wrong in my code?
public void SendAllNewsletters(List<string> re...
In my current job we are not allowed to use databinding. I’m currently using a code generator (ORM) to generate the data layer objects. In the past I usually generated a data source (from the object) and do a drag and drop to automatically add the controls (with the correct databinding to the WinForm).
Is there is a way to do something ...
I'm trying to get a handle to the foreground window in C#/Net 2.0/WinForms by calling the native GetForegroundWindow WinAPI function, in my app's form's constructor.
When I run the program directly from Windows Explorer or Total Commander, it correctly identifies the Windows Explorer or Total Commander window.
However, if I create a sh...
I'm dabbling in C#,and I'm rather inexperienced with it. I have a button with text and an image on it. When I run the program and press the button, the button gets pushed in, along with the text, but the Image stays static.
Does anyone know a workaround?
*EDIT:
this.btnRename.AllowDrop = true;
this.btnRename.Anchor = ((System...
I am porting a Excel-VBA based app which uses Userforms over to a C# Winforms application.
How do I convert the Height and Width of the VBA-Userform to the same screen dimensions in the C#-Winforms application? Is there a ratio that can use be used?
Currently the VBA-Userform has a dimension of 179.25 W x 245.25 H which is optimized f...
I have an event handler for the TextBox.TextChanged event on a form of mine. In order to support undo, I'd like to figure out exactly what has changed in the TextBox, so that I can undo the change if the user asks for it. (I know the builtin textbox supports undo, but I'd like to have a single undo stack for the whole application)
Is th...
I've been playing around with C# console applications for about a year and I want to move on to creating GUI applications. I have never done any GUI development besides basic Java applications, but I want to continue using C#. Should I start learning Windows Forms or jump straight to WPF? Is there a huge difference? Does WPF build on top...
Using winforms in vs2008. I have a DataGridView and I would like to detect when the vertical scroll bar is visible. What event should I register for?
I am adding the summing the each cell value in the last column of the grid and displaying that value in a textbox at the bottom of the DataGridView.
I would like this textbox to stay lin...
Hey,
I need to call "panel.invalidate" outside my form (WINform) class also I need to change some other controls as well, I read similar question here, and tried what they said, but it didn't work and I wasn't convinced at all.
The answer I read was about exposing a public method like this:
public void EnableButton(bool enable)
{
...
Hello all,
In my listview I show thumbnails of small images in a certain folder. I setup the listview as follows:
var imageList = new ImageList();
foreach (var fileInfo in dir.GetFiles())
{
try
{
var image = Image.FromFile(fileInfo.FullName);
imageList.Images.Add(image);
}
catch
{
Console.Wri...