Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

kaleidoscope

Posted on 2000-05-06
8
Medium Priority
?
161 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 9

Accepted Solution

by:
Ruchi earned 1800 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
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 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…
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…
Suggested Courses

718 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