| View previous topic :: View next topic |
| Author |
Message |
angerist Grandmaster Cheater Supreme
Reputation: 0
Joined: 18 Jun 2007 Posts: 1011 Location: Australia.
|
Posted: Mon Dec 08, 2008 12:52 am Post subject: [Delphi] Form always overlapping |
|
|
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 |
|
 |
smartz993 I post too much
Reputation: 2
Joined: 20 Jun 2006 Posts: 2013 Location: USA
|
Posted: Mon Dec 08, 2008 1:20 am Post subject: |
|
|
| 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 |
|
 |
angerist Grandmaster Cheater Supreme
Reputation: 0
Joined: 18 Jun 2007 Posts: 1011 Location: Australia.
|
Posted: Mon Dec 08, 2008 1:36 am Post subject: |
|
|
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 |
|
 |
smartz993 I post too much
Reputation: 2
Joined: 20 Jun 2006 Posts: 2013 Location: USA
|
Posted: Mon Dec 08, 2008 1:38 am Post subject: |
|
|
| 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 |
|
 |
Henley Grandmaster Cheater
Reputation: 0
Joined: 03 Oct 2006 Posts: 671
|
Posted: Mon Dec 08, 2008 1:59 am Post subject: |
|
|
SetActiveWindow?
make a timer for this?
|
|
| Back to top |
|
 |
angerist Grandmaster Cheater Supreme
Reputation: 0
Joined: 18 Jun 2007 Posts: 1011 Location: Australia.
|
Posted: Mon Dec 08, 2008 4:49 am Post subject: |
|
|
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 |
|
 |
|