关于菜单的问题?急。。。
日期:2007-01-19 荐:
关于菜单的问题?急。。。窗体上有菜单项“文件”我想按下按纽,将textbox中的数据“hello”加入“文件”使“hello”成为“文件”的子菜单项即:文件...hello有个简单的办法:private sub cmd_click()menu1.visble=trueend sub关注~做了一个Form1.Frm文件给你代码如下:VERSION 5.00Begin VB.Form Form1 Caption = "Form1" ClientHeight = 3195 ClientLeft = 165 ClientTop = 735 ClientWidth = 4680 LinkTopic = "Form1" ScaleHeight = 3195 ScaleWidth = 4680 StartUpPosition = 3 '窗口缺省 Begin VB.CommandButton Command1 Caption = "Command1" Height = 375 Left = 2040 TabIndex = 1 Top = 1320 Width = 1575 End Begin VB.TextBox Height = 375 Left = 1680 TabIndex = 0 Text = "" Top = 480 Width = 1935 End Begin VB.Menu FileMenu Caption = "文件" Begin VB.Menu MsgMenu Caption = "消息菜单" Index = 0 End EndEndAttribute VB_Name = "Form1"Attribute VB_GlobalNameSpace = FalseAttribute VB_Creatable = FalseAttribute VB_PredeclaredId = TrueAttribute VB_Exposed = FalsePrivate Sub Command1_Click()Dim MenuSum As LongMenuSum = MsgMenu.CountLoad MsgMenu(MenuSum)MsgMenu(MenuSum).Caption = .TextMsgMenu(MenuSum).Visible = TrueEnd Sub谢谢up
标签: