这个代码
Var
h:Hwnd;
begin
If CheckBox1.Checked then
Begin
h:=FindWindow(Nil,PWideChar(ComboBox1.Text));
SetWindowPos(h,HWND_TOPMOST,0,0,0,0,SWP_NOSIZE + SWP_NOMOVE)
end
Else
Begin
h:=FindWindow(Nil,PWideChar(ComboBox1.Text));
SetWindowPos(h,HWND_NOTOPMOST,0,0,0,0,SWP_NOSIZE + SWP_NOMOVE);
End;
end;
好像有语法错误有哪位能帮我看下啊
h:=FindWindow(Nil,PWideChar(ComboBox1.Text));
运行到这就错了
H:=FindWindow(Nil , 'XX');
不是这样的吗哪错了
还是ComboBox1.Text不能直接写上去啊
Var
h:Hwnd;
begin
If CheckBox1.Checked then
Begin
h:=FindWindow(Nil,PWideChar(ComboBox1.Text));
SetWindowPos(h,HWND_TOPMOST,0,0,0,0,SWP_NOSIZE + SWP_NOMOVE)
end
Else
Begin
h:=FindWindow(Nil,PWideChar(ComboBox1.Text));
SetWindowPos(h,HWND_NOTOPMOST,0,0,0,0,SWP_NOSIZE + SWP_NOMOVE);
End;
end;
好像有语法错误有哪位能帮我看下啊
h:=FindWindow(Nil,PWideChar(ComboBox1.Text));
运行到这就错了
H:=FindWindow(Nil , 'XX');
不是这样的吗哪错了
还是ComboBox1.Text不能直接写上去啊
但是如果报错了,就说明你用的是d2009之前的版本,你要不把pwidecahr改为pansichar(即pachar),
要不就把findwindow改成findwindowW