home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / popupf / frustrat.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-03-08  |  4.1 KB  |  150 lines

  1. VERSION 2.00
  2. Begin Form Form1 
  3.    BorderStyle     =   3  'Fixed Double
  4.    Caption         =   "Frustration!"
  5.    ClientHeight    =   3780
  6.    ClientLeft      =   1110
  7.    ClientTop       =   1545
  8.    ClientWidth     =   3285
  9.    Height          =   4470
  10.    Icon            =   FRUSTRAT.FRX:0000
  11.    Left            =   1050
  12.    LinkTopic       =   "Form1"
  13.    MaxButton       =   0   'False
  14.    MinButton       =   0   'False
  15.    ScaleHeight     =   3780
  16.    ScaleWidth      =   3285
  17.    Top             =   915
  18.    Width           =   3405
  19.    Begin Label Label3 
  20.       Caption         =   "Read the READ.ME file included in this project to understand how to activate the problem..."
  21.       Height          =   675
  22.       Left            =   120
  23.       TabIndex        =   2
  24.       Top             =   3060
  25.       Width           =   3015
  26.    End
  27.    Begin Label Label2 
  28.       Alignment       =   2  'Center
  29.       BackColor       =   &H000000FF&
  30.       BorderStyle     =   1  'Fixed Single
  31.       Caption         =   "Popup Menu5"
  32.       ForeColor       =   &H00FFFFFF&
  33.       Height          =   1335
  34.       Left            =   120
  35.       TabIndex        =   1
  36.       Top             =   1560
  37.       Width           =   3015
  38.    End
  39.    Begin Label Label1 
  40.       Alignment       =   2  'Center
  41.       BackColor       =   &H00800000&
  42.       BorderStyle     =   1  'Fixed Single
  43.       Caption         =   "Popup Menu4"
  44.       ForeColor       =   &H00FFFFFF&
  45.       Height          =   1395
  46.       Left            =   120
  47.       TabIndex        =   0
  48.       Top             =   120
  49.       Width           =   3015
  50.    End
  51.    Begin Menu Menu1 
  52.       Caption         =   "Menu 1"
  53.       Begin Menu Menu11 
  54.          Caption         =   "Make Menu 2 Visible"
  55.          Enabled         =   0   'False
  56.       End
  57.       Begin Menu Menu12 
  58.          Caption         =   "Pop-up Menu 2"
  59.       End
  60.       Begin Menu mSep 
  61.          Caption         =   "-"
  62.       End
  63.       Begin Menu mExit 
  64.          Caption         =   "E&xit"
  65.       End
  66.    End
  67.    Begin Menu Menu2 
  68.       Caption         =   "Menu 2"
  69.       Begin Menu Menu21 
  70.          Caption         =   "Menu 2.1"
  71.       End
  72.       Begin Menu Menu22 
  73.          Caption         =   "Make Menu 2 Invisible"
  74.       End
  75.    End
  76.    Begin Menu Menu3 
  77.       Caption         =   "Menu 3"
  78.       Begin Menu Menu31 
  79.          Caption         =   "Menu 3.1"
  80.       End
  81.       Begin Menu Menu32 
  82.          Caption         =   "Menu 3.2"
  83.       End
  84.    End
  85.    Begin Menu Menu4 
  86.       Caption         =   "Menu 4 (Invis. Popup)"
  87.       Visible         =   0   'False
  88.       Begin Menu Menu41 
  89.          Caption         =   "Menu 4.1"
  90.       End
  91.       Begin Menu Menu42 
  92.          Caption         =   "Menu 4.2"
  93.       End
  94.       Begin Menu Menu43 
  95.          Caption         =   "Menu 4.3"
  96.       End
  97.    End
  98.    Begin Menu Menu5 
  99.       Caption         =   "Menu 5 (Invis. Popup)"
  100.       Visible         =   0   'False
  101.       Begin Menu Menu51 
  102.          Caption         =   "Menu 5.1"
  103.       End
  104.       Begin Menu Menu52 
  105.          Caption         =   "Menu 5.2"
  106.       End
  107.    End
  108. Option Explicit
  109. Sub Form_Load ()
  110.     Left = (Screen.Width - Width) \ 2
  111.     Top = (Screen.Height - Height) \ 2
  112. End Sub
  113. Sub Label1_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
  114.     If (Button = 2) Then
  115.         PopupMenu Menu4
  116.     End If
  117. End Sub
  118. Sub Label2_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
  119.     If (Button = 2) Then
  120.         PopupMenu Menu5
  121.     End If
  122. End Sub
  123. Sub Menu11_Click ()
  124.     Menu2.Visible = True
  125.     Menu11.Enabled = False
  126.     Menu22.Enabled = True
  127. End Sub
  128. Sub Menu12_Click ()
  129.     PopupMenu Menu2
  130. End Sub
  131. Sub Menu21_Click ()
  132.     MsgBox "Menu 2.1"
  133. End Sub
  134. Sub Menu22_Click ()
  135.     MsgBox "Menu 2.2: Menu 2 will be invisible now."
  136.     Menu11.Enabled = True
  137.     Menu22.Enabled = False
  138.     Menu2.Visible = False
  139. End Sub
  140. Sub Menu41_Click ()
  141.     MsgBox "Menu 4.1!"
  142. End Sub
  143. Sub Menu51_Click ()
  144.     MsgBox "Menu 5.1!"
  145. End Sub
  146. Sub mExit_Click ()
  147.     Unload Me
  148.     End
  149. End Sub
  150.