Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Screen Saver

Posted on 1999-06-26
10
Medium Priority
?
171 Views
Last Modified: 2010-04-06
Hello I wont to know how to display in panel?

I hed an answer  Winexec('screensave.scr /p'+panel1.handel,0);

and it is working but I dont know how to close it have any
ID???
0
Comment
Question by:ILPowerSoft
[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
  • 3
  • 3
  • 2
  • +2
10 Comments
 

Expert Comment

by:forns
ID: 1384726
I've never tried that, but did you try with CloseHandle?
0
 
LVL 17

Expert Comment

by:inthe
ID: 1384727
hi,
i also been searching this for ages and just found it now by searchiung how recreatewnd works on a form.
the following works ok let me know if it gives any trouble:

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;

procedure TForm1.Button2Click(Sender: TObject);

begin
panel1.Perform(CM_RECREATEWND, 0, 0);

end;


Regards Barry

0
 

Author Comment

by:ILPowerSoft
ID: 1384728
It makes an Error, and if I wont to run a new screen saver
in the same panel?
0
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.

 

Author Comment

by:ILPowerSoft
ID: 1384729
Hello as some one have a Idea
0
 
LVL 15

Expert Comment

by:simonet
ID: 1384730
ILPowerSoft, I am pretty sure you'll be able to find the answer you're looking for in this site:

http://www.wischik.com/scr/resources.html

It's the most complete reference there's on the web about screen savers, in C and Delphi.

Alex
0
 

Author Comment

by:ILPowerSoft
ID: 1384731
Sorry dident found if you know how to preview screen saver
in panel an and thene close it pleas write
0
 
LVL 15

Expert Comment

by:simonet
ID: 1384732
You take forever to grade this question and then still make other questions? Get a grip, pal. Besides, I don't get a word of what you said. You got a great link there with all the information you want. The information you need is in the URL I gave you.
0
 
LVL 17

Expert Comment

by:inthe
ID: 1384733
Panel1.free
0
 
LVL 17

Accepted Solution

by:
inthe earned 200 total points
ID: 1384734
ok i got it,here is example if you need the project files mailed to you just ask

regards Barry


unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, ExtCtrls;

type
  TForm1 = class(TForm)
    Close1: TButton;
    Button1: TButton;
    OpenDialog1: TOpenDialog;
    Panel1: TPanel;
    procedure Close1Click(Sender: TObject);
    procedure Button1Click(Sender: TObject);
    private
    { Private declarations }
  public
    { Public declarations }

  end;

var
  Form1: TForm1;
  SS_Handle : String;
implementation

{$R *.DFM}
function EnumProc(h : HWND;l : integer): boolean;stdcall;
var buf : array[0..255] of char;
begin
  GetWindowText(h, buf, sizeof(buf)- 1);
  SS_Handle:=inttostr(h);
  Result := true;
end;

procedure TForm1.Close1Click(Sender: TObject);
var h : integer;
begin
  h:=strtoint(SS_Handle);
  PostMessage(h, WM_QUIT, 0, 0);
  enumChildwindows(Panel1.handle, TFNWndEnumProc(@enumproc), 0);

end;

procedure TForm1.Button1Click(Sender: TObject);
begin
opendialog1.InitialDir:='c:\windows\system';
opendialog1.execute;
  WinExec(pchar(opendialog1.FileName + ' /p ' + inttostr(Panel1.handle)),
    SW_Show);
   enumChildwindows(Panel1.handle, TFNWndEnumProc(@enumproc), 0);
end;

end.
0
 

Expert Comment

by:Tuvok
ID: 6825529
This question was awarded, but never cleared due to the JSP-500 errors of that time.  It was 'stuck' against userID -1 versus the intended expert whom you awarded.  This corrects the problem and the expert will now receive these points; points verified.

Please click on your Member Profile and select 'View Question History' (or click the member link below) to navigate through any open or locked questions you may have to update and finalize them.

This is the Community Support link, if help is needed, along with the link to 'All Topics' since many new ones were recently added.

Memberlink:
http://www.experts-exchange.com/jsp/memberProfile.jsp?mbr=ILPowerSoft&showQHistory=true

Community Support:
http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt

All Topics:
http://www.experts-exchange.com/jsp/zonesAll.jsp
 
Thanks,
Tuvok
Moderator @ Experts Exchange
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

715 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