delphi的窗口属性中居然没有句柄,请问有没有简便的方法得到,不想用api函数,我想delphi本身应该有提供的内部方法,不会为了节省资源就这样屏蔽了吧

解决方案 »

  1.   

    Form1.Handle ,就是窗口的句柄
      

  2.   

    rovides access to the underlying Windows screen object for the control.Delphi syntax:property Handle: HWND;C++ syntax:__property HWND Handle = {read=GetHandle, nodefault};DescriptionThe Handle property returns the window handle for the underlying Microsoft Windows screen object. Use the Handle property to bypass the VCL API and directly access the underlying window.Do not refer to the Handle property during component creation or streaming. The underlying window does not exist until the first time the Handle property is referenced. When this occurs, the HandleNeeded method is called automatically.Handle is a read-only property.
      

  3.   

    The Handle property returns the window handle for the underlying Microsoft Windows screen object.
    这怎么理解啊,像Tbutton之类从twincontrol衍生出来的组件都是有句柄啊对不对,难道它们都是Windows screen object.不理解
      

  4.   

    怎么没有句柄啊,handle不是吗??
      

  5.   

    delphi的窗口属性中居然没有句柄,
    ??????????????不会吧,
    你用 SPY++ 看看,
    不过用 Delphi 做的,你可能会见到两个