Q
qilusoft
Unregistered / Unconfirmed
GUEST, unregistred user!
急急急
如何用sendmessage点击按钮让combox获得焦点,并且自动执行回车事件?
procedure TForm1.ComboBox1KeyPress(Sender: TObject; var Key: Char);
begin
if Key =#13 then
Self.Caption :='ok';
end;
procedure TForm1.BitBtn1Click(Sender: TObject);
begin
ComboBox1.Text :='4';
ComboBox1.SetFocus ;
end;
procedure TForm1.ComboBox1Enter(Sender: TObject);
begin
//sendmessage 此处如何实现 ,或者sendmessage代码应该放在哪里?
end;
如何用sendmessage点击按钮让combox获得焦点,并且自动执行回车事件?
procedure TForm1.ComboBox1KeyPress(Sender: TObject; var Key: Char);
begin
if Key =#13 then
Self.Caption :='ok';
end;
procedure TForm1.BitBtn1Click(Sender: TObject);
begin
ComboBox1.Text :='4';
ComboBox1.SetFocus ;
end;
procedure TForm1.ComboBox1Enter(Sender: TObject);
begin
//sendmessage 此处如何实现 ,或者sendmessage代码应该放在哪里?
end;