CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Thread: Stop process

  1. #1
    Join Date
    Dec 2004
    Location
    Pakistan(Skardu)
    Posts
    64

    Arrow Stop process

    Hi Expertz,
    I have a problem that I show a dialog in a form like in a loop like

    Code:
    for i=0 to itotal then
    
              if (codition) then
    
                        Dim DlgPas As New DialogPass()
                        DlgPas.Show()
    
             end if
    ....
    ...........
    ...........
    
    
    next
    i want to stop a process when if condition is true..for example if i=2 and if condition is true then until the user not click OK button on DlgPas Form programe should not go next line ...


    Thanx
    frm adnanio Brzzzz
    Last edited by HanneSThEGreaT; December 20th, 2008 at 01:45 AM. Reason: Code Tags!

  2. #2
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Stop process

    Maybe you need EXIT IF or EXIT FOR which immediately jumps to the respective endpoint
    Code:
    ' and also, USE CODE TAGS!!!!
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  3. #3
    Join Date
    Dec 2004
    Location
    Pakistan(Skardu)
    Posts
    64

    Re: Stop process

    No I would not like to exit for or sub...i wish to wait until user click on child form button..
    bcoz I need loop index also after geting some data from child form
    thanx
    waiting ur reply
    Last edited by kku; December 24th, 2008 at 08:43 AM.

  4. #4
    Join Date
    Feb 2007
    Location
    Craiova, Romania
    Posts
    326

    Re: Stop process

    Then DlgPas should be modal. This way the flow in the parent window will not continue until the dialog closes.

  5. #5
    Join Date
    Mar 2007
    Location
    Argentina
    Posts
    579

    Re: Stop process

    Quote Originally Posted by marceln View Post
    Then DlgPas should be modal. This way the flow in the parent window will not continue until the dialog closes.
    It means, write
    Code:
    DlgPas.ShowDialog()
    [Vb.NET 2008 (ex Express)]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured