Solved

flip screen

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

Suggested Solutions

Title # Comments Views Activity
code issue 8 183
delphi parse string to params 3 155
Moving (cutting/pasting) controls in a TTabbedNotebook... 7 47
TlistView is Really heavy on Android 3 15
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…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

756 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