Solved

Quuestion for Viktornet -Forms in different rsolutions

Posted on 1998-10-26
4
180 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
  • 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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

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…
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…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

832 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