下载频道> 资源分类> 编程语言> VB源码> 在菜单中加入广播按钮VB源码程序

标题:在菜单中加入广播按钮VB源码程序
分享到:

所属分类: VB源码 资源类型: 文件大小: 8.39 KB 上传时间: 2016-01-20 23:32:23 下载次数: 9 资源积分:1分 提 供 者: vb源码代做 在菜单中加入广播按钮VB源码程序
内容:
在菜单中加入广播按钮VB源码程序,程序员在编程的过程中可以参考学习使用,希望对IT程序员有用,此源码程序简单易懂、方便阅读,有很好的学习价值!
部分代码如下:
VERSION 5.00
Begin VB.Form form1 
   Caption         =   "在菜单中加入广播按钮"
   ClientHeight    =   2055
   ClientLeft      =   165
   ClientTop       =   735
   ClientWidth     =   3945
   Icon            =   "frmMenusWithRadioButtons.frx":0000
   LinkTopic       =   "Form1"
   PaletteMode     =   1  'UseZOrder
   ScaleHeight     =   2055
   ScaleWidth      =   3945
   StartUpPosition =   3  '窗口缺省
   Begin VB.Menu Options 
      Caption         =   "选项"
      Begin VB.Menu mnuOptions 
         Caption         =   "Option Radio Item 1"
         Index           =   0
      End
      Begin VB.Menu mnuOptions 
         Caption         =   "Option Radio Item 2"
         Index           =   1
      End
      Begin VB.Menu mnuOptions 
         Caption         =   "Option Radio Item 3"
         Index           =   2
      End
      Begin VB.Menu mnuOptions 
         Caption         =   "-"
         Index           =   3
      End
      Begin VB.Menu mnuOptions 
         Caption         =   "Option Check Item 1"
         Index           =   4
      End
      Begin VB.Menu mnuOptions 
         Caption         =   "Option Check Item 2"
         Index           =   5
      End
      Begin VB.Menu mnuOptions 
         Caption         =   "Option Check Item 3"
         Index           =   6
      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 Form_Load()
 
' just change the radio check for the first 3 menu items
SetRadioMenuChecks mnuOptions(0), 0
SetRadioMenuChecks mnuOptions(1), 1
SetRadioMenuChecks mnuOptions(2), 2
 
End Sub
Private Sub SetRadioMenuChecks(Mnu As Menu, ByVal mnuItem&)
 
Dim hMenu&
Dim mInfo As MENUITEMINFO
 
' get the menu item handle
hMenu& = GetSubMenu(GetMenu(Mnu.Parent.hwnd), 0)
 
' copy it's attributes to the new Type,
' changing the checkmark to a radio button
mInfo.cbSize = Len(mInfo)
mInfo.fType = MFT_RADIOCHECK
mInfo.fMask = MIIM_TYPE
mInfo.dwTypeData = Mnu.Caption & Chr$(0)
 
' change the menu checkmark
SetMenuItemInfo hMenu&, mnuItem&, 1, mInfo
 
End Sub
 
Private Sub Label2_Click()
 
End Sub
 
Private Sub mnuOptions_Click(Index As Integer)
 
Static prevSelection As Integer
 
mnuOptions(prevSelection).Checked = False
mnuOptions(Index).Checked = True
prevSelection = Index
 
End Sub
 

文件列表(点击上边下载按钮,如果是垃圾文件请在下面评价差评或者投诉):

在菜单中加入广播按钮VB源码程序/
在菜单中加入广播按钮VB源码程序/Global.bas
在菜单中加入广播按钮VB源码程序/MSSCCPRJ.SCC
在菜单中加入广播按钮VB源码程序/MenusWithRadioButtons.exe
在菜单中加入广播按钮VB源码程序/MenusWithRadioButtons.vbp
在菜单中加入广播按钮VB源码程序/MenusWithRadioButtons.vbw
在菜单中加入广播按钮VB源码程序/frmMenusWithRadioButtons.frm
在菜单中加入广播按钮VB源码程序/frmMenusWithRadioButtons.frx

关键词: 中加 源码 按钮

编程语言下载排行

Top_arrow
回到顶部
联系方式| 版权声明| 招聘信息| 广告服务| 银行汇款| 法律顾问| 兼职技术| 付款方式| 关于我们|
网站客服网站客服 程序员兼职招聘 程序员兼职招聘
沪ICP备19040327号-3
公安备案号:沪公网安备 31011802003874号
库纳格流体控制系统(上海)有限公司 版权所有
Copyright © 1999-2014, GUSUCODE.COM, All Rights Reserved