delphi中的工具表单

Tre*_*sta 0 delphi options

我做了一个小程序,就像一个webbrowser.我想做什么,比如IE和大多数程序.在程序顶部创建一个名为tools的选项卡,然后在其中的某个选项中.从这里开始,我需要知道该怎么做.我想要一个小弹出菜单来允许我填写主页,例如可能做更多.在delphi应用程序中是否需要使用新的表单或单元?

我需要知道的是,如何才能获得此弹出窗口.也许有人知道一个网站上有一些教程或指南.关键词会让我前进.每个程序都有一个工具菜单,允许它们在程序中播放和替换变量.这就是我想要做的.如果你认为我需要更多的探索.请告诉我!

关心所有人

And*_*and 5

  1. 使用IDE创建新表单.
  2. 设置新表单的这些属性(使用IDE):
    • Name 应该 OptionsForm
    • BorderStyle 应该 bsDialog
    • Position 应该 poOwnerFormCenter
    • Caption 应该 'Options'
  3. TButton在选项表单上删除两个控件.
    • 其中一人应该有Caption := 'OK',Default := true,ModalResult := mrOk.
    • 其他应该有Caption := 'Cancel',Cancel := true,ModalResult := mrCancel.
  4. 在主窗体上,添加一个按钮.设置Caption'Options'.
  5. 按Alt + F11.选择选项表单的单位(可能Unit2).
  6. 双击该按钮,以创建并显示其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)