Results 1 to 7 of 7

Thread: Pause

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2001
    Location
    Lisbon, Portugal
    Posts
    69

    Question Pause

    Hi,

    How can I put a pause in my programme, before I show a report made in crystal reports?
    Rita Jaques

  2. #2
    New Member pari's Avatar
    Join Date
    Dec 2001
    Location
    on earth
    Posts
    13
    Hey!!
    u can definitely use the TIMER to pause u'r appalication.
    Pari

  3. #3
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    Or use the Sleep API :

    VB Code:
    1. Declare Sub Sleep Lib "kernel32" Alias "Sleep" (ByVal dwMilliseconds As Long)
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  4. #4
    Randalf the Red honeybee's Avatar
    Join Date
    Jun 2000
    Location
    off others' brains
    Posts
    4,345

    Well ...

    Depends upon which type of pause.

    You could set up a loop that runs for a large number of iterations, something like:
    VB Code:
    1. For I = 0 To 10000 Step 1
    2. Next

    Or run another loop inside it as :
    VB Code:
    1. For I = 0 To 10000 Step 1
    2.    For J = 0 To 10000 Step 1
    3.    Next
    4. Next

    Or you could display a form with a progressbar on it, and keep it on top till you finished your work, and then unloaded this form and show your report.

    .
    I am not a complete idiot. Some parts are still missing.
    Check out the rtf-help tutorial
    General VB Faq Thread
    Change is the only constant thing. I have not changed my signature in a long while and now it has started to stink!
    Get more power for your floppy disks. ; View honeybee's Elite Club:
    Use meaningfull thread titles. And add "[Resolved]" in the thread title when you have got a satisfactory response.
    And if that response was mine, please think about giving me a rep. I like to collect them!

  5. #5
    Hyperactive Member abhid's Avatar
    Join Date
    Nov 2001
    Location
    3rd rock from the sun
    Posts
    467
    use following code to lock your screen

    Declare Function LockWindowUpdate Lib "user32" _
    (ByVal hWnd As Long) As Long

    Public Sub LockWindow(hWnd As Long)
    LockWindowUpdate hWnd
    End Sub

    Public Sub UnlockWindow()
    LockWindowUpdate 0
    End Sub

    usage
    LockWindow(Form1.hWnd)
    'show report
    UnloadWindow

    found this code on www.vbworld.com
    you can use it with combination of timers

  6. #6

    Thread Starter
    Lively Member
    Join Date
    Mar 2001
    Location
    Lisbon, Portugal
    Posts
    69
    I'm sorry, but it didn't work.

    I have a report, made in crystal reports, and I insert records in a table, in a database in Acces.

    When I show the report for the first time the data is not updated and if I show it a second time, the data is updated.

    Can you understand why?

    I did a debug and when I insert a breakpoint when I show the report and then run the programme till the end, the report is updated.

    Why?

    Could anyone help me, please?
    Rita Jaques

  7. #7
    DaoK
    Guest
    [Highlight=VB]

    Pausing = False

    While Pausing = False
    DoEvents
    Sub Check CristalReportStatus ' If Cristal Report is code than Pausing = True
    Wend

    [Highlight=VB]

    Something like that should work.

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