Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[Delphi] Form always overlapping

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
angerist
Grandmaster Cheater Supreme
Reputation: 0

Joined: 18 Jun 2007
Posts: 1011
Location: Australia.

PostPosted: Mon Dec 08, 2008 12:52 am    Post subject: [Delphi] Form always overlapping Reply with quote

What I'm trying to do is get a form to overlap all windows. But still be able to use the windows behind it. For example image having a clock or a timer visible on the top left of your screen while your doing something else behind it.


I hope I explained it accurately.


Thankyou,

Angerist

_________________
Back to top
View user's profile Send private message
smartz993
I post too much
Reputation: 2

Joined: 20 Jun 2006
Posts: 2013
Location: USA

PostPosted: Mon Dec 08, 2008 1:20 am    Post subject: Reply with quote

Code:
SetWindowPos(hWnd, HWND_TOPMOST, 0,0,0,0,SWP_NOACTIVATE+SWP_NOMOVE+SWP_NOSIZE);


I think that's what you want? Your window to stay on top?

But if you meant doing stuff behind the window, like clicking stuff behind it and shit..i'm not sure. (You'd prob have to draw an image right to the screen)
Back to top
View user's profile Send private message
angerist
Grandmaster Cheater Supreme
Reputation: 0

Joined: 18 Jun 2007
Posts: 1011
Location: Australia.

PostPosted: Mon Dec 08, 2008 1:36 am    Post subject: Reply with quote

Well I made an app that shuts down a selected process in the amount of time you type in the edit box. So I want users to be able to see the time ticking away while they play there game.

I don't mean full screen games just like minimised maple or something.

So yeh. I'll keep researching.

_________________
Back to top
View user's profile Send private message
smartz993
I post too much
Reputation: 2

Joined: 20 Jun 2006
Posts: 2013
Location: USA

PostPosted: Mon Dec 08, 2008 1:38 am    Post subject: Reply with quote

angerist wrote:
Well I made an app that shuts down a selected process in the amount of time you type in the edit box. So I want users to be able to see the time ticking away while they play there game.

I don't mean full screen games just like minimised maple or something.

So yeh. I'll keep researching.


Well yea, if you just want to keep it on top, you can use the code i gave you..otherwise, you can use the DrawText API to draw the timer counting down :]
Back to top
View user's profile Send private message
Henley
Grandmaster Cheater
Reputation: 0

Joined: 03 Oct 2006
Posts: 671

PostPosted: Mon Dec 08, 2008 1:59 am    Post subject: Reply with quote

SetActiveWindow?
make a timer for this?
Back to top
View user's profile Send private message
angerist
Grandmaster Cheater Supreme
Reputation: 0

Joined: 18 Jun 2007
Posts: 1011
Location: Australia.

PostPosted: Mon Dec 08, 2008 4:49 am    Post subject: Reply with quote

This is the full source. I know this is really quite noob but I'm struggling to understand some of your suggestions so if you could implement them in the right area in my source that would be great. Once again sorry for this I'm just begging with delphi.


Code:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ComCtrls, StdCtrls, ExtCtrls, GIFImg,Menus , Buttons, ShellAPI;

type
  TForm1 = class(TForm)
    Label1: TLabel;
    ff: TImage;
    Button1: TButton;
    Button2: TButton;
    procedure Button1Click(Sender: TObject);
    procedure Image3Click(Sender: TObject);
   procedure WMNCHitTest(var Msg: TWMNCHitTest);
  message wm_NCHitTest;
procedure Button2Click(Sender: TObject);
    procedure Image2Click(Sender: TObject);
    procedure ffClick(Sender: TObject);


  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation
 procedure TForm1.WMNCHitTest(var Msg: TWMNCHitTest);
begin
  inherited;
  if  Msg.Result = htClient then
    Msg.Result := htCaption;
end;

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
Application.Terminate
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
shellexecute(
handle,
'close',
'MapleStory.exe',
nil,
nil,
SW_SHOWNORMAL);
end;

procedure TForm1.ffClick(Sender: TObject);
begin

end;

procedure TForm1.Image2Click(Sender: TObject);
begin
Application.Terminate
end;

procedure TForm1.Image3Click(Sender: TObject);
begin
Application.Terminate
end;
end.

_________________
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites