各位大哥,如何在delphi中调用API函数呀???!!
  请给出个例子吧
  谢谢各位大哥了

解决方案 »

  1.   

    直接调用就行了,给你一个过程吧:
    procedure createshadowform(moForm:TForm;M_Panel:TPanel;M_Label:TLabel);
    var
        hRgn,temprgn:LongInt;
        top_s,left_s:Integer;
    Begin
        left_s:=M_Label.Left-M_Panel.Left;
        top_s:=M_Label.top-M_Panel.top;
        temprgn:=Createrectrgn(M_Panel.Left,M_Panel.top,
                               M_Panel.Left+M_Panel.Width,M_Panel.top+M_Panel.Height);
        hRgn:=temprgn;
        temprgn:=Createrectrgn(M_Panel.Left+M_Panel.Width,M_Label.top,
                               M_Label.Left+M_Label.Width,M_Label.top+M_Label.Height);
        combinergn(hrgn,hrgn,temprgn,rgn_or);
        temprgn:=Createrectrgn(M_Label.Left,M_Panel.top+M_Panel.Height,
                               M_Label.Left+M_Label.Width,M_Label.top+M_Label.Height);
        combinergn(hrgn,hrgn,temprgn,rgn_or);
        SetWindowRgn(moForm.Handle,hRgn,False);
    End;
    Createrectrgn、combinergn、SetWindowRgn都是
    实在不行的api就加uses Shellapi;
      

  2.   

    注意引用
    use
      windows,...
      

  3.   

    大多数的API函数都被封装在windows.pas单元中,只要uses windows就可以调用。
      

  4.   

    直接调用,在uses 中添加windows就行了。