Solved

Borderline problem

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

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…
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…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

738 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