screen saver in binary style

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 !

federickAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
tylerdConnect With a Mentor Commented:
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
 
federickAuthor Commented:
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
 
viktornetCommented:
that is pretty easy to do... what are you having problems with?!
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
y2kwackoCommented:
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
 
y2kwackoCommented:
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
 
federickAuthor Commented:
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
All Courses

From novice to tech pro — start learning today.