AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Move taskbar

Ein Thema von Razor · begonnen am 30. Jan 2009 · letzter Beitrag vom 2. Feb 2009
Antwort Antwort
Razor
(Gast)

n/a Beiträge
 
#1

Re: Move taskbar

  Alt 1. Feb 2009, 22:21
I erased the background so thats done.We are talking about moving.

I got it in X=1280 in Y=0 but cant move it anywhere else.
I can't move it anywhere why is that??

Delphi-Quellcode:
unit Unit3;

interface

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

type
  TForm3 = class(TForm)
    Button1: TButton;
    Edit1: TEdit;
    Label1: TLabel;
    Edit2: TEdit;
    Label2: TLabel;
    Label3: TLabel;
    Label4: TLabel;
    Timer1: TTimer;
    Button2: TButton;
    procedure Button1Click(Sender: TObject);
    procedure Timer1Timer(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form3: TForm3;

implementation

{$R *.dfm}


 function TaskBarwidth(handle:hwnd): integer;
var
  hTB: HWND; // taskbar handle
  TBRect: TRect; // taskbar rectangle
begin
  hTB:= handle;
  if hTB = 0 then
    Result := 0
  else begin
    GetWindowRect(hTB, TBRect);
    Result := TBRect.Left- TBRect.Right;
  end;
end;



function TaskBarHeight(handle:hwnd): integer;
var
  hTB: HWND; // taskbar handle
  TBRect: TRect; // taskbar rectangle
begin
  hTB:= handle;
  if hTB = 0 then
    Result := 0
  else begin
    GetWindowRect(hTB, TBRect);
    Result := TBRect.Bottom - TBRect.Top;
  end;
end;




procedure TForm3.Button1Click(Sender: TObject);
var
myhandle:hwnd;
handle2:hwnd;
handle3:hwnd;
begin



myhandle:=FindWindow('shell_traywnd', nil);

if myhandle>0 then

MoveWindow(myhandle,strtoint(edit1.Text), strtoint(edit2.Text),TaskBarwidth(myhandle), TaskBarheight(myhandle), true)

else
showmessage('wont work handle is zero');
end;


procedure TForm3.Button2Click(Sender: TObject);
var
myhandle:hwnd;
begin
myhandle:=FindWindowEx(FindWindow('shell_traywnd', nil), 0, 'traynotifywnd', nil) ;
windows.SetParent(myhandle,0);
end;

procedure TForm3.Timer1Timer(Sender: TObject);
var
miska:tmouse;
begin

  label3.Caption:=inttostr(miska.CursorPos.X);
  label4.Caption:=inttostr(miska.CursorPos.y);
end;

end.
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 07:48 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz