怎么根据程序名去捕获程序的窗口句柄?(100分)

  • 主题发起人 主题发起人 yanjian99
  • 开始时间 开始时间
Y

yanjian99

Unregistered / Unconfirmed
GUEST, unregistred user!
如题,请麻烦给源码。谢谢
 
try<br>&nbsp; &nbsp; try<br>&nbsp; &nbsp; &nbsp; Acad := GetActiveOleObject('Autocad.Application');<br>&nbsp; &nbsp; except<br>&nbsp; &nbsp; &nbsp; on EOleSysError do<br>&nbsp; &nbsp; &nbsp; &nbsp; Acad := CreateOleObject('Autocad.Application');<br>&nbsp; &nbsp; end;<br>&nbsp; except<br>&nbsp; &nbsp; halt;<br>&nbsp; end;<br><br>&nbsp; Acad.Visible := True;<br>&nbsp; Title := Acad.Caption;<br>&nbsp; acad_Hwnd := Findwindow(nil, PChar(Title));<br>&nbsp; ShowWindow(ACAD_HWND, SW_SHOWMAXIMIZED);<br>&nbsp; SetForegroundWindow(ACAD_HWND);
 
后退
顶部