1、如何拦截到打印接口的数据
2.最近使用一个软件,有一个加密狗。它是装在打印接口上的。请问定种加狗的工作原理一般是什么
2.最近使用一个软件,有一个加密狗。它是装在打印接口上的。请问定种加狗的工作原理一般是什么
解决方案 »
- 用delphi如何检索和更新带image字段的sqlserver数据库的记录
- TVirtualStringTree 的loadfromstream 的问题
- pascal对文件操作中有没有删除记录的函数啊?如何才能实现删除文件中的记录呢?
- TXMLDocument SetAttributeNS,属性值为中文,生成的XML文件,属性值是乱码,为什么?
- 计算机应用自考生如何向程序员转型?
- 动态创建WEBBROWSER的问题
- 请问怎么获知一个库里面有那些用户表?
- 请问DELPHI中能不能实现象POWERBUILDER中的FREE FROM型的数据窗口格式?
- delphi6的d版有谁见到过没有
- 断网后数据库重连可以做到,但是断网前的数据库连接还在,怎么解决??
- DBISAM问题
- 用什么API可以将一个Modal窗体的变为非Modal窗体!?
截获滚动条消息
type{$IFDEF WIN32}WParameter = LongInt;{$ELSE}WParameter = Word;{$ENDIF}LParameter = LongInt;{Declare a variable to hold the window procedure we are replacing}varOldWindowProc : Pointer;function NewWindowProc(WindowHandle : hWnd;TheMessage : WParameter;ParamW : WParameter;ParamL : LParameter) : LongInt{$IFDEF WIN32} stdcall; {$ELSE} ; export; {$ENDIF}varTheRangeMin : integer;TheRangeMax : integer;TheRange : integer;beginif TheMessage = WM_VSCROLL then begin{Get the min and max range of the horizontal scroll box}GetScrollRange(WindowHandle,SB_HORZ,TheRangeMin,TheRangeMax);{Get the vertical scroll box position}TheRange := GetScrollPos(WindowHandle,SB_VERT);{Make sure we wont exceed the range}if TheRange < TheRangeMin thenTheRange := TheRangeMin elseif TheRange > TheRangeMax thenTheRange := TheRangeMax;{Set the horizontal scroll bar}SetScrollPos(WindowHandle,SB_HORZ,TheRange,true);end;if TheMessage = WM_HSCROLL then begin{Get the min and max range of the horizontal scroll box}GetScrollRange(WindowHandle,SB_VERT,TheRangeMin,TheRangeMax);{Get the horizontal scroll box position}TheRange := GetScrollPos(WindowHandle,SB_HORZ);{Make sure we wont exceed the range}if TheRange < TheRangeMin thenTheRange := TheRangeMin elseif TheRange > TheRangeMax thenTheRange := TheRangeMax;{Set the vertical scroll bar}SetScrollPos(WindowHandle,SB_VERT,TheRange,true);end;{ Call the old Window procedure to }{ allow processing of the message. }NewWindowProc := CallWindowProc(OldWindowProc,WindowHandle,TheMessage,ParamW,ParamL);end; procedure TForm1.FormCreate(Sender: TObject);begin{ Set the new window procedure for the control }{ and remember the old window procedure. }OldWindowProc := Pointer(SetWindowLong(ScrollBox1.Handle,GWL_WNDPROC,LongInt(@NewWindowProc)));end;procedure TForm1.FormDestroy(Sender: TObject);begin{ Set the window procedure back }{ to the old window procedure. }SetWindowLong(ScrollBox1.Handle,GWL_WNDPROC,LongInt(OldWindowProc));end;