我做了一个小程序,就像一个webbrowser.我想做什么,比如IE和大多数程序.在程序顶部创建一个名为tools的选项卡,然后在其中的某个选项中.从这里开始,我需要知道该怎么做.我想要一个小弹出菜单来允许我填写主页,例如可能做更多.在delphi应用程序中是否需要使用新的表单或单元?
我需要知道的是,如何才能获得此弹出窗口.也许有人知道一个网站上有一些教程或指南.关键词会让我前进.每个程序都有一个工具菜单,允许它们在程序中播放和替换变量.这就是我想要做的.如果你认为我需要更多的探索.请告诉我!
关心所有人
Name 应该 OptionsFormBorderStyle 应该 bsDialogPosition 应该 poOwnerFormCenterCaption 应该 'Options'TButton在选项表单上删除两个控件.
Caption := 'OK',Default := true,ModalResult := mrOk.Caption := 'Cancel',Cancel := true,ModalResult := mrCancel.Caption为'Options'.Unit2).OnClick处理程序.在这里你写
with TOptionsForm.Create(nil) do
try
(* Write code here to update the controls on the options form
so that they match the current settings. Example: *)
Edit1.Text := Self.Caption;
if ShowModal = mrOk then
begin
(* Write code to apply the new settings. Example: *)
Self.Caption := Edit1.Text;
end;
finally
free;
end;
Run Code Online (Sandbox Code Playgroud)