I developed a window application and setup for that application, when i click the setup it is open and when i clicked for second and third time and so on it is opening again and again.
please help me in this situation thank u.
I developed the application in C# language.it is running perfectly but when i click the setup again it is openi...
I'm looking for a good "Wizard" library for Winforms.
WYSIWYG editor preferrable, but not a must.
...
I don't want to create an object because it won't affect my visible form. How can I call a method so it does its thing in the visible side of things.
public class foo
{
public void SetString(string foo)
{
label1.Text = foo;
}
}
Inside another class:
foo X = new foo();
X.SetString("testlololol");
This will set the la...
Is there any way to Use the Builtin ScrollBars that comes with each .Net ScrollableControl without setting the AutoScroll Property to Enable?
Here is the issue, even If I Enable, set to Visible and declare min and max values as well as the smallChange and LargeChange for the HorizontalScrollBar and VerticalScrollBar they show up in the b...
I have a Windows Form form that I changed the size from the default. The form is localized so I have resx files associated with it. When I run the en-us version of the form, the form size shows just fine with the new size. However, when I run the form using a different language, the size of the form reverts back to the original size. ...
Hi everyone.
I got this problem:
private void loadStringToolStripMenuItem_Click(object sender, EventArgs e)
{
StringLoader frmStringLoader = new StringLoader();
string test = frmStringLoader.Result;
frmStringLoader.ShowDialog();
MessageBox.Show(test.ToString());
}
And the...
We have a couple of DateTimePickers on a custom UserControl, on a Form. They are visible, but not enabled (for display purposes only). When the UserControl is loading, the DateTimePickers are assigned values from a DataRow that came from a DataSet which stores a single record returned from a SQL Server stored procedure.
There is an inco...
I have a basic property that stores an object of type Fruit:
Fruit food;
public Fruit Food
{
get {return this.food;}
set
{
this.food= value;
this.RefreshDataBindings();
}
}
public void RefreshDataBindings()
{
this.textBox.DataBindings.Clear();
this.textBox.DataBindings.Add("Text", this.Food, "Name");
}...
How do I check if an item is selected in a TreeView? In C#
I want to check if anything is selected, not a specific item
...
I have a Form with several special controls on it that is the main window of my application. I would like to capture all key presses while my application is running, at the form level, rather than on the focused control or anything like that. What is the standard way to do this in WinForms?
...
I have a small array of structs, each struct has three fields, all strings. I want to display these structs in a grid, let the user edit the strings a la Excel, and then retrieve the edited strings of course. Which WinForms control is best for this?
Tried a DataGridView but setting the DataSource to the array of structs doesn't seem to ...
I'm populating a ListView with items and add images from an ImageList (in the designer). The images, however, are displayed in very poor quality, even though I've set the image size in the ImageList to their original size (16x16). Have a look:
The original images are beautiful, sharp PNG icons. What can I do?
...
Hello,
So I've got some serious problems with removing a Control from a Form of my application. It's kinda messed up but I can't change anything. I have a form and I have a separated user Control. The control opens an exe file and shows a progress bar while loading it's bytes. And here comes the problem. I do all of it with a BackgroundW...
Hi,
In my multithread server I am using following code (before running Form itself or course)
AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomainUnhandledException);
Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(ApplicationThreadException);
The called methods...
I'm trying to write a simple text editor like DarkRoom with just a RichTextBox (or alternatively a TextBox) in it. My problem is that I can't use the mouse wheel for scrolling unless I have a vertical scrollbar. Is there any way to hide this scrollbar and still be able to scroll with the mouse wheel?
So far I have several ideas how this...
I have a DataGridView set up with the following columns:
Teacher, Subject, Date, Period.
After a lot of Googleing I can see there are a few ways to add data to the grid programmatically, with each one differing to another quite extensively.
I wanted your opinion on how I should go about this, considering I am going to be adding data f...
The winform:
The code:
using System;
using System.Windows.Forms;
namespace DemoApp
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void checkBox1_CheckedChanged(object sender, EventArgs e)
{
groupBox2.Enabled = checkBox1....
Hi,
I engadged a problem with inherited Controls in WinForms, and need some advice on it.
I do use a base class for items in a List (selfmade GUI list made of a panel) and some inherited controls that are for each type of data that could be added to the list.
There was no problem with it, but I know found out, that it would be right, ...
The string length can change, height is the same. The font is large for visibility.
But how do I do this?
I know painting on the control directly. But how do I do this without creating an image file, but all in memory. Because the string image will change with user interaction.
...
What's the reason for this?
I override OnPaintBackground and draw a string. It doesn't show up until I call this in the constructor:
this.SetStyle ( ControlStyles.UserPaint, true );
But then I don't see the items in the listview.
Why and how to solve this?
EDIT: code
protected override void OnPaintBackground ( PaintEventArgs peve...