Solved

flip screen

Posted on 2001-06-23
1
2,450 Views
Last Modified: 2010-10-05
how do i flip the screen UPSIDE - DOWN and RETURN it to normal in a button click command?
0
Comment
Question by:stevenglass
1 Comment
 
LVL 3

Accepted Solution

by:
f15iaf earned 100 total points
ID: 6221643
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  ExtCtrls, jpeg;

type
  TForm1 = class(TForm)
    Image1: TImage;
    procedure FormShow(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure Image1Click(Sender: TObject);
  private
    { Private declarations }
  public
    can:Tcanvas;
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.FormShow(Sender: TObject);
var
        y:integer;
begin
        y:=0;
        for y:=0 to can.ClipRect.bottom do
        begin
                image1.Canvas.CopyRect(rect(0,y-1,can.ClipRect.Right,y),can,rect(0,can.ClipRect.bottom-y+1,can.ClipRect.Right,can.ClipRect.bottom-y));
        end;

end;

procedure TForm1.FormCreate(Sender: TObject);
begin
        borderstyle:=bsnone;
        formstyle:=fsstayontop;
        image1.Align:=alclient;
        left:=0;
        top:=0;
        height:=screen.height;
        width:=screen.width;
        can:=Tcanvas.create;
        can.handle:=getdc(0);
end;

procedure TForm1.Image1Click(Sender: TObject);
begin
        close;
end;

end.
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

743 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

10 Experts available now in Live!

Get 1:1 Help Now