Solved

Quuestion for Viktornet -Forms in different rsolutions

Posted on 1998-10-26
4
182 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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

Suggested Solutions

Title # Comments Views Activity
Delphi Spellcheck in Webbrowser 1 43
Delphi application Soap connection 5 130
How to debug For loops? 3 60
tvirtualstringtree freeze when load too manny images 10 79
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…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

679 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