procedure TForm1.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
FreeMem(FDevice, 128);
FreeMem(FDriver, 128);
FreeMem(FPort, 128);
FPaperNames.Free;
end;
procedure TForm1.Button4Click(Sender: TObject);
begin
AddCustomPaper(Edit1.Text,SpinEdit1.Value,SpinEdit2.Value);
MessageBox(handle,'创建成功,如果在列表中看不到(重新运行后),'#13#10'说明当前打印机不支持这种纸型。','系统提示',MB_ICONWARNING);
end;
procedure TForm1.Button5Click(Sender: TObject);
begin
if ListBox2.ItemIndex = -1 then
begin
MessageBox(handle,'请选择要删除的打印纸!','系统提示',MB_ICONWARNING);
exit;
end;
if MessageBox(handle,'删除后将无法恢复,请确认删除?','系统提示',MB_ICONQUESTION+MB_YESNO )= IDNO then
exit;
DeleteCustomPaper(ListBox2.Items.Strings[ListBox2.ItemIndex]);
Button2Click(Sender);
end;
procedure TForm1.Button6Click(Sender: TObject);
begin
Close;
end;
procedure TForm1.Label7Click(Sender: TObject);
begin
ShellExecute(0,'Open','http://www.tansoo.cn', nil,nil,SW_RESTORE);
end;