Hi,
How can I put a pause in my programme, before I show a report made in crystal reports?
Printable View
Hi,
How can I put a pause in my programme, before I show a report made in crystal reports?
Hey!!
u can definitely use the TIMER to pause u'r appalication.
Pari
Or use the Sleep API :
VB Code:
Declare Sub Sleep Lib "kernel32" Alias "Sleep" (ByVal dwMilliseconds As Long)
Depends upon which type of pause.
You could set up a loop that runs for a large number of iterations, something like:
VB Code:
For I = 0 To 10000 Step 1 Next
Or run another loop inside it as :
VB Code:
For I = 0 To 10000 Step 1 For J = 0 To 10000 Step 1 Next 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.
.
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
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?
[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.