ychatu27.pas
来自「Yahoo Messenger for Mobile」· PAS 代码 · 共 66 行
PAS
66 行
unit YchatU27;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, DynamicSkinForm,Ychatu1, SkinCtrls, SkinBoxCtrls;
type
TForm27 = class(TForm)
ListBox1: TspSkinListBox;
procedure ListBox1DrawItem(Control: TWinControl; Index: Integer;
Rect: TRect; State: TOwnerDrawState);
procedure ListBox1ListBoxDblClick(Sender: TObject);
procedure ListBox1ListBoxMouseDown(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form27: TForm27;
implementation
{$R *.dfm}
procedure TForm27.ListBox1DrawItem(Control: TWinControl; Index: Integer;
Rect: TRect; State: TOwnerDrawState);
begin
with TListBox(Control).Canvas do
begin
FillRect(Rect);
Rect.Left := Rect.Left + 24;
DrawText(TListBox(Control).Canvas.Handle,
PChar(TListBox(Control).Items[Index]), -1, Rect, DT_VCENTER or DT_SINGLELINE);
end;
end;
procedure TForm27.ListBox1ListBoxDblClick(Sender: TObject);
begin
Form1.GetPmWindow(Form27.ListBox1.Items[Form27.ListBox1.ItemIndex]);
end;
procedure TForm27.ListBox1ListBoxMouseDown(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
var
Pon : TPoint;
Pos: Integer;
begin
{If SSShift in Shift Then
Exit;}
If Shift=[ssRight] Then
Begin
Pon.x := X;
Pon.y := Y;
Pos:=ListBox1.ItemAtPos(Pon,True);
ListBox1.ItemIndex :=Pos;
End;
end;
end.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?