Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > General > HELP PLEASE (Lottery Program)


Reply
 
Thread Tools Display Modes
  #1  
Old 02-22-2002, 07:28 AM
Tajiri17
Guest
 
Posts: n/a
Default HELP PLEASE (Lottery Program)


Hi,

I have attached My Program to this Message.

I need help on the 'Lottery3.frm'. I want the Lottery Numbers to appear one-by-one Instead of all drawing at once.

Also on 'Lottery2.frm' I am having difficulty storing entries made. Ideally I would like to store entries and then clear the form ready for someone else to come along and enter.

Download the Program and all the above should make some sense.

Thanks to anyone who can help out on these two problems.

Thanks
Tajiri.
Attached Files
File Type: zip lottery program.zip (81.4 KB, 12 views)
Reply With Quote
  #2  
Old 02-22-2002, 07:52 AM
Aviator
Guest
 
Posts: n/a
Default

What I would do is one of two things

1) Inside the loop, use the Sleep API

Code:
Private Declare Sub Sleep Lib "Kernel32" (ByVal dwMilliseconds as Long)
And then code a statement that is something like

Code:
Sleep 100 'milliseconds
The only downside is that your whole program sleeps and you lose control while this is happening.

2) Still inside the loop, create your own procedure andd call it in the loop, inside the procedure have a loop that goes through a few thousand times to delay the execution of the next line of code in the main procedure

Both of these are untested but should work 99%.
Reply With Quote
  #3  
Old 02-22-2002, 08:01 AM
usetheforce2's Avatar
usetheforce2 usetheforce2 is offline
Senior Contributor

Retired Moderator
* Expert *
 
Join Date: Jul 2000
Location: Toronto, Ontario, Canada
Posts: 1,410
Default

hey,

I've modified you code abit and put in a timer control. I only changed the ThunderBall routine. you can use the same format for the other random number routines.
Attached Files
File Type: zip lottery program.zip (81.6 KB, 12 views)
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->