Results 1 to 4 of 4

Thread: is there any code for this problem?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2004
    Location
    philippines
    Posts
    245

    Unhappy 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.

  2. #2
    Registered User HellRaider's Avatar
    Join Date
    Sep 2003
    Posts
    70

    Re: is there any code for this problem?

    Hello

    I got the example out of API-Guide, hope it helps
    VB Code:
    1. 'This project needs a button
    2. Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
    3. Private Sub Command1_Click()
    4.     'KPD-Team 1998
    5.     'URL: [url]http://www.allapi.net/[/url]
    6.     'E-Mail: [email][email protected][/email]
    7.     Me.Caption = "Your system will sleep 5 sec."
    8.     'Sleep for 5000 milliseconds
    9.     Sleep 5000
    10.     Me.Caption = ""
    11. End Sub
    12. Private Sub Form_Load()
    13.     Me.Caption = ""
    14.     Command1.Caption = "Sleep ..."
    15. End Sub

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jan 2004
    Location
    philippines
    Posts
    245

    Angry 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.

  4. #4
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    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
  •  



Click Here to Expand Forum to Full Width