你说的是菜单的选中显示吧?在vb中是菜单编辑器的checked值是为false还是true
试试下面的,看看就知道了
////////////////////form1.frm///////////////
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 3195
ClientLeft = 165
ClientTop = 735
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3195
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin VB.Frame Frame1
Height = 2775
Left = 0
TabIndex = 0
Top = 120
Width = 4695
Begin VB.Label Label1
Appearance = 0 'Flat
BackColor = &H80000005&
BackStyle = 0 'Transparent
Caption = "在菜单上选颜色,frame底色就为相应的颜色,单击frame恢复默认的灰色。注意看菜单上的选项前有什么变化。是checked的值决定是否显示被选中"
ForeColor = &H80000008&
Height = 1095
Left = 1080
TabIndex = 1
Top = 240
Width = 2655
End
End
Begin VB.Menu frame1color
Caption = "frame1's color"
Begin VB.Menu green
Caption = "green"
End
Begin VB.Menu red
Caption = "red"
End
Begin VB.Menu blue
Caption = "blue"
End
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = FalsePrivate Sub blue_Click()
Frame1.BackColor = &HFF0000
blue.Checked = True
red.Checked = False
green.Checked = False
End SubPrivate Sub Frame1_Click()
Frame1.BackColor = &H8000000F
red.Checked = False
green.Checked = False
blue.Checked = False
End SubPrivate Sub green_Click()
Frame1.BackColor = &HFF00&
green.Checked = True
red.Checked = False
blue.Checked = False
End SubPrivate Sub Label1_Click()
Frame1_Click
End SubPrivate Sub red_Click()
Frame1.BackColor = &HFF&
red.Checked = True
green.Checked = False
blue.Checked = False
End Sub
////////////////////工程1.vbp/////////////////
Type=Exe
Form=Form1.frm
Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\WINDOWS\SYSTEM\StdOle2.Tlb#OLE Automation
Startup="Form1"
Command32=""
Name="工程1"
HelpContextID="0"
CompatibleMode="0"
MajorVer=1
MinorVer=0
RevisionVer=0
AutoIncrementVer=0
ServerSupportFiles=0
VersionCompanyName="china"
CompilationType=0
OptimizationType=0
FavorPentiumPro(tm)=0
CodeViewDebugInfo=0
NoAliasing=0
BoundsCheck=0
OverflowCheck=0
FlPointCheck=0
FDIVCheck=0
UnroundedFP=0
StartMode=0
Unattended=0
Retained=0
ThreadPerObject=0
MaxNumberOfThreads=1
////////////////////////工程1.vbw///////////
Form1 = 44, 44, 359, 381, Z, 22, 22, 337, 359, C
是vb 6.0
你可以用vbscript试试
试试下面的,看看就知道了
////////////////////form1.frm///////////////
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 3195
ClientLeft = 165
ClientTop = 735
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3195
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin VB.Frame Frame1
Height = 2775
Left = 0
TabIndex = 0
Top = 120
Width = 4695
Begin VB.Label Label1
Appearance = 0 'Flat
BackColor = &H80000005&
BackStyle = 0 'Transparent
Caption = "在菜单上选颜色,frame底色就为相应的颜色,单击frame恢复默认的灰色。注意看菜单上的选项前有什么变化。是checked的值决定是否显示被选中"
ForeColor = &H80000008&
Height = 1095
Left = 1080
TabIndex = 1
Top = 240
Width = 2655
End
End
Begin VB.Menu frame1color
Caption = "frame1's color"
Begin VB.Menu green
Caption = "green"
End
Begin VB.Menu red
Caption = "red"
End
Begin VB.Menu blue
Caption = "blue"
End
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = FalsePrivate Sub blue_Click()
Frame1.BackColor = &HFF0000
blue.Checked = True
red.Checked = False
green.Checked = False
End SubPrivate Sub Frame1_Click()
Frame1.BackColor = &H8000000F
red.Checked = False
green.Checked = False
blue.Checked = False
End SubPrivate Sub green_Click()
Frame1.BackColor = &HFF00&
green.Checked = True
red.Checked = False
blue.Checked = False
End SubPrivate Sub Label1_Click()
Frame1_Click
End SubPrivate Sub red_Click()
Frame1.BackColor = &HFF&
red.Checked = True
green.Checked = False
blue.Checked = False
End Sub
////////////////////工程1.vbp/////////////////
Type=Exe
Form=Form1.frm
Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\WINDOWS\SYSTEM\StdOle2.Tlb#OLE Automation
Startup="Form1"
Command32=""
Name="工程1"
HelpContextID="0"
CompatibleMode="0"
MajorVer=1
MinorVer=0
RevisionVer=0
AutoIncrementVer=0
ServerSupportFiles=0
VersionCompanyName="china"
CompilationType=0
OptimizationType=0
FavorPentiumPro(tm)=0
CodeViewDebugInfo=0
NoAliasing=0
BoundsCheck=0
OverflowCheck=0
FlPointCheck=0
FDIVCheck=0
UnroundedFP=0
StartMode=0
Unattended=0
Retained=0
ThreadPerObject=0
MaxNumberOfThreads=1
////////////////////////工程1.vbw///////////
Form1 = 44, 44, 359, 381, Z, 22, 22, 337, 359, C
是vb 6.0
你可以用vbscript试试
alert("√".charCodeAt(0));
document.write(String.fromCharCode(8730));
</script>