I am using this to download a file and get % info and completed info. I want to know how to get the size of the file being downloaded and the URL remote address and the local address where the file is being saved to.
private void Form1_Load_1(object sender, EventArgs e)
{
label21.Text = "Download in progress...";
...
I have some question about DataGridView.
I can show table in DataGridView, but I don't know that after update data in DataGridView how can I update that fields in table?
how can I delete selected rows in DataGridView and table in SQL Server?
I don't want to let user insert data with using DataGridView.
If I want to let to user to inser...
As an example, here's a simple attribute, derived from ToolboxItemAttribute:
<ToolboxItemX(False)> _
Public Class Class1
Inherits Button
End Class
Public Class ToolboxItemXAttribute
Inherits ToolboxItemAttribute
Public Sub New(ByVal defaultType As Boolean)
MyBase.New(defaultType)
End Sub
End Class
The probl...
I have a problem. I need to hide my window at window load. But
private void Form1_Load(object sender, EventArgs e)
{
this.Visible = false;
}
is not working. And property Visible remains true. Am I missing something?
...
I am using Visual Studio 2010, C# .NET 4.0. I have 3 forms: Form1, Form2, Form3.
In Form1 I have a button to open Form2:
private void button1_Click(object sender, EventArgs e)
{
Form2 f = new Form2();
f.Show();
}
In Form2 I have a private Form3 variable always pointing to the same Form3:
private Form3 f = new Form3();
And ...
I am trying to download a zip file on my server by doing
WebClient.DownloadFileAsync(new Uri(DownloadLink),
Path.GetFileName(DownloadLink));
I have events linked to download completed and progress changed and when the download gets to 99%, it stops. So I give it a minute and then it gives me an exception:
...
Hello.
I am new to Visual Studio 2010 and I am trying to develop a Windows Form. I do not see a Design tab where I can toggle between the form design and the .cs code. How can I do this?
Thanks
...
I have a Listview control "lstStudents" and i have added checkboxes inside the List viewControl.I need to add a Select All check box which results in checking all the checkboxes inside the ListView i use the following code but it doesn't work.
private void chkAll_CheckedChanged(object sender, EventArgs e)
{
foreach (Contro...
I have found this analog clock tutorial here:
http://www.codeproject.com/KB/selection/AnalogClockControl.aspx
Now is it possible to drag and drop the hand hour (how to detect the mouse on the hand hour ?) and show this hand hour moving while dragging it ?
I mean isn't anything included framework in .NET which allow me to detect that t...
I have a parent class that contains an array of objects each with a timer associated with it.
I want the parent class to be able to start and stop these timers, and most importantly want the parent class to detect which of the it's child objects 'timer elapsed' even has been raised.
Is this possible and if so what is the best way to do...
hi
in my C# program i receive date & time like this: DateTime.Now
and i get: 19/09/2010 20:10:30 because my region is: Hebrew (Israel)
but What happens if I'll install my program on computer with region English (united states)
I'll probably get an error because the format is MM/dd/yyyy hh:mm:ss
my question is, How to ensure that i ...
VS2008 project. Created local database (SSCE). Created dataset with tableadapter. Dragged dataset and tableadapter to the form so I can reference it in code.
New records successfully add to the dataset but will not commit back to the database. Gives no error or clue why it won't work.
TableAdapter insert statement was created autom...
Hi folks,
I've got a windows application that creates some threads to parse some txt files. Nothing too crazy.
I'm using StructureMap Dependency Injection to create any instances of my Services and Repositories. So my Winform has a static property which returns the instance, based on what's been registered. Works great .. except I'm n...
Totally stumped by something that seems easy, and has been done to death... Yet still stumped.
What I want to do: I've got a WinForms ListBox. Its items are populated with objects, the DisplayMember is set. As the app runs, the data in the listed items might change, including the field behind the DisplayMember. I want the text disp...
How can "solid" margins be made around System.Windows.Forms.Button control?
var button = new System.Windows.Forms.Button();
button.Dock = DockStyle.Fill;
button.Margin = new Padding(20);
var panel = new System.Windows.Forms.Panel();
panel.Controls.Add(button);
In the example above the button wo...
I'm trying to do like what you can see on the image below:
I'm using Microsoft Visual Studio 2008. In my Form I added a TabControl
and set its Alignment properties to Bottom. But as you can see in the image below, It seems there's something wrong in the display. How can I fix it?
...
Normally when pressing the TAB key you change the focus to the next control in the given tab order. I would like to prevent that and have the TAB key do something else. In my case I'd like to change focus from a combobox to a completely different control. I can't do this by setting the tab order. I need to do this programatically. Any id...
I have a situation like this..I have a windows application (Single threaded) that has one main form. After performing some operation, I'll get a message "Operation completed successfully" But most of the time it goes behind my application and hence it is not visible.
Any idea why this is happening ?
Thanks in Advance
...
I don't want any user to resize my application window.
how can I do that?
...
Hi All,
I'm opening a modal dialog asking the user to fill certain fields.
if(dlgUserDetail.ShowDialog() == DialogResult.OK)
{
}
On click of OK, the control comes to the parent form where I'm validating the user input.
If the validation fails, I wanted to keep the dialog to be open with the old values. Since it is modal dialog, th...