Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.
SetWindowPos(Self.Handle,
HWND_TOPMOST,
Top,
Left,
Width,
Height,
SWP_NOMOVE + SWP_NOSIZE)
procedure TfrmPatLookup.FormShow(Sender: TObject);
begin
{set the z order for all the windows forms so this
form is the topmost}
Self.ActiveControl := Self.ePatient;
SetWindowPos(Self.Handle,
HWND_TOPMOST,
Top,
Left,
Width,
Height,
SWP_NOMOVE + SWP_NOSIZE);
SetForegroundWindow(Self.Handle);
if Self.ePatient.CanFocus then
Self.epatient.SetFocus;
end;
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
procedure TForm1.Test;
begin
Form2.ActiveControl := Form2.Edit1;
end;