Delphi获取默认打印机名称及端口 在前段时间写的收银系统中由于目前市场上很多电脑主板上已经没有并口,而POS机却又需要并口,所以目前需要用PCI转接卡,这个就导致不同门店使用的端口就有可能不同,这就给我们程序中弹出钱箱的指令带来一定的难度.所以就通过获取Window自带的默认,得出打印机信息. 在Windows文件下有个win.ini,里面自带默认打印机的信息.通过调用API函数Getprofilestring这个函数获取打印机信息. 在界面上拖个button,在其单击事件中写: pro
引用js<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=百度申请的ak"></script>//html5获取经纬度 function GetLocation() { if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(showPosition);
获取属性名:PropertyNameHelper namespace NCS.Infrastructure.Querying { public static class PropertyNameHelper { public static string ResolvePropertyName<T>(Expression<Func<T, object>> expression) { var expr = expression.Body as MemberExpressio
C#获取窗口,模拟按键操作,实现计算器模拟操作.首先引用. using System.Runtime.InteropServices; 使用DllImport引入两个函数: // Get a handle to an application window. [DllImport("USER32.DLL", CharSet = CharSet.Unicode)] public static extern IntPtr FindWindow(string lpClassName, stri