如何做打印,餐饮软件,分凉菜、热菜、酒水三个地方三台打印机,100分,如果分不够,以后有分再加 客人点完菜后,将菜单分送到各个地方(凉菜、热菜、酒水)打印机上打印出来。请问用程序怎么写来控制打印,怎样设置打印机,改变默认打印机吗?需要每个包厢里的电脑都安装这三台打印机的驱程吗?如果分不够,以后有分再加!!! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 动态改变Windows的默认打印机在窗体中加入combobox和两个buttonprocedure TForm1.Button1Click(Sender: TObject);begin ComboBox1.Items := Printer.Printers; {populates ComboBox} ComboBox1.ItemIndex := Printer.PrinterIndex; {sets display to current printer}end;procedure TForm1.Button2Click(Sender: TObject);var Device: array[0..255] of Char; Driver: array[0..255] of char; Port: array[0..255] of char; s : array[0..255] of Char; hDeviceMode: THandle;begin Printer.PrinterIndex := ComboBox1.ItemIndex; Printer.GetPrinter (Device, Driver, Port, hDeviceMode); StrCopy (s, Device); StrCat (s, ','); StrCat (s, Driver); StrCat (s, ','); StrCat (s, Port); WriteProfileString ('windows', 'device', s); StrCopy (s, 'windows'); SendMessage (HWND_BROADCAST, WM_WININICHANGE, 0, LongInt(@s));end;http://community.csdn.net/Expert/topic/4003/4003262.xml?temp=.7327997 插入数据线没有打开usb存储设备选项 求梦幻西游屏幕汉字识别代码 在一个树型记录的表中,怎么判断在当级的记录关键字(Code)是唯一的呢? 关于Delphi中如何得到Request值的问题! 高手请相救,8M内存,Win95的机子上是用BDE快吗?我用ADO很慢啊!如何优化提高速度 如何将WAVE文件用内存映射再进行播放?(这样做是想避免频繁读取硬盘,加快播放速度) 高分请你来看看网上找不到解决方法的问题!! 快速查找定位XML节点的问题 蛇精病了了 如何调用远程的com+组件???? 晕 Delphi 不能更改文件名吗? 求助!!关于checkbox控件的使用!!
在窗体中加入combobox和两个button
procedure TForm1.Button1Click(Sender: TObject);
begin
ComboBox1.Items := Printer.Printers; {populates ComboBox}
ComboBox1.ItemIndex := Printer.PrinterIndex; {sets display to current printer}
end;procedure TForm1.Button2Click(Sender: TObject);
var
Device: array[0..255] of Char;
Driver: array[0..255] of char;
Port: array[0..255] of char;
s : array[0..255] of Char;
hDeviceMode: THandle;begin Printer.PrinterIndex := ComboBox1.ItemIndex;
Printer.GetPrinter (Device, Driver, Port, hDeviceMode);
StrCopy (s, Device);
StrCat (s, ',');
StrCat (s, Driver);
StrCat (s, ',');
StrCat (s, Port);
WriteProfileString ('windows', 'device', s);
StrCopy (s, 'windows');
SendMessage (HWND_BROADCAST, WM_WININICHANGE, 0, LongInt(@s));end;http://community.csdn.net/Expert/topic/4003/4003262.xml?temp=.7327997