Full screen

Hi,

How can I make a TMS Form full screen. The code I am use for basic Delphi forms is:

{$J+} // writeable constants on
const
  rect: TRect = (Left: 0; Top: 0; Right: 0; Bottom: 0);
  ws: TWindowState = wsNormal;
{$J-} // writeable constants off
var
  I: Integer;
  r: TRect;
begin

  // Make the screen full screen.
  if BorderStyle <> bsNone then
  begin
    ws := WindowState;
    rect := BoundsRect;

    BorderStyle := bsNone;
    r := Screen.MonitorFromWindow(Handle).BoundsRect;
    SetBounds(r.Left, r.Top, r.Right - r.Left, r.Bottom - r.Top);
  end
  else
  begin
    BorderStyle := bsSizeable;
    if ws = wsMaximized then
      WindowState := wsMaximized
    else
      SetBounds(rect.Left, rect.Top, rect.Right - rect.Left,
        rect.Bottom - rect.Top);
  end;

But when I use this code for a TMS form I still see some kind of border. Any suggestions what the problem might be?

Thanks in advance

What do you refer to as "TMS Form"?
Do you refer to TAdvToolBarForm?

If so, what style is used for this form?

Hi Bruno,

The form I am talking about is a TStyleForm and the style used is tsOffice2003Blue