Solved

How to make a complete Screen saver in vb5

Posted on 1998-05-29
9
204 Views
Last Modified: 2010-05-03
How make a complete SS in VB5? I know the code "/s" and "/c", but I wanted to know how can I enable the password button and how to put the little bitmap in the "video" that appears in the video propeties dialog box...
0
Comment
Question by:ruyluis
  • 4
  • 4
9 Comments
 
LVL 1

Expert Comment

by:MAVERICK
Comment Utility
To the best of my knowledge a screensaver is just a application renamed *.Scr instead of *.exe, The password can be enabled through the standard display propeties. Do u mean by "video" the preview small screen when you choose a screen saver.

0
 
LVL 8

Accepted Solution

by:
MikeP090797 earned 50 total points
Comment Utility
When you need to display something in the preview screen, your app is called with the /p switch followed by the device context, like /p1272. You can just BitBlt the bitmap. The Password button is handled automaticly by Windows
0
 

Author Comment

by:ruyluis
Comment Utility
OK, but how can I know the number of device? And I think the password button isn't handled automaticly, you need the "/a " command and the follow number...
0
 
LVL 8

Expert Comment

by:MikeP090797
Comment Utility
Dim hDC as long
hDC=CLng(Right(Command$, Len(Commmand$)-2))
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 

Author Comment

by:ruyluis
Comment Utility
Can you give me an example of bitblt function use?
0
 
LVL 8

Expert Comment

by:MikeP090797
Comment Utility
BitBlt hDCDest, 0, 0, Pic1.Width, Pic1.Height, pic1.hdc, 0, 0, vbSrcCopy
0
 

Author Comment

by:ruyluis
Comment Utility
Great, Mike!! You're realy an expert! I've been looking for these answers a lot of time and now... here Mike! Well, I have one more question to you, please. What is the first argument in the bitblt function to the preview screen saver? Thank you a lot!
0
 
LVL 8

Expert Comment

by:MikeP090797
Comment Utility
The first param is the device context handle, it tells BitBlt where to put the bmp. You get it from the /p switch
0
 

Author Comment

by:ruyluis
Comment Utility
OK, mike, but isn't working! I write something like this:
x=Bitblt(hDC,0,0,60,60,Form2.picture1.hDC,0,0,vbSrcCopy) and the bitmap from Form2.picture1 doen't appears in the preview of Screen Saver. What is wrong? (I write load form2, before).
P.S. Have you a  code in VB5 to make a Screen Saver? With a real example maybe I can understand better this. My e-mail is ruyluis@sti.com.br. Thanks
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

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…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
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…

763 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

15 Experts available now in Live!

Get 1:1 Help Now