Solved

kaleidoscope

Posted on 2000-05-06
8
154 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

679 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