Guest_imported
New member
- Jan 1, 1970
- 0
Dear Friends,
I have created one menu in vb activex control like "File". I need to add sub menu items in file menu through programming, how can i add sub menu items? i need to write functions for addsubmenuitem and removesubmenuitem. these menu i need to display in ASP form like popup menu. i have written the following code in vb.
Dim temp As Integer
Dim mnuindex As Integer
'Event Declarations:
Event MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single) 'MappingInfo=UserControl,UserControl,-1,MouseDown
Public Sub mnucopy_Click(Index As Integer)
mnuindex = Index
Call Clearitem(Index, True)
Call Click
End Sub
Public Sub SSTree1_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
If vbRightButton And Button Then
PopupMenu mnu(0)
End If
End Sub
Public Function AddSubMenu(ByVal a_menucaption As String) ', ByVal a_MenuName As String, ByVal a_menuindex As Integer)
temp = temp + 1
Load mnucopy(temp)
mnucopy(temp).Caption = a_menucaption
'MsgBox mnucopy(temp).Index
End Function
Public Function Clearitem(ByVal a_index As Integer, ByVal a_True As Boolean)
mnucopy(a_index).Enabled = a_True
End Function
Private Sub UserControl_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
RaiseEvent MouseDown(Button, Shift, x, y)
End Sub
Public Function Click()
Click = mnuindex
MsgBox "Index is " & Click
End Function
i have written the following code in ASP file.
<%@ Language=VBScript %>
<HTML>
<HEAD>
<META name=VI60_defaultClientScript content=VBScript>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<SCRIPT ID=clientEventHandlersVBS LANGUAGE=vbscript>
<!--
Sub window_onload
UserControl21.AddSubMenu "Cut"
usercontrol21.AddSubMenu "Paste"
UserControl21.Clearitem 2,False
UserControl21.AddSubMenu "Babu"
End Sub
Sub document_onmousedown
'UserControl21.Click
End Sub
-->
</SCRIPT>
</HEAD>
<BODY>
<META content=VBScript name=VI60_defaultClientScript>
<META content="Microsoft Visual Studio 6.0" name=GENERATOR>
<META content=VBScript name=VI60_defaultClientScript>
<META content="Microsoft Visual Studio 6.0" name=GENERATOR>
<META content=VBScript name=VI60_defaultClientScript>
<META content="Microsoft Visual Studio 6.0" name=GENERATOR>
<OBJECT id=UserControl21 style="LEFT: 0px; TOP: 0px" classid="clsid:BF6B33E4-336A-44FE-8BFC-ADE55EC47E6D" VIEWASTEXT>
<PARAM NAME="_ExtentX" VALUE="8467">
<PARAM NAME="_ExtentY" VALUE="6350"></OBJECT>
<P> </P>
</BODY>
</HTML>
so anyone can help me please this is very urgent.
Regards,
mnkreddy.
I have created one menu in vb activex control like "File". I need to add sub menu items in file menu through programming, how can i add sub menu items? i need to write functions for addsubmenuitem and removesubmenuitem. these menu i need to display in ASP form like popup menu. i have written the following code in vb.
Dim temp As Integer
Dim mnuindex As Integer
'Event Declarations:
Event MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single) 'MappingInfo=UserControl,UserControl,-1,MouseDown
Public Sub mnucopy_Click(Index As Integer)
mnuindex = Index
Call Clearitem(Index, True)
Call Click
End Sub
Public Sub SSTree1_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
If vbRightButton And Button Then
PopupMenu mnu(0)
End If
End Sub
Public Function AddSubMenu(ByVal a_menucaption As String) ', ByVal a_MenuName As String, ByVal a_menuindex As Integer)
temp = temp + 1
Load mnucopy(temp)
mnucopy(temp).Caption = a_menucaption
'MsgBox mnucopy(temp).Index
End Function
Public Function Clearitem(ByVal a_index As Integer, ByVal a_True As Boolean)
mnucopy(a_index).Enabled = a_True
End Function
Private Sub UserControl_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
RaiseEvent MouseDown(Button, Shift, x, y)
End Sub
Public Function Click()
Click = mnuindex
MsgBox "Index is " & Click
End Function
i have written the following code in ASP file.
<%@ Language=VBScript %>
<HTML>
<HEAD>
<META name=VI60_defaultClientScript content=VBScript>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<SCRIPT ID=clientEventHandlersVBS LANGUAGE=vbscript>
<!--
Sub window_onload
UserControl21.AddSubMenu "Cut"
usercontrol21.AddSubMenu "Paste"
UserControl21.Clearitem 2,False
UserControl21.AddSubMenu "Babu"
End Sub
Sub document_onmousedown
'UserControl21.Click
End Sub
-->
</SCRIPT>
</HEAD>
<BODY>
<META content=VBScript name=VI60_defaultClientScript>
<META content="Microsoft Visual Studio 6.0" name=GENERATOR>
<META content=VBScript name=VI60_defaultClientScript>
<META content="Microsoft Visual Studio 6.0" name=GENERATOR>
<META content=VBScript name=VI60_defaultClientScript>
<META content="Microsoft Visual Studio 6.0" name=GENERATOR>
<OBJECT id=UserControl21 style="LEFT: 0px; TOP: 0px" classid="clsid:BF6B33E4-336A-44FE-8BFC-ADE55EC47E6D" VIEWASTEXT>
<PARAM NAME="_ExtentX" VALUE="8467">
<PARAM NAME="_ExtentY" VALUE="6350"></OBJECT>
<P> </P>
</BODY>
</HTML>
so anyone can help me please this is very urgent.
Regards,
mnkreddy.