就像windows的信使服务那种,不管你在干什么,他都会弹到最前台,哪位大侠指教
解决方案 »
- 这是事件吗?
- 高分求解!如果把DELPHI上的所有第三方组件打成一个包?
- 我是怎样利用网络赚钱的
- 请问怎样进行时间对比判断?(新手上路,请多指教)
- 遇到trim不能去掉的空格,各位还有办法吗?在线等待!
- 如何知道一个memo里的text有多少行?
- RzGroupBox; RzBitBtn; RzBitBtn; RzBitBtn; RzBitBtn;RzCheckList 这是些什莫组件?
- 这样的sql语句应该怎么写
- 100分,请各位朋友帮忙,adotable这个mastersource和masterfields属性挡住我了
- 我下载
- 请教:TreeView的发生Expanding时(用鼠标展开),怎么才能不触发click事件?
- 菜单设计中如何出现&字符的问题?
function SetSysFocus(hwnd: integer): integer;
var
hOtherWin,OtherTHreadID,hFocusWin:integer;
begin
hOtherWin:=GetForegroundWindow;
OtherThreadID:=GetWindowThreadProcessID(hOtherWin,nil);
if AttachThreadInput(GetcurrentThreadID,OtherThreadID,True) then
begin
hFocusWin:=GetFocus;
windows.SetFocus(hwnd);
//SendMessage(hwnd,WM_COPY,0,0);
if hFocusWin<>0 then
try
//SendMessage(GetFocus,WM_COPY,0,0);
finally
AttachThreadInput(GetCurrentTHreadID,OtherTHreadID,False);
end;
end
else result:=Windows.SetFocus(hwnd);
end;
这样用SetSysFocus(Application.Handle);
就会在最前面了
设置以下属性就可以了
form1.formstyte := fsStayOntop;
BringWindowToTop(YourMainForm.handle);
SetForegroundWindow(YourMainForm.handle);
end;
MainForm的FormStyle:=fsStayOnTop呀