PAG_Promax
asked on
Need to resize a form where Borderstyle = bsNone
Hi there,
Can anyone tell me how I can resize a form when the BorderStyle = bsNone ?
Thanks!
Pag.
Can anyone tell me how I can resize a form when the BorderStyle = bsNone ?
Thanks!
Pag.
ASKER
Hi sun4sunday,
I'm not sure what you mean? I need to be able to resize the form just like you can when the BorderStyle := bsSingle. I need to grab it at runtime and move it around.
Cheers,
Pag
I'm not sure what you mean? I need to be able to resize the form just like you can when the BorderStyle := bsSingle. I need to grab it at runtime and move it around.
Cheers,
Pag
Take a look at the code from this PAQ:
https://www.experts-exchange.com/questions/21015588/resize-borderless-form.html
regards
https://www.experts-exchange.com/questions/21015588/resize-borderless-form.html
regards
>> I need to grab it at runtime and move it around.<< This means moving the form ... not resizing...
For moving the form without using the captionbar place this in the form onmousedown event:
procedure TForm1.FormMouseDown(Sende r: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
ReleaseCapture;
Perform(WM_SYSCOMMAND, SC_MOVE + 1, 0);
end;
For moving the form without using the captionbar place this in the form onmousedown event:
procedure TForm1.FormMouseDown(Sende
Shift: TShiftState; X, Y: Integer);
begin
ReleaseCapture;
Perform(WM_SYSCOMMAND, SC_MOVE + 1, 0);
end;
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks guys, I don't have a problem with moving the form. That functionality works fine. Resizing is what Im talking about.
Will try Mishu's suggestion now.
Cheers,
Pag
Will try Mishu's suggestion now.
Cheers,
Pag
ASKER
Thanks for that, Mishu! That worked fine.
Cheers,
Pag
Cheers,
Pag
eg: place under on click event of a button to test
BorderStyle := bsNone;
Form1.Width := 300;
Form1.Height := 300;
When the BorderStyle := bsNone then the form will not have any borders and has to controll through some actions
sun4sunday