Solved

kaleidoscope

Posted on 2000-05-06
8
144 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
 
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

760 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now