Solved

Quuestion for Viktornet -Forms in different rsolutions

Posted on 1998-10-26
4
183 Views
Last Modified: 2010-04-06
Dear Viktornet
I have awarded the points the previous question to boris.
I am asking this question just to award the points to you.
Please answer the question so that i could award the points to you
Regards
venks
ps- I was a little busy and hence not tried out the new code.
I will do it in a day or two and come back
0
Comment
Question by:venks
[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
  • 2
4 Comments
 
LVL 1

Author Comment

by:venks
ID: 1344396
Dear Viktor
I tried out the code and it works perfectly
Please answer soon so that i can award points
regards
venks
0
 
LVL 10

Accepted Solution

by:
viktornet earned 20 total points
ID: 1344397
Thanks Venks!

btw- I didn't receive the code you sent me. I'm wondering why is that. o O

Cheers,
Viktor
0
 
LVL 1

Author Comment

by:venks
ID: 1344398
Dear viktor
The code is as follows


unit Scaler;

     interface

     uses
       Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
     Dialogs;
     const
        ScreenWidth  : Integer = 800; //If you don't want to declare constants
     //you'd have to have a
        ScreenHeight : Integer = 600;//property for each of these two so you can
    // declare it at //designtime
     type
       TScaler = class(TComponent)
       private
         FAllScaled : Boolean;
       protected
         { Protected declarations }
       public
         constructor Create(AOwner : TComponent);override;
         procedure Loaded;override;
       published
         { Published declarations }
       end;
     procedure Register;
     implementation
constructor TScaler.Create(AOwner : TComponent);
begin
  Inherited Create(AOwner);
  fAllScaled := False;
end;
procedure TScaler.Loaded;
begin
  Inherited;
  if not(csDesigning in ComponentState) then
    if Owner is TForm then
    with TForm(Owner) do begin
      Font.Pitch := fpVariable;
      if (not fAllScaled)and((Screen.Width<>ScreenWidth)or(Screen.Height<>ScreenHeight))then
       begin
         Scaled := True;
         AutoScroll := False;
          if Screen.Width < ScreenWidth then
         ScaleBy(Screen.Width, ScreenWidth)
         else ScaleBy(ScreenWidth, Screen.Width);
         fAllScaled := True;
       end;
     end;
end;
procedure Register;
begin
  RegisterComponents('System', [TScaler]);
end;
end.

Once again
Thanks
venks

0
 
LVL 10

Expert Comment

by:viktornet
ID: 1344399
Thanks,...

btw- I got the mail from you.... Once again 10x
0

Featured Post

Independent Software Vendors: 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

Title # Comments Views Activity
update joined tables 2 71
Tvertscrollbox like a whatsapp layout 5 65
enhance the following code 3 50
Delphi Firemonkey send email on Android 1 75
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…
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…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

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