Click here to Skip to main content
16,016,527 members
Home / Discussions / C#
   

C#

 
QuestionResetting Objects to startup-state Pin
chrisx5116-Jul-09 3:02
chrisx5116-Jul-09 3:02 
AnswerRe: Resetting Objects to startup-state Pin
Luc Pattyn16-Jul-09 3:24
sitebuilderLuc Pattyn16-Jul-09 3:24 
AnswerRe: Resetting Objects to startup-state Pin
dojohansen16-Jul-09 5:30
dojohansen16-Jul-09 5:30 
QuestionHow to Provide Confirmation Link to the New User in C# Pin
ChandrakanthGaddam16-Jul-09 1:35
ChandrakanthGaddam16-Jul-09 1:35 
AnswerRe: How to Provide Confirmation Link to the New User in C# Pin
Pete O'Hanlon16-Jul-09 1:57
mvePete O'Hanlon16-Jul-09 1:57 
Questionupdate progress bar concurrently in windows form Pin
Praveen Raghuvanshi16-Jul-09 1:33
professionalPraveen Raghuvanshi16-Jul-09 1:33 
AnswerRe: update progress bar concurrently in windows form Pin
monstale16-Jul-09 2:11
monstale16-Jul-09 2:11 
AnswerRe: update progress bar concurrently in windows form Pin
MumbleB16-Jul-09 2:19
MumbleB16-Jul-09 2:19 
If I understand you correctly, you need to update a Label with the status of the connection or the status of running a query? Correct?

You can try the following which I use to identify which files I am currently processing in a Thread.

First I declare a delgate for updating the Label.
public delegate void SetLabel(Control lblctrl, string filename);

Then I define the follwing to control the invoke.
private void setFilename(Control lblctrl, string filename)
{
    if (this.WindowState == FormWindowState.Minimized)
        return;
    if (lblctrl.InvokeRequired)
        lblctrl.BeginInvoke(new SetLabel(setFilename),
            new object[] { lblctrl, filename });
    else
        lblctrl.Text = filename;
}

This allows me to call the fucntion from within any running thread. Like below:
foreach (string str2 in Directory.GetFiles(path))
{
    setFilename(this.lblFileName, str2);

Hope this gives you some idea as to what I mean. You can do exactly the same for the progress bar.

Excellence is doing ordinary things extraordinarily well.

QuestionIf statement with ? and : characters Pin
soso_online16-Jul-09 1:00
soso_online16-Jul-09 1:00 
AnswerRe: If statement with ? and : characters Pin
Tamer Oz16-Jul-09 1:13
Tamer Oz16-Jul-09 1:13 
GeneralRe: If statement with ? and : characters Pin
soso_online16-Jul-09 2:09
soso_online16-Jul-09 2:09 
AnswerRe: If statement with ? and : characters Pin
Luc Pattyn16-Jul-09 1:25
sitebuilderLuc Pattyn16-Jul-09 1:25 
GeneralRe: If statement with ? and : characters Pin
soso_online16-Jul-09 2:09
soso_online16-Jul-09 2:09 
AnswerRe: If statement with ? and : characters Pin
Pete O'Hanlon16-Jul-09 1:54
mvePete O'Hanlon16-Jul-09 1:54 
GeneralRe: If statement with ? and : characters Pin
soso_online16-Jul-09 2:08
soso_online16-Jul-09 2:08 
QuestionWindows Form Datagridview Pin
Rajeshwar Code- Developer16-Jul-09 0:58
Rajeshwar Code- Developer16-Jul-09 0:58 
AnswerRe: Windows Form Datagridview Pin
Vimalsoft(Pty) Ltd16-Jul-09 1:14
professionalVimalsoft(Pty) Ltd16-Jul-09 1:14 
GeneralRe: Windows Form Datagridview Pin
Rajeshwar Code- Developer16-Jul-09 1:19
Rajeshwar Code- Developer16-Jul-09 1:19 
GeneralRe: Windows Form Datagridview Pin
Vimalsoft(Pty) Ltd16-Jul-09 1:21
professionalVimalsoft(Pty) Ltd16-Jul-09 1:21 
GeneralRe: Windows Form Datagridview Pin
Rajeshwar Code- Developer16-Jul-09 1:36
Rajeshwar Code- Developer16-Jul-09 1:36 
GeneralRe: Windows Form Datagridview Pin
Vimalsoft(Pty) Ltd16-Jul-09 2:02
professionalVimalsoft(Pty) Ltd16-Jul-09 2:02 
GeneralRe: Windows Form Datagridview Pin
K030616-Jul-09 1:24
K030616-Jul-09 1:24 
QuestionHorizontal scroll bar on the UserControl Panel not working... Pin
spalanivel16-Jul-09 0:57
spalanivel16-Jul-09 0:57 
QuestionCell click coordinates Pin
Chazzysb16-Jul-09 0:46
Chazzysb16-Jul-09 0:46 
AnswerRe: Cell click coordinates Pin
Chazzysb16-Jul-09 1:04
Chazzysb16-Jul-09 1:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.