program taskbar;(来自于刘麻子的代码)<br><br>{$R taskbar.res}<br><br>uses<br>Windows,shellapi;<br><br>const<br> ClassName = 'LiuMaZi'; //窗体类名<br> WindowsName = 'LoveLiuMazi';//窗体标题<br> WM_COMMAND = $0111; //单击菜单项消息<br> WM_LBUTTONDOWN = $0201; //鼠标左键单击消息<br> WM_TIMER = $0113; //计时器函数<br> WM_KEYFIRST = $0100; //第一个键盘消息<br> WM_KEYLAST = $0108; //最后一个键盘消息<br> WM_MOUSEFIRST = $0200; //第一个鼠标消息<br> WM_MOUSELAST = $020A; //最后一个鼠标消息<br> WM_MyTray = $0800; //自定义消息,用于响应托盘操作<br><br> var<br> MyMessage : TMsg; //消息结构<br> WinClass : TWndClass; //窗体类结构<br> WinHandle : hWnd; //窗体句柄<br> PopupMenu : hMenu; //菜单句柄<br> MousePos : TPoint; //鼠标位置<br> IconData : TNotifyIconData; //托盘结构<br> Count : integer; //累计经过的时间<br> state : Boolean=True; //当前状态,True为在线,False为离开<br> NextHook : LongWord;<br><br>function WndProc(WinH : hWnd; WinMsg,WParam,LParam : Longint): Integer; StdCall;<br>begin<br>result:=0;<br><br>end;<br><br><br>begin<br><br> if findwindow(Pchar(ClassName),Pchar(WindowsName))<>0 then<br> MessageBox(0,'程序已运行.....^_^ ','',MB_OK)<br> else<br> begin<br> With WinClass do<br> Style := 0; {类风格}<br> lpfnWndProc := @WndProc; {窗口过程}<br> cbClsExtra := 0; {额外类信息}<br> cbWndExtra := 0; {额外窗口信息}<br> hIcon := 0; {图标}<br> hCursor := 0; {光标}<br> hbrBackground := 0; {颜色}<br> lpszMenuName := nil; {菜单}<br> lpszClassName := ClassName;{类名称}<br> hInstance:=GetModuleHandle(nil);{实例句柄}<br> end;<br> RegisterClass(WinClass);<br> end;<br><br>end.<br>请哪位富翁给我调试一下.<br>谢谢.