home *** CD-ROM | disk | FTP | other *** search
/ ActiveX Programming Unleashed CD / AXU.iso / activex / demos / oletrial / samples / vb / mhoddp / mhoddp_a.frm (.txt) next >
Encoding:
Visual Basic Form  |  1995-11-02  |  5.2 KB  |  161 lines

  1. VERSION 4.00
  2. Begin VB.Form fMain 
  3.    Caption         =   "MicroHelp VBTools 5 - MhOddPic Example"
  4.    ClientHeight    =   3000
  5.    ClientLeft      =   3552
  6.    ClientTop       =   4212
  7.    ClientWidth     =   7488
  8.    Height          =   3468
  9.    Left            =   3492
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   3000
  12.    ScaleWidth      =   7488
  13.    Top             =   3804
  14.    Width           =   7608
  15.    Begin VB.PictureBox picLander 
  16.       Appearance      =   0  'Flat
  17.       AutoSize        =   -1  'True
  18.       BackColor       =   &H80000005&
  19.       BorderStyle     =   0  'None
  20.       ForeColor       =   &H80000008&
  21.       Height          =   1080
  22.       Index           =   2
  23.       Left            =   3870
  24.       Picture         =   "mhoddp_a.frx":0000
  25.       ScaleHeight     =   1080
  26.       ScaleWidth      =   1152
  27.       TabIndex        =   6
  28.       Top             =   135
  29.       Width           =   1152
  30.    End
  31.    Begin VB.CommandButton cmdAction 
  32.       Caption         =   "cmdAction(1)"
  33.       Height          =   465
  34.       Index           =   1
  35.       Left            =   5670
  36.       TabIndex        =   3
  37.       Top             =   2385
  38.       Width           =   1680
  39.    End
  40.    Begin VB.CommandButton cmdAction 
  41.       Caption         =   "cmdAction(0)"
  42.       Height          =   465
  43.       Index           =   0
  44.       Left            =   5670
  45.       TabIndex        =   2
  46.       Top             =   1845
  47.       Width           =   1680
  48.    End
  49.    Begin VB.PictureBox picLander 
  50.       Appearance      =   0  'Flat
  51.       AutoSize        =   -1  'True
  52.       BackColor       =   &H80000005&
  53.       BorderStyle     =   0  'None
  54.       ForeColor       =   &H80000008&
  55.       Height          =   1080
  56.       Index           =   1
  57.       Left            =   2025
  58.       Picture         =   "mhoddp_a.frx":1162
  59.       ScaleHeight     =   1080
  60.       ScaleWidth      =   1152
  61.       TabIndex        =   1
  62.       Top             =   135
  63.       Width           =   1152
  64.    End
  65.    Begin VB.PictureBox picLander 
  66.       Appearance      =   0  'Flat
  67.       AutoSize        =   -1  'True
  68.       BackColor       =   &H80000005&
  69.       BorderStyle     =   0  'None
  70.       ForeColor       =   &H80000008&
  71.       Height          =   1080
  72.       Index           =   0
  73.       Left            =   180
  74.       Picture         =   "mhoddp_a.frx":22C4
  75.       ScaleHeight     =   1080
  76.       ScaleWidth      =   1152
  77.       TabIndex        =   0
  78.       Top             =   135
  79.       Width           =   1152
  80.    End
  81.    Begin VB.Label lblDescription 
  82.       Alignment       =   2  'Center
  83.       BackStyle       =   0  'Transparent
  84.       Caption         =   "lblDescription"
  85.       Height          =   1320
  86.       Left            =   5625
  87.       TabIndex        =   8
  88.       Top             =   135
  89.       Width           =   1680
  90.    End
  91.    Begin VB.Label lblLander 
  92.       BackStyle       =   0  'Transparent
  93.       Caption         =   "lblLander(2)"
  94.       Height          =   1275
  95.       Index           =   2
  96.       Left            =   3870
  97.       TabIndex        =   7
  98.       Top             =   1530
  99.       Width           =   1725
  100.    End
  101.    Begin VB.Label lblLander 
  102.       BackStyle       =   0  'Transparent
  103.       Caption         =   "lblLander(1)"
  104.       Height          =   1275
  105.       Index           =   1
  106.       Left            =   2025
  107.       TabIndex        =   5
  108.       Top             =   1530
  109.       Width           =   1725
  110.    End
  111.    Begin VB.Label lblLander 
  112.       BackStyle       =   0  'Transparent
  113.       Caption         =   "lblLander(0)"
  114.       Height          =   1275
  115.       Index           =   0
  116.       Left            =   180
  117.       TabIndex        =   4
  118.       Top             =   1530
  119.       Width           =   1725
  120.    End
  121. Attribute VB_Name = "fMain"
  122. Attribute VB_Creatable = False
  123. Attribute VB_Exposed = False
  124. Option Explicit
  125. Sub SetCaptions()
  126. Dim sCaption As String
  127.     sCaption = "Follow these steps to create an irregularly "
  128.     sCaption = sCaption & "shaped image to place on a background."
  129.     lblDescription.Caption = sCaption
  130.     ' Descriptions.
  131.     sCaption = "Step 1 - Draw the irregularly shaped image that you "
  132.     sCaption = sCaption & "want displayed over the background.  Save "
  133.     sCaption = sCaption & "this to a temporary file."
  134.     lblLander(0).Caption = sCaption
  135.     sCaption = "Step 2 - Make every color within the image black.  The "
  136.     sCaption = sCaption & "surrounding area should stay white.  Save this "
  137.     sCaption = sCaption & "as the .PictureMask."
  138.     lblLander(1).Caption = sCaption
  139.     sCaption = "Step 3 - Reopen the original image and change the white "
  140.     sCaption = sCaption & "background to black.  Save this as the .Picture."
  141.     lblLander(2).Caption = sCaption
  142.     ' Buttons.
  143.     cmdAction(0).Caption = "&Show Background..."
  144.     cmdAction(1).Caption = "E&xit"
  145. End Sub
  146. Private Sub cmdAction_Click(Index As Integer)
  147.     Select Case Index
  148.         ' Animate.
  149.         Case 0
  150.             fBackground.Show 1
  151.         ' Exit.
  152.         Case 1
  153.             Unload Me
  154.     End Select
  155. End Sub
  156. Private Sub Form_Load()
  157.     SetCaptions
  158.     ' center form to screen
  159.     Move Abs(Screen.Width - Width) \ 2, Abs(Screen.Height - Height) \ 2
  160. End Sub
  161.