interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, LMDControl, LMDBaseControl, LMDBaseGraphicControl,
LMDGraphicControl, LMDFill, LMDCustomControl, LMDCustomPanel,
LMDCustomBevelPanel, LMDSimplePanel, StdCtrls, LMDCustomParentPanel,
LMDCustomPanelFill, LMDPanelFill, LMDStarter,
LMDCustomComponent, LMDSysInfo, Buttons, LMDWndProcComponent,
Menus, ExtCtrls, StrUtils,JclSysInfo ;
type
TMainForm =
class(TForm)
LMDSysInfo1: TLMDSysInfo;
LMDStarter1: TLMDStarter;
LMDSimplePanel1: TLMDSimplePanel;
LMDPanelFill1: TLMDPanelFill;
infolabel: TLabel;
procedure FormCreate(Sender: TObject);
procedure FormResize(Sender: TObject);
procedure FormShow(Sender: TObject);
private
//nix
public
//nix
protected
procedure CreateParams(
var Params: TCreateParams);
override;
end;
var
MainForm: TMainForm;
implementation
{$R *.dfm}
procedure hide_app();
// Hier gehe ich alle Handles durch und suche mein Fenster
var
Handle,WindowStyle: HWND;
begin
Handle:=GetWindow(GetDesktopWindow(),GW_CHILD);
while (
Handle<>0)
do
begin
if GetWindowCaption(
Handle) = '
Interactive Desktop'
then
begin
showmessage('
Handle gefunden:"'+GetWindowCaption(
Handle)+'
" Nr.:'+inttostr(
Handle));
WindowStyle := GetWindowLong(
handle, GWL_STYLE);
WindowStyle := WindowStyle-WS_ICONIC;
SetWindowLong(
handle, GWL_STYLE, WindowStyle) ;
SetWindowLong(
Handle, WS_ICONIC, WindowStyle);
break;
end;
Handle:=GetWindow(
Handle,GW_HWNDNEXT);
end;
end;
procedure TMainForm.CreateParams(
var Params: TCreateParams);
begin
inherited CreateParams(Params);
//Hier setze ich das Parent und "keine fesnterrahmen"
Params.WndParent := GetDesktopWindow;
Params.Style := WS_CHILD;
end;
procedure TMainForm.FormCreate(Sender: TObject);
begin
MainForm.Top :=screen.WorkAreaTop;
MainForm.Left :=screen.WorkAreaLeft;
// Größe des Hauptbildschirms
MainForm.Width :=screen.WorkAreaWidth;
MainForm.Height :=screen.WorkAreaHeight;
infolabel.Caption:='
Sie sind als '+LMDSysinfo1.currentuser+'
am Computer '+LMDSysinfo1.computername+'
angemeldet';
end;
procedure TMainForm.FormResize(Sender: TObject);
begin
application.ProcessMessages;
LMDPanelFill1.Repaint;
LMDPanelFill1.Refresh;
end;
procedure TMainForm.FormShow(Sender: TObject);
begin
hide_app;
end;
end.