Click here to Skip to main content
15,887,822 members
Home / Discussions / C#
   

C#

 
GeneralRe: Can I get the DataTable properties from an arbitrary DataRow? Pin
J4amieC21-Jul-08 0:49
J4amieC21-Jul-08 0:49 
QuestionDesktop Sharing Pin
Chetan Patel20-Jul-08 21:27
Chetan Patel20-Jul-08 21:27 
AnswerRe: Desktop Sharing Pin
leppie20-Jul-08 22:59
leppie20-Jul-08 22:59 
Questionhow to create a web base vbscript editor by c# Pin
Member 255822720-Jul-08 21:17
Member 255822720-Jul-08 21:17 
Questioninserting float value in sql from c# Pin
ashok@techxygen20-Jul-08 20:46
ashok@techxygen20-Jul-08 20:46 
AnswerRe: inserting float value in sql from c# Pin
C1AllenS20-Jul-08 22:42
C1AllenS20-Jul-08 22:42 
QuestionIs this program thread safe Pin
Mogaambo20-Jul-08 20:32
Mogaambo20-Jul-08 20:32 
AnswerRe: Is this program thread safe Pin
N a v a n e e t h20-Jul-08 21:12
N a v a n e e t h20-Jul-08 21:12 
You need to show the progress window until the "Loop" finishes, right ? Then your code is wrong. prg.ShowDialog() in the "Loop" method blocks the current thread, which means your loop won't get executed until the progress closes.

Show the progress from the main thread and execute the "Loop" method in the thread which you created. Something like
private void button1_Click(object sender, EventArgs e) {
            progress prg = new progress();
            Thread t = new Thread(new ParameterizedThreadStart(loop));
            t.Start(prg);
            prg.ShowDialog();
        }

        delegate void ProgressCloseInvoker(progress prg);
        public void loop(object obj) {

            progress prg = obj as progress;
            for (long i = 0; i < 500000000; i++) {
                
            }
            // finished. closing the progress
            this.BeginInvoke(new ProgressCloseInvoker(CloseProgress), prg);
        }

        public void CloseProgress(progress prg) {
            prg.Close();

        }


All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia

How to use google | Ask smart questions

GeneralRe: Is this program thread safe Pin
S. Senthil Kumar20-Jul-08 21:16
S. Senthil Kumar20-Jul-08 21:16 
GeneralRe: Is this program thread safe Pin
N a v a n e e t h20-Jul-08 21:31
N a v a n e e t h20-Jul-08 21:31 
GeneralRe: Is this program thread safe Pin
Mogaambo20-Jul-08 21:46
Mogaambo20-Jul-08 21:46 
AnswerRe: Is this program thread safe Pin
N a v a n e e t h20-Jul-08 21:35
N a v a n e e t h20-Jul-08 21:35 
AnswerRe:Senthil or Navneeth please clear my doubt [modified] Pin
Mogaambo20-Jul-08 21:47
Mogaambo20-Jul-08 21:47 
GeneralRe:Senthil or Navneeth please clear my doubt Pin
S. Senthil Kumar20-Jul-08 22:23
S. Senthil Kumar20-Jul-08 22:23 
GeneralRe:Senthil or Navneeth please clear my doubt Pin
Mogaambo20-Jul-08 22:33
Mogaambo20-Jul-08 22:33 
GeneralRe:Senthil or Navneeth please clear my doubt Pin
S. Senthil Kumar20-Jul-08 22:44
S. Senthil Kumar20-Jul-08 22:44 
GeneralRe:Senthil or Navneeth please clear my doubt Pin
Mogaambo20-Jul-08 22:49
Mogaambo20-Jul-08 22:49 
GeneralRe:Senthil or Navneeth please clear my doubt Pin
S. Senthil Kumar20-Jul-08 23:01
S. Senthil Kumar20-Jul-08 23:01 
QuestionHTTP authentication Pin
George_George20-Jul-08 20:17
George_George20-Jul-08 20:17 
AnswerRe: HTTP authentication Pin
N a v a n e e t h20-Jul-08 20:48
N a v a n e e t h20-Jul-08 20:48 
GeneralRe: HTTP authentication Pin
George_George20-Jul-08 21:07
George_George20-Jul-08 21:07 
GeneralRe: HTTP authentication Pin
N a v a n e e t h20-Jul-08 21:27
N a v a n e e t h20-Jul-08 21:27 
GeneralRe: HTTP authentication Pin
George_George20-Jul-08 21:31
George_George20-Jul-08 21:31 
QuestionSuppressing dialogs in webbrowser control? Pin
Christopher Duncan20-Jul-08 17:16
Christopher Duncan20-Jul-08 17:16 
AnswerRe: Suppressing dialogs in webbrowser control? Pin
leppie20-Jul-08 23:01
leppie20-Jul-08 23:01 

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.