?
Solved

Screen Saver on a form !!!!!

Posted on 1999-07-29
4
Medium Priority
?
156 Views
Last Modified: 2010-04-04
I have a screen saver ie MyScreenSaver.Scr. I also have a form in my application ie MyAppForm, on this form I have a large panel, and in this large panel I want to show the above screensaver, ..

Can this be done and if so, how do I do it ????

Thanx in advance

Stu
0
Comment
Question by:StuartB_99
[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
  • 2
4 Comments
 
LVL 17

Accepted Solution

by:
inthe earned 400 total points
ID: 1391792
Hi Stu

procedure TForm1.Button1Click(Sender: TObject);
var
  screensaver : string ;
begin
  screensaver := 'c:\windows\system\starflight.scr /P' + InttoStr( Panel1.Handle );
  WinExec(pchar(screensaver), SW_SHOWNormal);

end;

note when your finished you must free the panel to free the screensaver form mempry else you most likely get errors.
either panel1.Perform(CM_RECREATEWND, 0, 0); or
panel1.free; will do it.
Regards Barry
0
 

Expert Comment

by:PROGRAMMING030999
ID: 1391793
Hi Stu,
If your Screensaver supports the Preview, you could use
something like:

procedure TForm1.Button1Click(Sender: TObject);
begin

screensaver := 'c:\win95\system\Flying Windows.scr /P' + InttoStr(Panel1.Handle );

WinExec(pchar(screensaver), SW_SHOWNormal);
end;

Michael

0
 

Author Comment

by:StuartB_99
ID: 1391794
Thanx very much,...

Stuart
0
 

Author Comment

by:StuartB_99
ID: 1391795
Cheers Michael, but Barry just pipped you to the post, but a huge thankyou to you both..

Stuart

SBond@Costcutter.Com
0

Featured Post

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.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
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