|
-
Jan 7th, 2005, 01:40 AM
#1
Thread Starter
Addicted Member
is there any code for this problem?
i am using a datareport.. and i have this function that prints the report. and i also have a listbox(checked enabled) and i have to print all checked items in the listbox. so i have this procedure that loops through the listbox and check whether the item is checked or not.. if checked it will print the item if not does nothing.. the problem is that my loop is correct but it seems that it only prints the first item and neglects the other items to be printed.. and i noticed that everytime i put a break in my program it prints all items.. so i think if i can make the program pause like for 5 seconds it will print properly as i want to.
Is there any code that can pause my program before continueing the next line of code? i have used timer and it didn't do the work.
-
Jan 7th, 2005, 02:14 AM
#2
Registered User
Re: is there any code for this problem?
Hello
I got the example out of API-Guide, hope it helps
VB Code:
'This project needs a button
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Private Sub Command1_Click()
'KPD-Team 1998
'URL: [url]http://www.allapi.net/[/url]
Me.Caption = "Your system will sleep 5 sec."
'Sleep for 5000 milliseconds
Sleep 5000
Me.Caption = ""
End Sub
Private Sub Form_Load()
Me.Caption = ""
Command1.Caption = "Sleep ..."
End Sub
-
Jan 9th, 2005, 07:26 PM
#3
Thread Starter
Addicted Member
Re: is there any code for this problem?
em sorry but also tried that one. it just halt the whole program but still execute the same way it has been executing.. i need a pause like a message box it is code pause.. but not a program wide pause. so it executes properly. i ahve already tried inserting a loop. but still did not work.. i even had a timer but still didn't work.
-
Jan 9th, 2005, 07:51 PM
#4
Re: is there any code for this problem?
i would try to so something like save all the checked items to a string variable with Vbnewline or appropriate formatting, or an array variable then print the variable.
rgds peter
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|