Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > General > make things happen randomly


Reply
 
Thread Tools Display Modes
  #1  
Old 07-02-2003, 07:40 AM
Terbo Terbo is offline
Regular
 
Join Date: Jun 2003
Posts: 62
Default make things happen randomly


I need to make stuff happen randomly. I was wondering if anyone could tell me a few ways to make things happen radomly.

thanks
Reply With Quote
  #2  
Old 07-02-2003, 07:52 AM
Baradin's Avatar
Baradin Baradin is offline
Centurion
 
Join Date: May 2003
Location: Alberta,Canada
Posts: 118
Default

Quote:
Originally Posted by Terbo
I need to make stuff happen randomly. I was wondering if anyone could tell me a few ways to make things happen radomly.

thanks




Check out "Randomize" in your MSDN...
__________________
"How do you shoot the Devil in the back? What if you miss?"
Reply With Quote
  #3  
Old 07-02-2003, 07:54 AM
phinds phinds is offline
Senior Contributor
 
Join Date: Jan 2003
Posts: 761
Default

use a timer w/ random settings
__________________
phinds
www.hobbithouseinc.com/VB
Reply With Quote
  #4  
Old 07-02-2003, 07:54 AM
Robse's Avatar
Robse Robse is offline
Senior Contributor

* Expert *
 
Join Date: Sep 2002
Location: Karlsruhe, Germany
Posts: 1,319
Default

Not sure exactly what you mean, maybe this can give you some
ideas:

Code:
Private Sub Form_Load() Randomize End Sub Private Sub Timer1_Timer() If Rnd > 0.5 Then Debug.Print "This happened randomly" End Sub
__________________
Posting Guidelines MSDN-VB API List Use [vb]...[/vb] tags for code!
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to make things permanent? seigeless General 2 02-12-2003 08:29 PM
How do I like make a code randomly allen1086 General 2 11-05-2002 08:03 AM
Why dont things happen in the right order? P1nk General 7 08-04-2002 06:48 PM
How do I make an object shoot things clakka Game Programming 8 05-07-2002 03:00 AM
BT878: Let me make things clearer akyprian DirectX 1 03-02-2002 06:27 AM

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