Solved

kaleidoscope

Posted on 2000-05-06
8
151 Views
Last Modified: 2010-05-02
have been looking for kaleidoscope over the internet and found nothing. do you have a sample program? please email me fast at mcmanusjp@hotmail.com. all points for a good program.

thank you.
-answerboy2000
0
Comment
Question by:AnswerBoy2000
  • 5
  • 3
8 Comments
 
LVL 9

Expert Comment

by:Ruchi
ID: 2784200
Take a look at http://www.planetsourcecode.com/vb/scripts/ShowCode.asp?lngWId=1&txtCodeId=5514
"This program shows you a beautiful kaleidoscope. It contains lines and circles. "
0
 
LVL 9

Expert Comment

by:Ruchi
ID: 2784206
On the way to your inbox!
0
 

Author Comment

by:AnswerBoy2000
ID: 2784263
that was a perfect shot. please repost as an answer.

thank you. have a happy saturday.
-answerboy2000                    
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
LVL 9

Accepted Solution

by:
Ruchi earned 450 total points
ID: 2784345
Thank you for the points! I'm glad that I could help you. :)
0
 

Author Comment

by:AnswerBoy2000
ID: 2812877
do you have a very easy code for kaleidoscope? not too complex. i want to load a sleep subroutine and a timer (2 timers in the planet source site) i just emailed you now. if you have it, i will increase 200 points.

thank you.
-answerboy2000
0
 
LVL 9

Expert Comment

by:Ruchi
ID: 2819040
From the web:

You need to create a timer control in Form. Backcolor - black color, Caption - empty string, ClipControls - False, ControlBox - False. Set AutoRedraw to True.

Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Sub Timer1_Timer()
Dim X1 As Integer, X2 As Integer, X3 As Integer, X4 As Integer
Dim Y1 As Integer, Y2 As Integer, Y3 As Integer, Y4 As Integer
Dim StepX1 As Integer, StepX2 As Integer
Dim StepY1 As Integer, StepY2 As Integer
Dim MaxRandomX As Integer, MaxRandomY As Integer, times As Integer
Static LineCol As Long, TimesCol As Integer, color As Integer

Randomize                         'seed random number generator
MaxRandomX = ScaleWidth / 2                    'half width (starts at 0)
MaxRandomY = ScaleHeight / 2                    'half height (starts at 0)

LineCol = RGB(Rnd * 255, Rnd * 255, Rnd * 255)          'set current color to random (1 to 15)
X1 = Rnd * MaxRandomX              'set X1 to a random (0 to max)
Y1 = Rnd * MaxRandomY              'ditto for Y1
X2 = Rnd * MaxRandomX              'ditto for X2
Y2 = Rnd * MaxRandomY              'ditto for Y2

StepX1 = Rnd * 4 + 1              'set StepX1 to random (-2 to 2)
StepY1 = Rnd * 4 + 1              'ditto for StepY1
StepX2 = Rnd * 4 + 1             'ditto for StepX2
StepY2 = Rnd * 4 + 1              'ditto for StepY2

For times = 1 To 80            'do 30 sets of lines

X3 = ScaleWidth - X1              'calculate points for
X4 = ScaleWidth - X2              '4 lines
Y3 = ScaleHeight - Y1              '4 X values
Y4 = ScaleHeight - Y2              '4 Y values

Line (X1, Y1)-(X2, Y2), LineCol
Line (X3, Y1)-(X4, Y2), LineCol
Line (X1, Y3)-(X2, Y4), LineCol
Line (X3, Y3)-(X4, Y4), LineCol
Sleep 0.8

X1 = X1 + StepX1           'adjust with step value
Y1 = Y1 + StepY1           'ditto
X2 = X2 + StepX2           'ditto
Y2 = Y2 + StepY2           'ditto
Next
End Sub


Hope this is helpful to you. Is this easy enough for you to understand?
0
 
LVL 9

Expert Comment

by:Ruchi
ID: 2819076
Sorry for not writing you yesterday as I could not find the links for you. My mail is on the way to your inbox! :)
0
 

Author Comment

by:AnswerBoy2000
ID: 2829748
that is not what i want to look for. it helped me a bit though. you will earn 105 points.

thank you.
-answerboy2000
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
VB error "Type mismatch" 2 60
Macro which automatically sends attachment to Outlook 14 78
SSRS expression Issue finding a string 10 90
Adding to a VBA? 6 78
I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question