一道VB的编程题 创建一个应用程序 15

创建应用程序,为文本框设计图中的快捷菜单改变粗体和下划线效果。命令加复选标记表示应用相应的效果,否则不应用效果。(图在:http://hi.baidu.com/crazy... 创建应用程序,为文本框设计图中的快捷菜单改变粗体和下划线效果。命令加复选标记表示应用相应的效果,否则不应用效果。
(图在:http://hi.baidu.com/crazyna123/album/item/f381a22dd1591529359bf70d.html#IMG=e153c010c266f5e1c2ce790e

我还有另外一道题 也请大家帮帮忙啦
http://zhidao.baidu.com/question/78226527.html
展开
 我来答
ARTERIOSCLEROS
2008-12-07 · TA获得超过4185个赞
知道大有可为答主
回答量:1672
采纳率:0%
帮助的人:2449万
展开全部
因为设计菜单问题,不好直接描述,所以给你Frm文件的内容。把下面的代码用记事本保存为后缀名为.frm的文件中,再用VB打开。
============================
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 3195
ClientLeft = 60
ClientTop = 345
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3195
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin VB.TextBox Text1
Height = 975
Left = 600
TabIndex = 0
Text = "Text1"
Top = 1080
Width = 3255
End
Begin VB.Menu mnu
Caption = "mnu"
Visible = 0 'False
Begin VB.Menu mnu1
Caption = "粗体"
End
Begin VB.Menu mnu2
Caption = "下划线"
End
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub mnu1_Click()
mnu1.Checked = Not mnu1.Checked
Text1.FontBold = mnu1.Checked
End Sub

Private Sub mnu2_Click()
mnu2.Checked = Not mnu2.Checked
Text1.FontUnderline = mnu2.Checked
End Sub

Private Sub Text1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbLeftButton Then PopupMenu mnu
End Sub
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
拖拖222
2008-12-07 · TA获得超过145个赞
知道答主
回答量:98
采纳率:0%
帮助的人:63.7万
展开全部
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 3195
ClientLeft = 60
ClientTop = 345
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3195
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin VB.TextBox Text1
Height = 975
Left = 600
TabIndex = 0
Text = "Text1"
Top = 1080
Width = 3255
End
Begin VB.Menu mnu
Caption = "mnu"
Visible = 0 'False
Begin VB.Menu mnu1
Caption = "粗体"
End
Begin VB.Menu mnu2
Caption = "下划线"
End
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub mnu1_Click()
mnu1.Checked = Not mnu1.Checked
Text1.FontBold = mnu1.Checked
End Sub

Private Sub mnu2_Click()
mnu2.Checked = Not mnu2.Checked
Text1.FontUnderline = mnu2.Checked
End Sub

Private Sub Text1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbLeftButton Then PopupMenu mnu
End Sub
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式