How to move the form that does not have a title

xiaoxiao2021-03-06  40

★, how to move the form that does not have a title

△ "Download" system, let him think that the title is the title of the form: the following statement is made in the form of the Formate definition:

Procedure Wmnchittest (VAR M: twmnchittest); Message WM_NCHITTEST;

Implementation of functions:

Procedure TFORM1.WMNCHITTEST

VAR M: twmnchittest;

Begin

inherited;

IF m.result = htclient

THEN

M.Result: = HTCAPTION;

END;

△ Simple method is this: add such a statement in the onmousemove event of the form (or other visual control):

IF (SSLEFT

in shift

Then Begin

Releasecapture;

Perform (WM_SYSCOMMAND, $ F012, 0);

END;

And this method is more flexible than the previous one.

转载请注明原文地址:https://www.9cbs.com/read-78796.html

New Post(0)