Solved

flip screen

Posted on 2001-06-23
1
2,462 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
[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
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

Technology Partners: 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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…

690 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