记得use WinSvc; //------------------------------------- // 获取某个系统服务的当前状态 // // return status code if successful // -1 if not // // return codes: // SERVICE_STOPPED // SERVICE_RUNNING // SERVICE_PAUSED // // following return codes are used to indicate t…
delphi 判断是否出现滚动条     if (GetWindowlong(Stringgrid1.Handle, GWL_STYLE) and WS_VSCROLL) <> 0 then    ShowMessage('Vertical scrollbar is visible!');  if (GetWindowlong(Stringgrid1.Handle, GWL_STYLE) and WS_HSCROLL) <> 0 then    ShowMessage('Horiz…
Delphi 判断TImage是否为空:1)非空 Image1.Picture.Graphic <> nil2)为空 Image1.Picture.Graphic = nil注意不能用Image1.Picture 来判断. Image1.Picture.Graphic即可直接赋值也可用Assign.Image1.Picture不能直接赋值,只能用Assign. Image1.Picture.Graphic  可包含多种格式的图像.Image1.Picture.Bitmap仅包含Bitmap图像…
Delphi 判断按键状态 http://blog.sina.com.cn/s/blog_54da9cc001015di1.html (2012-04-05 14:22:50) 标签: 杂谈 分类: Delphi 调用GetKeyState(nVirtKey:integer)函数,可以判断是否按下了Alt.Ctrl.Shift键,如果函数返回值<0则表示按下了. 参数: nVirtKey     指定一个键.如果指定字母或数字键,nVirtKey 必须为该字符的 ASCII 码值.如:判断‘a’…
转]delphi判断MDI窗体的子窗体是否存在//***************************************************************************//函 数 名: CreateForm//返 回 值: boolean//参 数: TForm//功 能: 判断MDI窗体的子窗体是否存在//***************************************************************************func…
1.设置某项单选input为选中状态: $("input[type='radio']").eq(1).attr('checked',true); ②也可设其属性checked为'checked',设置完后原选中项会自动取消选中 $("input[type='radio']").eq(1).attr('checked','checked'); 2.判断某单选框是否被选中状态: ❶ 使用object.attr('checked')==true是错的,应使用object.…
首先,我们先来认识下CreateFile函数,它的原型如下   HANDLE CreateFile( LPCTSTR lpFileName,    //指向文件名的指针 DWORD dwDesiredAccess,   //访问模式(写/读) DWORD dwShareMode,   //共享模式 LPSECURITY_ATTRIBUTES lpSecurityAttributes,//指向安全属性的指针 DWORD dwCreationDisposition,   //如何创建 DWORD d…
首先,我们先来认识下CreateFile函数,它的原型如下   HANDLE CreateFile( LPCTSTR lpFileName,    //指向文件名的指针 DWORD dwDesiredAccess,    //访问模式(写/读) DWORD dwShareMode,    //共享模式 LPSECURITY_ATTRIBUTES lpSecurityAttributes, //指向安全属性的指针 DWORD dwCreationDisposition,   //如何创建 DWOR…
相关资料:http://www.delphitop.com/html/xiancheng/376.html unit Unit1; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls; type TMyThread = cla…
判断一个数组的长度用 Length 还是 SizeOf ?最近发现一些代码, 甚至有一些专家代码, 在遍历数组时所用的数组长度竟然是 SizeOf(arr); 这不合适! 如果是一维数组.且元素大小是一个字节, 这样用看不出错误, 譬如:  -------------------------------------------------------------------------------- vararr1: array[0..9] of Char;arr2: array[0..9] o…