如题
解决方案 »
- 那位高手能详细介绍一下delphi的idftpserver控件使用方法。
- delphi 中有类似MFC中的CFileDialog吗?
- 远程服务器的的scktsrvr.exe已运行了.可是我为什么不能连接.请高手指教.
- SQL语句的困惑?
- 请教大家关于ClientDataSet的用法..
- 运用ADO遇到的问题?
- OpenKey(''Software\Microsoft\Windows\CurrentSowft\tag'', True)如果没有这个键码
- olevariant赋值的问题
- delphi向窗口发送汉字的奇怪问题
- foxbase2.1+ ->foxpro2.5 ->Vfoxpro5.0 ->delphi
- 各位兄弟姐妹,进来看看! 我知道了读取JPG图像的分辨率,但却遇到了一点小麻烦!!!!!!
- 一个关于多个服务器切换的问题!(真的很急!,请帮帮忙!)
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls;type
TForm1 = class(TForm)
Panel1: TPanel;
procedure Panel1MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementation{$R *.dfm}
//==============================================================================//任意摆布一个控件(拖动、放大、缩小)******************************************//==============================================================================procedure ManipulateControl(WinControl: TWinControl; Shift: TShiftState; X, Y, Precision: integer);//Precision:精度,该方法可以在onmousemove中调用var SC_MANIPULATE: Word;begin
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//光标在控件的最左侧**********************************************************
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if (X<=Precision) and (Y>Precision) and (Y<WinControl.Height-Precision)
then begin SC_MANIPULATE := $F001;
WinControl.Cursor := crSizeWE;
end //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//光标在控件的最右侧**********************************************************
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
else if (X>=WinControl.Width-Precision) and (Y>Precision) and (Y<WinControl.Height-Precision)
then begin SC_MANIPULATE := $F002;
WinControl.Cursor := crSizeWE;
end
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//光标在控件的最上侧********************************************************** //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
else if (X>Precision) and (X<WinControl.Width-Precision) and (Y<=Precision)
then begin
SC_MANIPULATE := $F003;
WinControl.Cursor := crSizeNS; end
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//光标在控件的左上角**********************************************************
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
else if (X<=Precision) and (Y<=Precision) then begin
SC_MANIPULATE := $F004;
WinControl.Cursor := crSizeNWSE;
end
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //光标在控件的右上角**********************************************************
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
else if (X>=WinControl.Width-Precision) and (Y<=Precision)
then begin
SC_MANIPULATE := $F005; WinControl.Cursor := crSizeNESW ;
end
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//光标在控件的最下侧**********************************************************
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ else if (X>Precision) and (X<WinControl.Width-Precision) and (Y>=WinControl.Height-Precision)
then begin
SC_MANIPULATE := $F006;
WinControl.Cursor := crSizeNS;
end //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//光标在控件的左下角**********************************************************
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
else if (X<=Precision) and (Y>=WinControl.Height-Precision)
then begin SC_MANIPULATE := $F007;
WinControl.Cursor := crSizeNESW;
end
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//光标在控件的右下角********************************************************** //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
else if (X>=WinControl.Width-Precision) and (Y>=WinControl.Height-Precision)
then begin
SC_MANIPULATE := $F008;
WinControl.Cursor := crSizeNWSE; end
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//光标在控件的客户区(移动整个控件)******************************************
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
else if (X>5) and (Y>5) and (X<WinControl.Width-5) and (Y<WinControl.Height-5) then begin
SC_MANIPULATE := $F009;
WinControl.Cursor := crSizeAll;
end
else begin SC_MANIPULATE := $F000;
WinControl.Cursor := crDefault;
end;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if Shift=[ssLeft] then begin
ReleaseCapture;
WinControl.Perform(WM_SYSCOMMAND, SC_MANIPULATE, 0);
end; end;
procedure TForm1.Panel1MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
begin
ManipulateControl((Sender as TWinControl), Shift, X, Y, 10);
end;end.
换什么控件可以实现?