home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 6_2008-2009.ISO / data / zips / Notificati214300262009.psc / frmDemo.frm < prev    next >
Text File  |  2009-02-06  |  4KB  |  186 lines

  1. VERSION 5.00
  2. Begin VB.Form frmDemo 
  3.    BorderStyle     =   3  'Fixed Dialog
  4.    Caption         =   "Form2"
  5.    ClientHeight    =   2820
  6.    ClientLeft      =   45
  7.    ClientTop       =   720
  8.    ClientWidth     =   6465
  9.    Icon            =   "frmDemo.frx":0000
  10.    LinkTopic       =   "Form2"
  11.    MaxButton       =   0   'False
  12.    MinButton       =   0   'False
  13.    ScaleHeight     =   2820
  14.    ScaleWidth      =   6465
  15.    ShowInTaskbar   =   0   'False
  16.    StartUpPosition =   2  'CenterScreen
  17.    Begin VB.TextBox Text1 
  18.       Height          =   255
  19.       Left            =   60
  20.       TabIndex        =   3
  21.       Text            =   "Text1"
  22.       Top             =   240
  23.       Width           =   6315
  24.    End
  25.    Begin VB.CommandButton Command3 
  26.       Caption         =   "Set Behavior to: Hide when Inactive"
  27.       Height          =   495
  28.       Left            =   1620
  29.       TabIndex        =   2
  30.       Top             =   1800
  31.       Width           =   3195
  32.    End
  33.    Begin VB.CommandButton Command2 
  34.       Caption         =   "Set Behavior to: Always Hide"
  35.       Height          =   495
  36.       Left            =   1620
  37.       TabIndex        =   1
  38.       Top             =   1200
  39.       Width           =   3195
  40.    End
  41.    Begin VB.CommandButton Command1 
  42.       Caption         =   "Set Behavior to: Always Show"
  43.       Height          =   495
  44.       Left            =   1620
  45.       TabIndex        =   0
  46.       Top             =   600
  47.       Width           =   3195
  48.    End
  49.    Begin VB.Label Label2 
  50.       Alignment       =   2  'Center
  51.       Caption         =   "Label2"
  52.       Height          =   435
  53.       Left            =   60
  54.       TabIndex        =   5
  55.       Top             =   2340
  56.       Width           =   6375
  57.    End
  58.    Begin VB.Label Label1 
  59.       Caption         =   " File Spec:"
  60.       Height          =   195
  61.       Left            =   60
  62.       TabIndex        =   4
  63.       Top             =   60
  64.       Width           =   1935
  65.    End
  66.    Begin VB.Menu mnuFile 
  67.       Caption         =   "File"
  68.       Begin VB.Menu mnuAbout 
  69.          Caption         =   "About"
  70.       End
  71.       Begin VB.Menu mnuDiscovData 
  72.          Caption         =   "Discovety Data"
  73.       End
  74.       Begin VB.Menu Dummy 
  75.          Caption         =   "-"
  76.       End
  77.       Begin VB.Menu mnuExit 
  78.          Caption         =   "Exit"
  79.       End
  80.    End
  81. End
  82. Attribute VB_Name = "frmDemo"
  83. Attribute VB_GlobalNameSpace = False
  84. Attribute VB_Creatable = False
  85. Attribute VB_PredeclaredId = True
  86. Attribute VB_Exposed = False
  87. Option Explicit
  88.  
  89. 'Enter here
  90. Private Sub Form_Load()
  91.    Me.Caption = " Notification Area (Systray) Behavior Set - " & _
  92.                 App.Major & "." & _
  93.                 App.Minor & "." & _
  94.                 App.Revision
  95.    
  96.    Text1.Text = "C:\Program Files\Call Trace\ctrace.exe"
  97.    
  98.    Label2.Caption = BehaviorGet(Text1.Text)
  99.    
  100. End Sub
  101.  
  102. 'Set Behavior to: Always Show button
  103. Private Sub Command1_Click()
  104.    If BehaviorSet(Text1.Text) Then
  105.       MsgBox "Notification Area Behavior Successfully Set", vbInformation
  106.    Else
  107.       MsgBox "Problem Setting Notification Area Behavior", vbCritical
  108.    End If
  109.    
  110.    RefreshLabel
  111.    
  112. End Sub
  113.  
  114. 'Set Behavior to: Always Hide button
  115. Private Sub Command2_Click()
  116.    If BehaviorSet(Text1.Text, BHV_ALWHIDES) Then
  117.       MsgBox "Notification Area Behavior Successfully Set", vbInformation
  118.    Else
  119.       MsgBox "Problem Setting Notification Area Behavior", vbCritical
  120.    End If
  121.    
  122.    RefreshLabel
  123.    
  124. End Sub
  125.  
  126. 'Set Behavior to: Hide when Inactive button
  127. Private Sub Command3_Click()
  128.    If BehaviorSet(Text1.Text, BHV_HIDINACT) Then
  129.       MsgBox "Notification Area Behavior Successfully Set", vbInformation
  130.    Else
  131.       MsgBox "Problem Setting Notification Area Behavior", vbCritical
  132.    End If
  133.    
  134.    RefreshLabel
  135.    
  136. End Sub
  137.  
  138. 'Change text in file spec textbox
  139. Private Sub Text1_KeyUp(KeyCode As Integer, Shift As Integer)
  140.    RefreshLabel
  141.    
  142. End Sub
  143.  
  144. 'Refresh label
  145. Private Sub RefreshLabel()
  146.    Label2.Caption = BehaviorGet(Text1.Text)
  147.    
  148. End Sub
  149.  
  150. 'File > About menu
  151. Private Sub mnuAbout_Click()
  152.    frmAbout.Show
  153.    
  154. End Sub
  155.  
  156. 'File > Discovery Data menu
  157. Private Sub mnuDiscovData_Click()
  158.    frmNotifyArea.Show
  159.    
  160. End Sub
  161.  
  162. 'File > Exit menu
  163. Private Sub mnuExit_Click()
  164.    Unload Me
  165.    
  166. End Sub
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.