Source code of file oscpmwin_v0.1.1.652/pimgzoom.pas from the
osCommerce Product Manager for Windows.
0000: {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0001: osCommerce Product Manager for Windows (oscpmwin).
0002: Copyright �2003,2004,2005 by Mario A. Valdez-Ramirez.
0003:
0004: You can contact Mario A. Valdez-Ramirez
0005: by email at mario@mariovaldez.org or paper mail at
0006: Olmos 809, San Nicolas, NL. 66495, Mexico.
0007:
0008: This program is free software; you can redistribute it and/or modify
0009: it under the terms of the GNU General Public License as published by
0010: the Free Software Foundation; either version 2 of the License, or (at
0011: your option) any later version.
0012:
0013: This program is distributed in the hope that it will be useful, but
0014: WITHOUT ANY WARRANTY; without even the implied warranty of
0015: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
0016: General Public License for more details.
0017:
0018: You should have received a copy of the GNU General Public License
0019: along with this program; if not, write to the Free Software
0020: Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
0021: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0022: unit pimgzoom;
0023:
0024: interface
0025:
0026: uses
0027: Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
0028: Dialogs, ComCtrls, ExtCtrls;
0029:
0030: type
0031: Topm_Form_ImageZoom = class(TForm)
0032: opm_Image_ZoomImage: TImage;
0033: procedure opm_Image_ZoomImageClick(Sender: TObject);
0034: procedure FormShow(Sender: TObject);
0035: procedure FormCreate(Sender: TObject);
0036: procedure FormDeactivate(Sender: TObject);
0037: procedure FormActivate(Sender: TObject);
0038: procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
0039: private
0040: { Private declarations }
0041: public
0042: end;
0043:
0044: var
0045: opm_Form_ImageZoom: Topm_Form_ImageZoom;
0046:
0047: implementation
0048:
0049: uses gnugettext, pedit, main, oscpmdata, balloons, attention;
0050:
0051: {$R *.dfm}
0052:
0053:
0054:
0055: {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0056: {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0057: procedure Topm_Form_ImageZoom.opm_Image_ZoomImageClick(Sender: TObject);
0058: begin
0059: opm_Form_ImageZoom.Close;
0060: end;
0061:
0062: {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0063: {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0064: procedure Topm_Form_ImageZoom.FormShow(Sender: TObject);
0065: begin
0066: opm_Form_ImageZoom.Left := opm_Form_PEdit.Left + 20;
0067: opm_Form_ImageZoom.Top := opm_Form_PEdit.Top + 20;
0068: opm_Form_ImageZoom.ClientWidth := opm_Image_ZoomImage.Picture.Width;
0069: opm_Form_ImageZoom.ClientHeight := opm_Image_ZoomImage.Picture.Height;
0070: end;
0071:
0072: {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0073: {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0074: procedure Topm_Form_ImageZoom.FormCreate(Sender: TObject);
0075: begin
0076: opm_Image_ZoomImage.Cursor := crHandPoint;
0077: TranslateComponent (self);
0078: end;
0079:
0080: {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0081: {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0082: procedure Topm_Form_ImageZoom.FormDeactivate(Sender: TObject);
0083: begin
0084: opm_Form_ImageZoom.Close;
0085: PRopm_Sound ('RestoreDown', opmG_UISilent);
0086: end;
0087:
0088: {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0089: {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0090: procedure Topm_Form_ImageZoom.FormActivate(Sender: TObject);
0091: begin
0092: opm_Form_ImageZoom.Left := opm_Form_PEdit.Left + 20;
0093: opm_Form_ImageZoom.Top := opm_Form_PEdit.Top + 20;
0094: end;
0095:
0096: {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0097: {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0098: procedure Topm_Form_ImageZoom.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
0099: begin
0100: opm_Form_ImageZoom.Close;
0101: end;
0102:
0103: end.