Help!! TPW Screensaver Problem!! 
Author Message
 Help!! TPW Screensaver Problem!!

This is a screensaver I'm working on.  It prints out text in random colors
in random position.  I have a couple problems.  One, I want it to run
TMyApplication.Idle   when it's not doing anything.  So it would loop
until wm_mousemove.  Second, I want to get rid of the titlebar so my DC is
the whole screen.  If anyone can help me, then thanks!

program ScrSaver;

uses Strings, WinTypes, WinProcs, WObjects;

type
  TMyApplication = object(TApplication)
    procedure Idle; virtual;
    procedure InitMainWindow; virtual;
  end;

type
  PMyWindow = ^TMyWindow;
  TMyWindow = object(TWindow)
    constructor Init(AParent: PWindowsObject; ATitle: PChar);
    destructor Done; virtual;
    function CanClose: Boolean; virtual;

  end;

constructor TMyWindow.Init(AParent: PWindowsObject; ATitle: PChar);
begin
  TWindow.Init(AParent, ATitle);
end;

function TMyWindow.CanClose: Boolean;
begin
  CanClose := True;
end;

procedure TMyApplication.Idle;
var
  DC: HDC;
  A: string;
  S: array[0..31] of Char;
begin
  DC := GetDC(0);
  A:=' Some Text To Be Chosen Later ';
  StrPCopy(S,A);
  SetTextColor(DC,RGB(Random(255),Random(255),Random(255)));
  TextOut(DC, Random(300),Random(300), S, StrLen(S));
  ReleaseDC(0, DC);
end;

procedure TMyApplication.InitMainWindow;
begin
  MainWindow := New(PMyWindow, Init(nil, '{*filter*}Guide Random Text
ScreenSaver'));
end;

destructor TMyWindow.Done;
begin
  TWindow.Done;
end;

var
  MyApp: TMyApplication;

begin
  MyApp.Init('ScrSaver');
  MyApp.Run;
  MyApp.Done;
end.
~Andrew Bishop

~Life is like the Energizer bunny, it keeps going, and going, and going, and ....



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Problem with my screensaver

2. help ------ screensavers

3. TPW Owl and Postscript problems - Help!

4. Screensavers for Windows 3.1

5. Screensaver

6. Screensavers

7. Using EGAVGA.BGI - How to program the screensaver - scrnsavr.pas (0/1)

8. Using EGAVGA.BGI - How to program the screensaver - scrnsavr.pas (1/1)

9. SCREENSAVERS - whats in a name?

10. How to launch windows' screensaver

11. win95 screensaver

12. FREE Bathing Suit Beauties Screensaver setup.exe (1/1)

 

 
Powered by phpBB® Forum Software