Solved

Borderline problem

Posted on 2006-10-19
4
297 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

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

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
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…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

864 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

19 Experts available now in Live!

Get 1:1 Help Now