Solved

Borderline problem

Posted on 2006-10-19
4
299 Views
Last Modified: 2010-04-04
Dear Experts,

You must be probely thinking: Oh no... him again...

But I can't fix this problem on my own, my Delphi knowledge
isn't that great and I don't know nothing about API !!!

In the previous question I have received this good solution
for my flicker problem.

 procedure TMainForm.FullScreen1Click(Sender: TObject);
var dwStyle: Integer;
begin
  dwStyle := GetWindowLong(Handle, GWL_STYLE);
  DisableAlign;
  try
    if ((dwStyle and WS_CAPTION) = 0) then
    begin
      SetWindowPos(Handle, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE or SWP_NOSIZE or SWP_NOZORDER);
      SetWindowLong(Handle, GWL_STYLE, FOldStyle);
      Menu := MainMenu1;
      SetWindowPlacement(Handle, @FWindowPlacement);
      if Stb then
      begin
        MainBar.Show;
        StatusBar1.Checked := True;
        StatusBar2.Checked := True;
      end
      else
      begin
        MainBar.Hide;
        StatusBar1.Checked := False;
        StatusBar2.Checked := False;
      end;
      if Tob then
      begin
        ToolBar.Show;
        ToolBar1.Checked := True;
        ToolBar2.Checked := True;
      end
      else
      begin
        ToolBar.Hide;
        ToolBar1.Checked := False;
        ToolBar2.Checked := False;
      end;
      if Hob then
      begin
        Panel1.Show;
        HostBar.Show;
        HostStatusBar1.Checked := True;
      end
      else
      begin
        Panel1.Hide;
        HostBar.Hide;
        HostStatusBar1.Checked := False;
      end;
      FullScreen1.Checked := False;
      FullScreen2.Checked := False;
    end
    else
    begin
      FOldStyle := dwStyle;
      GetWindowPlacement(Handle, @FWindowPlacement);
      SetWindowLong(Handle, GWL_STYLE, Integer(WS_POPUP or WS_VISIBLE));
      SetWindowPos(Handle, HWND_TOPMOST, 0, 0, Screen.Width, Screen.Height, SWP_DRAWFRAME);
      Menu := nil;
      Mainbar.Hide;
      StatusBar1.Checked := False;
      StatusBar2.Checked := False;
      FullScreen1.Checked := True;
      FullScreen2.Checked := True;
      ToolBar.Show;
      ToolBar1.Checked := True;
      ToolBar2.Checked := True;
      Panel1.Show;
      HostBar.Show;
      HostStatusBar1.Checked := True;
    end;
  finally
    EnableAlign;
  end;
end;

My problem:

When I startup my app and maximize it, you see on the left and right
a thin borderline, and thats good. When I press Ctrl+f to go to Full-
Screen-mode you see the left/right borderline didn't change, and that's good too.
But when I press Ctrl+f to go to the Normal-mode again , a thick left and right borderline appears!!! ...and i want them in FullScreen and Maximize always be
thin.

Can somebody help me with this?

Example on my site:
http://members.home.nl/peterkiers/
press link Download and click on the floppy at the bottom

Kind regards,

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

Accepted Solution

by:
TName earned 250 total points
ID: 17767316
Hi Peter,
I really can't see what you mean, the left and right borders are the same maximized and in full screen mode, and if I return to the normal/small window, the borders look exactly the same as when the application was started.
I might miss something...
But in fullscreen the thickness of the borders will often depend on monitor settings.
What you are seeing in full screen mode are the borders of the scroll box, with ScrollBox1.BorderStyle:=bsNone; you wouldn't see any lateral borders. I also notice a very slight differnce in border thickness between WinXP and Win Classic Style. But I cannot see any significant difference...

0
 
LVL 26

Assisted Solution

by:Russell Libby
Russell Libby earned 250 total points
ID: 17767473
Peter,

I double checked my code and the results, and I  don't see the effect mentioned (WS_BORDER bit set). Can you explain the exact steps you took?

Russell
0
 
LVL 1

Author Comment

by:peterkiers
ID: 17767616
I found the problem.

I have test the example at my work, running WindowNT4.0
and I have test it at home, running WindowsXP

P.
0
 
LVL 1

Author Comment

by:peterkiers
ID: 17767748
So, my problem isn't a problem anymore...

I'll devide the points between Rlliby and TName for there response.

Greetings,

Peter Kiers

0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

856 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