Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Varios
Registrarse FAQ Miembros Calendario Guía de estilo Buscar Temas de Hoy Marcar Foros Como Leídos

Coloboración Paypal con ClubDelphi

Respuesta
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 02-05-2007
Avatar de seoane
[seoane] seoane is offline
Miembro Premium
 
Registrado: feb 2004
Ubicación: A Coruña, España
Posts: 3.717
Poder: 26
seoane Va por buen camino
Cita:
Empezado por kapullok_2006
Hola seone,no puedo descargarme tu archivo.
Puedes ponerlo escrito en este foro? o enviarme el zip a [email protected] sin no es mucho pedir?
El único archivo que he subido a este hilo es Ejemplo 12.zip, y ya se encuentra alojado en el foro como archivo adjunto. He pulsado sobre el enlace y no tengo problemas para bajarlo ...
Responder Con Cita
  #2  
Antiguo 02-05-2007
Avatar de seoane
[seoane] seoane is offline
Miembro Premium
 
Registrado: feb 2004
Ubicación: A Coruña, España
Posts: 3.717
Poder: 26
seoane Va por buen camino
Aunque he pensado que puede que te encuentres detrás de algún proxy que te impide bajar archivos zip.

En cualquier caso, aquí te dejo el archivo pas que esta dentro del zip:
Código Delphi [-]
unit ufrmMain;

interface

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

type
  TfrmMain = class(TForm)
    ScrollBox1: TScrollBox;
    imgPantalla: TImage;
    Panel1: TPanel;
    lbTop: TLabel;
    lbLeft: TLabel;
    lbBottom: TLabel;
    lbRight: TLabel;
    procedure FormCreate(Sender: TObject);
    procedure imgPantallaMouseDown(Sender: TObject; Button: TMouseButton;
      Shift: TShiftState; X, Y: Integer);
    procedure imgPantallaMouseMove(Sender: TObject; Shift: TShiftState; X,
      Y: Integer);
  private
    { Private declarations }
    Seleccion: TRect;
    procedure Seleccionar(R: TRect);
  public
    { Public declarations }
  end;

var
  frmMain: TfrmMain;

implementation

{$R *.dfm}

procedure TfrmMain.Seleccionar(R: TRect);
begin
  imgPantalla.Canvas.Brush.Style:= bsClear;;
  imgPantalla.Canvas.Pen.Style:= psDash;
  imgPantalla.Canvas.Pen.Mode:= pmNot;
  imgPantalla.Canvas.Rectangle(Seleccion);
  imgPantalla.Canvas.Rectangle(R);
  Seleccion:= R;
  if Seleccion.Left > Seleccion.Right then
  begin
    R.Left:= Seleccion.Right;
    R.Right:= Seleccion.Left;
  end;
  if Seleccion.Top > Seleccion.Bottom then
  begin
    R.Top:= Seleccion.Bottom;
    R.Bottom:= Seleccion.Top;
  end;
  if not isRectEmpty(R) then
  begin
    lbTop.Caption:= 'Top = ' + IntToStr(R.Top);
    lbLeft.Caption:= 'Left = ' + IntToStr(R.Left);
    lbBottom.Caption:= 'Bottom = ' + IntToStr(R.Bottom);
    lbRight.Caption:= 'Right = ' + IntToStr(R.Right);
  end else
  begin
    lbTop.Caption:= 'Top = ';
    lbLeft.Caption:= 'Left = ';
    lbBottom.Caption:= 'Bottom = ';
    lbRight.Caption:= 'Right = ';
  end;
end;

procedure TfrmMain.FormCreate(Sender: TObject);
var
  bmp: Tbitmap;
begin
  FillChar(Seleccion,SizeOf(Seleccion),0);
  bmp:= Tbitmap.Create;
  try
    try
      bmp.Width:= GetSystemMetrics(SM_CXSCREEN);
      bmp.Height:= GetSystemMetrics(SM_CYSCREEN);
      BitBlt(bmp.Canvas.Handle,0,0,bmp.Width,bmp.Height,GetDc(0),0,0,SRCCOPY);
      imgPantalla.Picture.Bitmap.Assign(bmp);
    finally
      bmp.free;
    end;
  except end;
end;

procedure TfrmMain.imgPantallaMouseDown(Sender: TObject;
  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
  if Button = mbLeft then
    Seleccionar(Rect(X,Y,X,Y));
end;

procedure TfrmMain.imgPantallaMouseMove(Sender: TObject;
  Shift: TShiftState; X, Y: Integer);
begin
  if ssLeft in Shift then
  begin
    if x < 0 then x:= 0;
    if y < 0 then y:= 0;
    if x > imgPantalla.Width then x:= imgPantalla.Width;
    if y > imgPantalla.Height then y:= imgPantalla.Height;
    Seleccionar(Rect(Seleccion.Left,Seleccion.Top,X,Y));
  end;
end;

end.
Responder Con Cita
  #3  
Antiguo 03-05-2007
kapullok_2006 kapullok_2006 is offline
Miembro
 
Registrado: mar 2007
Posts: 90
Poder: 20
kapullok_2006 Va por buen camino
gracias

gracias Seone,probaré como me va.

Saludos.
Responder Con Cita
Respuesta


Herramientas Buscar en Tema
Buscar en Tema:

Búsqueda Avanzada
Desplegado

Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Como seleccionar campos de una tabla sin saber cuantos van a seleccionar david duarte SQL 7 05-04-2010 21:15:43
Iconos de escritorio Nil API de Windows 9 22-10-2007 20:12:14
Seleccionar parte de una cadena jefraub OOP 5 02-05-2005 22:36:29
Escritorio Delphi silviodp Varios 1 22-10-2004 17:29:10
Fondo de escritorio Tonio Varios 4 13-11-2003 22:58:38


La franja horaria es GMT +2. Ahora son las 20:32:38.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi