📄 fununit.pas
字号:
unit fununit;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, shellapi, ADODB;
type
PMydata = ^tmydata;
TMydata = record
FName: string[10];
LName: string[10];
end;
var pifufile: string;
procedure DoadoSql(CurADODS: TADODataSet; SSql: string);
procedure StopSQL(ADODataSet:TADODataSet);
procedure NextTo(key: char; Form: TForm);
function getCurPath: string;
procedure apiexec(action: string; flag: integer);
implementation
procedure DoAdoSql(CurADODS: TADODataSet; SSql: string);
var
oldcur: tcursor;
begin
oldcur := Screen.Cursor;
screen.cursor := crHourGlass;
try
if CurADODS.Active = true then CurADODS.Close;
CurADODS.CommandText := SSql;
CurADODS.Open;
finally
screen.Cursor := oldcur;
end;
end;
procedure StopSQL(ADODataSet:TADODataSet);
Begin
if ADODataSet.Active then
ADODataSet.Close;
End;
procedure NextTo(key: char; Form: TForm);
begin
if key = #13 then
begin
Form.Perform(Wm_NextDlgCtl, 0, 0);
// key:=#0;
end;
end;
function getCurPath: string;
begin
Result := ExtractFilePath(Application.ExeName);
end;
procedure apiexec(action: string; flag: integer);
begin
shellexecute(application.Handle, pchar('open'), pchar(action), pchar(''), pchar(ExtractFilePath(paramstr(0))), flag)
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -