WCM Forum

WCM Forum (http://www.wcm.at/forum/index.php)
-   Programmierung (http://www.wcm.at/forum/forumdisplay.php?f=17)
-   -   Delphi Frage (http://www.wcm.at/forum/showthread.php?t=62931)

Chefetage 14.07.2002 15:36

Delphi Frage
 
Weiss jemand einen code wie ich in Delphi ein Formular machen kann aus dem man nicht mit der Maus rausfahren kann???

Danke
mfg Christoph

irrsinn 16.07.2002 10:03

ein ansatzpunkt wär auf jeden fall das onmouse ereignis vom formular. glaub das heißt so. hab leider momentan kein delphi installiert.

dann wirds irgendwie mit api funktionen weitergehn. schau dir die SDK hilfe durch. vielleicht findest da was brauchbares. möglicherweise kommt auch mir in meinem chaos am schreibtisch was derartiges unter.

mal sehn...

PredeX 16.07.2002 11:42

Such mal in der Hilfe nach einer window Funktion, in Pascal gibts nämlich sowas, nur bin ich mir jetzt ned sicher wie das in Delphi hinhaut... (hab nämlich momentan auch kein Delphi installiert :) )

PredeX

Yoghurt 17.07.2002 17:04

So sollte es funktionieren (verwende das leicht abgewandelt in einem Spiel)...

procedure TForm1.LockMouse;
var
CursorClipArea : TRect;
ImageOriginInScreenCoordinates : TPoint;
begin
ImageOriginInScreenCoordinates :=
ClientToScreen( Point(Form1.Left,
Form1.Top) );

CursorClipArea := Bounds(ImageOriginInScreenCoordinates.X,
ImageOriginInScreenCoordinates.Y,
Form1.Width, Form1.Height);

Windows.ClipCursor(@CursorClipArea);
end;

procedure TForm1.UnlockMouse;
begin
Windows.ClipCursor(nil);
end;

lg Yoghurt


Alle Zeitangaben in WEZ +2. Es ist jetzt 18:25 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© 2009 FSL Verlag