?
Solved

screen saver in binary style

Posted on 1999-07-17
6
Medium Priority
?
191 Views
Last Modified: 2010-04-30
I would like to create a screen saver in binary style. So
the background will have only 0 or 1 running and occupied
whole screen. The background of 1 and 0 will be updated
evry single second. Let say first line is 001100....
then after a second it may be update to 1010001...
In other word, every single 0 or 1 maybe updated.

How to do it ?
Should I concern about screen solution ? For example, it
will run fine in small or large screen ?
Can any expert show me the code for doing it ?
Point will be increasing as we go along !

Thank you very MUCHHHH !

0
Comment
Question by:federick
[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
6 Comments
 

Author Comment

by:federick
ID: 1525568
Yeah ! I try to use text box but it wasn't smooth. And it only run to certain
length, then stop. Please help me
0
 
LVL 10

Expert Comment

by:viktornet
ID: 1525569
that is pretty easy to do... what are you having problems with?!
0
 
LVL 3

Expert Comment

by:y2kwacko
ID: 1525570
add this to your form

Private Function randoms(length As Integer) As String
Dim x As Integer, blah As Integer
    For x = 1 To length
        Randomize
        blah = Rnd * 1
        msg$ = "" & msg$ & blah
    Next x
randoms = msg$
End Function



then in form load statement put

Me.Cls
Me.Print randoms(600)
Me.Print randoms(600)
Me.Print randoms(600)
Me.Print randoms(600)
Me.Print randoms(600)
Me.Print randoms(600)
Me.Print randoms(600)
Me.Print randoms(600)
Me.Print randoms(600)
Me.Print randoms(600)
Me.Print randoms(600)
Me.Print randoms(600)
Me.Print randoms(600)
Me.Print randoms(600)
Me.Print randoms(600)
Me.Print randoms(600)
Me.Print randoms(600)
Me.Print randoms(600)
Me.Print randoms(600)
Me.Print randoms(600)
Me.Print randoms(600)
Me.Print randoms(600)
Me.Print randoms(600)
Me.Print randoms(600)
Me.Print randoms(600)
Me.Print randoms(600)
Me.Print randoms(600)
Me.Print randoms(600)
Me.Print randoms(600)
Me.Print randoms(600)
Me.Print randoms(600)
Me.Print randoms(600)
Me.Print randoms(600)
Me.Print randoms(600)
Me.Print randoms(600)
Me.Print randoms(600)
Me.Print randoms(600)
Me.Print randoms(600)
Me.Print randoms(600)
Me.Print randoms(600)
Me.Print randoms(600)
Me.Print randoms(600)
Me.Print randoms(600)
Me.Print randoms(600)
Me.Print randoms(600)

in a timer put the same set the intervals to 1000 for a second

let me know if that is what you are looking for you can change 600 to be more or less depending on resolution/screen size




0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 3

Expert Comment

by:y2kwacko
ID: 1525571
btw if you want to save code time and space you can just do the prints in a for next example to replace the procedure for form_load and timer1_timer

Dim ald as integer

For ald = 1 to 50
     Me.print randoms(600)
Next ald
0
 

Author Comment

by:federick
ID: 1525572
y2kwacko  :

I know how to do that just printing binary 1 and 0 on he form, but there is a problem
in your code. Remember, this is a screen saver. when the program is loaded, the
background should fill with 1 and 0 already. Not line by line. My apology, if I didn't
make clear in my question. So :

1. when the form is loaded, the background is filled by 1 and 0 right away !
2. after filled, all 1 and 0 should be changed.
3. all the time, the form must be filled, no single spolt or line is empty.
4. constantly, update the binary code.
5. is like in the movie, binary code running, or I should day it is animation ?

Thank you,  y2kwacko !
will you so kind to help me with this problem ?
0
 
LVL 2

Accepted Solution

by:
tylerd earned 200 total points
ID: 1525573
I've actually done this before.  What you need to do is go into a program like photoshop and make a static bitmap of ones and zeros that is one column larger than the screen.

screen         extra column
______________
|1011101011101|0
|1011011101011|1
|0101000101010|1
--------------

once you have done that write done the width of each column and the height of each row.  Now goto into visual basic and use the paintpicture method of the form or the bitblt api.  With the method or the api you can "slice up" this static bitmap into independent rows that can be moved at different speeds.  For example you can slide row 1 one unit to the left, now the digit that was just moved out of the view of the user will next appear all the way to the right.  Just imagine wrapping a piece of paper (the bitmap) around a coffee can (the screen).  If you turn the can to the left the image on the paper will loop around from the right.  If you want exact code on how to implement this looping refer to the book "The black art of visual basic game programming" and look at the chapter on bitmaps, it has a great example on this.  Hope this works for you, it did for me.

-tyler


0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…
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

719 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