BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

screen resolution

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Deployment
View previous topic :: View next topic  
Author Message
Howard Koch
Guest





PostPosted: Tue Jul 11, 2006 8:11 am    Post subject: screen resolution Reply with quote



Hi
I have just tired to install my application on a new xp note book. The app.
was created at 800*600 and the code below has worked for years. Now
regardless of the new pc's screen resolution the app. is way of the screen
and distored. Any help would be much appriciated. If this is wrong group
please advise on correct one.
Thanks

procedure TOpeningScreen.FormCreate(Sender: TObject);
const
ScreenWidth: LongInt = 800;
ScreenHeight: LongInt = 600;
var
OLD_ScreenWidth:longint;
I: Integer;
Temp: TComponent;


begin




scaled := true;
if (screen.width <> ScreenWidth)
then
begin
old_ScreenWidth:= screen.width;
height := longint(height) * longint(screen.height) div ScreenHeight;
width := longint(width) * longint(screen.width) div ScreenWidth;
scaleBy(screen.width, ScreenWidth);

for I := ComponentCount - 1 downto 0 do
begin
with Components[I] do
begin
font.size:=
(screen.width div old_screenwidth) * font.size
end;
end
end;

end;}
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Deployment All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.