?
Solved

Borderline problem

Posted on 2006-10-19
4
Medium Priority
?
305 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 28

Accepted Solution

by:
TName earned 1000 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 1000 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses
Course of the Month9 days, 9 hours left to enroll

762 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