Solved

Borderline problem

Posted on 2006-10-19
4
296 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

744 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

16 Experts available now in Live!

Get 1:1 Help Now