Skip to content

Instantly share code, notes, and snippets.

@huacnlee
Created September 6, 2010 03:34
Show Gist options
  • Save huacnlee/566609 to your computer and use it in GitHub Desktop.
Save huacnlee/566609 to your computer and use it in GitHub Desktop.
//声明
GetLocalTime(
var lpSystemTime: TSystemTime {TSystemTime 结构}
); {无返回值}
//设置本地时间
SetLocalTime(
const lpSystemTime: TSystemTime {TSystemTime 结构}
): BOOL;
//SetSystemTime 设置的是格林尼治时间
SetSystemTime(
const lpSystemTime: TSystemTime {TSystemTime 结构}
): BOOL;
//TSystemTime 是 _SYSTEMTIME 结构的重定义:
_SYSTEMTIME = record
wYear: Word; {年}
wMonth: Word; {月}
wDayOfWeek: Word; {周}
wDay: Word; {日}
wHour: Word; {时}
wMinute: Word; {分}
wSecond: Word; {秒}
wMilliseconds: Word; {毫秒}
end;
Create Table GameGroup_tbl (ID COUNTER PRIMARY KEY,
GameName CHAR(50),
GroupID INT DEFAULT 0,
RunWay INT DEFAULT 0)
uses Windows;
function MessageBoxTimeOut; external user32 name 'MessageBoxTimeoutA';
function MessageBoxTimeOutA; external user32 name 'MessageBoxTimeoutA';
function MessageBoxTimeOutW; external user32 name 'MessageBoxTimeoutW';
function NumberSort(List: TStringList; Index1, Index2: Integer): Integer;
var
Value1,Value2:Integer;
begin
Value1:=StrToInt(List[Index1);
Value2:=StrToInt(List[Index2]);
if Value1>Value2 then
Result:=-1
else if Value1<Value2 then
Result:=1
else
Result:=0;
end;
// 再设置:sList.CustomSort(NumberSort);
//之后出来的sList就是排序后的结果了.
procedure TForm1.FormCreate(Sender: TObject);
var
ExtendedStyle:integer;
begin
ExtendedStyle:=windows.GetWindowLong(Application.Handle,GWL_EXSTYLE);
SetWindowLong(Application.Handle,GWL_EXSTYLE,ExtendedStyle or 128);
windows.SetWindowPos(Handle,HWND_TOPMOST,0,0,Width,Height,SWP_SHOWWINDOW or SWP_NOMOVE );
end;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment