Solved

Form borders disappear

Posted on 2006-07-08
3
234 Views
Last Modified: 2010-04-05
HI,

When I resize my form you see the left en right border, but when I maximize the form
the left and right border dissappear.

I have tried to set de borderwidth of the form to 1, but even with borderwidth = 1
the borders disappear when the form is maximized.

Does anyone know a solution?

Peter
0
Comment
Question by:peterkiers
  • 2
3 Comments
 
LVL 28

Accepted Solution

by:
2266180 earned 250 total points
ID: 17064314
all borders "dissapear" when maximizing. they actually have negative coordonates.
if you want to also see the borders, you need to simulate the maximize or intercept it and modify the sizes.

here is an example for intercepting:

unit Unit1;

interface

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

type
  TForm1 = class(TForm)
    procedure FormResize(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
    resizing:boolean;
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.FormResize(Sender: TObject);
begin
  if (not resizing) and (left<0) then
  begin
    resizing:=true;
    width:=width-9;
    left:=0;
    height:=height-9;
    top:=0;
//    width:=width+1;
    resizing:=false;
  end;{}
end;

end.
0
 
LVL 28

Expert Comment

by:2266180
ID: 17064319
ups. uncomment the
//    width:=width+1;
0
 
LVL 1

Author Comment

by:peterkiers
ID: 17064580
Thank you it works.

P.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now