- 1、本文档共9页,可阅读全部内容。
- 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
VB.NET-ADVANCEDFORM.PDF
VB.N T - ADVANC D FORM
VB.N T - ADVANC D FORM
http://www.tutorialspoint .com//_advanced_forms.htm Copy right ©
In this chapter, let us study the following concepts:
Adding menus and sub menus in an application
Adding the cut, copy and paste functionalities in a form
A nchoring and docking controls in a form
Modal forms
Adding Menus and Sub Menus in an Application
T raditionally, the Menu, MainMenu, ContextMenu, and MenuItem classes were used for adding
menus, sub-menus and context menus in a Windows application.
Now, the MenuStrip, the ToolStripMenuItem, ToolStripDropDown and
ToolStripDropDownMenu controls replace and add functionality to the Menu-related controls of
previous versions. However, the old control classes are retained for both backward compatibility
and future use.
Let us create a typical windows main menu bar and sub menus using the old version controls first
since these controls are still much used in old applications.
Following is an example, which shows how we create a menu bar with menu items: File, dit, V iew
and Project. T he File menu has the sub menus New, Open and Save.
Lets double click on the Form and put the following code in the opened window.
Public Class Form1
Private Sub Form1_Load(sender As Object, e As EventArgs) andles MyBase.Load
defining the main menu bar
Dim mnuBar As New MainMenu()
defining the menu items for the main menu bar
Dim myMenuItemFile As New MenuItem (File)
Dim myMenuItemEdit As New MenuItem (Edit)
Dim myMenuItemView As New MenuItem (View)
Dim myMenuItemProject As New MenuItem (Project)
adding the menu items to the main menu bar
mnuBar.MenuItems.Add(myMenuItemFile)
mnuBar.MenuItems.Add(myMenuItemEdit)
mnuBar.MenuItems.Add(myMenuItemView)
mnuBar.MenuItems.Add(myMenuItemProject
您可能关注的文档
最近下载
- 2024年军职在线《军事管理基础》(中国人民解放军海军工程大学)章节测试答案.docx
- 旅游餐馆星级的划分与评定(2021修订版).pdf
- 清华大学版信息科技六年级上册第二单元第2课《人脸识别的实现——体验数据采集、训练与预测全过程》.pptx
- 糖尿病周围神经病变的诊断及鉴别诊断.pptx VIP
- 供应商质量手册 .docx
- 2025年高考精品备课语文教案讲义:现代文阅读Ⅰ信息类文本阅读.pdf VIP
- 2018AFP案例结业题目8:年轻夫妻的读博规划答案解析.doc
- 校学生会副主席竞选演讲稿PPT.pptx VIP
- 统编小学语文三年级上册第八单元作业设计.pdf VIP
- 《设计素描》教案备课讲稿.pdf
文档评论(0)