第一天研究delphi,还真有点不明白

      object MENU_HELP_ABOUT: TMenuItem
        Caption = '关于(&A)'
        OnClick = MENU_HELP_ABOUTClick  \\打开的是一个作者信息的窗体
      end
    end那么我想打开的是object frmPlayGold: TfrmPlayGoldobject frmPlayGold: TfrmPlayGold
  Left = 381
  Top = 186
  BorderIcons = [biSystemMenu, biMinimize]
  BorderStyle = bsSingle
  Caption = '新窗体'
  ClientHeight = 384
  ClientWidth = 587
  Color = clBtnFace
  Font.Charset = ANSI_CHARSET
  Font.Color = clWindowText
  Font.Height = -12
  Font.Name = '宋体'
  Font.Style = []
  OldCreateOrder = True
  ShowHint = True
  PixelsPerInch = 96
  TextHeight = 12
  object Label52: TLabel
    Left = 8
    Top = 352
    Width = 480
    Height = 24
    Caption = 
      '免责申明:此功能只可用于个人娱乐,如果使用此功能从事违法国家法规的' +
      '活动而造成的后果'#13#10'和程序作者无关,如果不同意上述申明请立即删除本' +
      '程序.'
    Font.Charset = ANSI_CHARSET
    Font.Color = clRed
    Font.Height = -12
    Font.Name = '宋体'
    Font.Style = []
    ParentFont = True
  end怎么做呢?

解决方案 »

  1.   

    在Menu子项目的OnClick事件(就是你的MENU_HELP_ABOUTClick事件)中:Application.CreateForm(TfrmPlayGold, frmPlayGold);
    try
    frmPlayGold.show;//或是frmPlayGold.ShowModal;
    finally
    frmPlayGold.free
    end;
      

  2.   

    能不能直接修改OnClick =后面的参数实现此功能!
      

  3.   


    //定义如下一个方法
    //最后修正MENU_HELP_ABOUT.OnClick = ShowAboutDialog 
    //也可以达到目的!
    procedure ShowAboutDialog(Sender:TObject);
    var
      vForm:TfrmPlayGold;
    begin
      vForm := TfrmPlayGold.Create(nil);
      try
        vForm.ShowModal;
      finally
        vForm.Free;
      end;
    end;
      

  4.   

    看你发的是dfm窗体文件吧~你想修改窗体文件实现这个功能么?窗体文件IDE会自动修改的,一般情况下不建议手动去改。你还是在pas文件里写比较好,而且相当简单啊~如果你非要改dfm的话,参见楼上~