Home > Back-end >  If according to the handle to get the application form of border height and width?
If according to the handle to get the application form of border height and width?

Time:09-22

Such as Windows 7 system under general (25, 3) if it is without borders program returns a function or (0, 0) thank you!

CodePudding user response:

 procedure GetFormBorder (hForm: HWND; Var iBorder iCaption: integer); 
Var
R and R2: TRect;
The begin
GetClientRect (hForm, R);
GetWindowRect (hForm, R2);
IBorder:=(R2) Right - R2) Left - R.R d.light + R.L eft) DIV 2;
ICaption: R2=) Bottom - R2) Top - r. b ottom + R.T op;
end;

CodePudding user response:

reference 1st floor kiboisme response:
 procedure GetFormBorder (hForm: HWND; Var iBorder iCaption: integer); 
Var
R and R2: TRect;
The begin
GetClientRect (hForm, R);
GetWindowRect (hForm, R2);
IBorder:=(R2) Right - R2) Left - R.R d.light + R.L eft) DIV 2;
ICaption: R2=) Bottom - R2) Top - r. b ottom + R.T op;
end;

You can try GetClientRect left and top value is always zero, I don't know why everyone write this function, but it is wrong,

CodePudding user response:

GetSystemMetrics

CodePudding user response:

GetSystemMetrics (SM_CXFULLSCREEN);//the display area width of maximizing the form
GetSystemMetrics (SM_CYFULLSCREEN);//get maximize window display area level

CodePudding user response:

reference 4 floor gyk120 response:
GetSystemMetrics (SM_CXFULLSCREEN);//the display area width of maximizing the form
GetSystemMetrics (SM_CYFULLSCREEN);//get maximize window display area highly

Thank you, could you tell me how to specify a handle? Because of some programs may not have borders

CodePudding user response:

CreateToolhelp32Snapshot
Snapshot with the way traversal process name
Then the EnumWindows

CodePudding user response:


One is found, is that right?

CodePudding user response:

CPUID 0 f31 Pentium4 ah, is this still can run Windows 7 is really not easy, mainly is not memory, 4 gb of memory on the motherboard can basically finished, and no memory performance, only about 1/10 of the new computer now,

CodePudding user response:

@ DelphiGuy
Computer models: HP HP laptop
Operating system: 32-bit Windows 7 ultimate version
Processor: AMD Turion (dragon) X2 dual-core notebook processors
the RM - 75

CodePudding user response:

references 9 f lyhoo163 response:
@ DelphiGuy
Computer models: HP HP laptop
Operating system: 32-bit Windows 7 ultimate version
Processor: AMD Turion (dragon) X2 dual-core RM - 75 notebook processors


Ah, the original is AMD processors, research, and this is about Intel processor performance high frequency Pentium4 HT (3 GHZ +) or PentiumD dual-core levels, now with a somewhat reluctantly,

CodePudding user response:

Is a little too high temperature, AMD is like this, other ok, ready to replace,
  • Related