Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Popup Menu Displaying in ASP

Status
Not open for further replies.

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=&quot;GENERATOR&quot; Content=&quot;Microsoft Visual Studio 6.0&quot;>

<SCRIPT ID=clientEventHandlersVBS LANGUAGE=vbscript>
<!--

Sub window_onload
UserControl21.AddSubMenu &quot;Cut&quot;
usercontrol21.AddSubMenu &quot;Paste&quot;
UserControl21.Clearitem 2,False
UserControl21.AddSubMenu &quot;Babu&quot;
End Sub

Sub document_onmousedown
'UserControl21.Click
End Sub

-->
</SCRIPT>
</HEAD>
<BODY>
<META content=VBScript name=VI60_defaultClientScript>
<META content=&quot;Microsoft Visual Studio 6.0&quot; name=GENERATOR>
<META content=VBScript name=VI60_defaultClientScript>
<META content=&quot;Microsoft Visual Studio 6.0&quot; name=GENERATOR>
<META content=VBScript name=VI60_defaultClientScript>
<META content=&quot;Microsoft Visual Studio 6.0&quot; name=GENERATOR>
<OBJECT id=UserControl21 style=&quot;LEFT: 0px; TOP: 0px&quot; classid=&quot;clsid:BF6B33E4-336A-44FE-8BFC-ADE55EC47E6D&quot; VIEWASTEXT>
<PARAM NAME=&quot;_ExtentX&quot; VALUE=&quot;8467&quot;>
<PARAM NAME=&quot;_ExtentY&quot; VALUE=&quot;6350&quot;></OBJECT>

<P> </P>

</BODY>
</HTML>


so anyone can help me please this is very urgent.

Regards,
mnkreddy.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top