Solved

kaleidoscope

Posted on 2000-05-06
8
148 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
Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 
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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

809 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