home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Graphics Programming (2nd Edition) / Visual Basic Graphics Programming 2nd Edition.iso / OldSrc / CH4 / SRC / FILEFRM2.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1996-05-01  |  5.2 KB  |  186 lines

  1. VERSION 4.00
  2. Begin VB.Form FilesForm 
  3.    Caption         =   "Select Files"
  4.    ClientHeight    =   2850
  5.    ClientLeft      =   510
  6.    ClientTop       =   1035
  7.    ClientWidth     =   4065
  8.    Height          =   3540
  9.    Left            =   450
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   2850
  12.    ScaleWidth      =   4065
  13.    Top             =   405
  14.    Width           =   4185
  15.    Begin VB.TextBox YOffText 
  16.       Height          =   285
  17.       Left            =   960
  18.       TabIndex        =   10
  19.       Text            =   "-85"
  20.       Top             =   1920
  21.       Width           =   495
  22.    End
  23.    Begin VB.TextBox XOffText 
  24.       Height          =   285
  25.       Left            =   960
  26.       TabIndex        =   9
  27.       Text            =   "73"
  28.       Top             =   1560
  29.       Width           =   495
  30.    End
  31.    Begin VB.CommandButton CmdLoad 
  32.       Caption         =   "Load"
  33.       Default         =   -1  'True
  34.       Height          =   495
  35.       Left            =   1680
  36.       TabIndex        =   8
  37.       Top             =   2280
  38.       Width           =   735
  39.    End
  40.    Begin VB.TextBox SourceText 
  41.       Height          =   285
  42.       Left            =   960
  43.       TabIndex        =   0
  44.       Text            =   "Char2.bmp"
  45.       Top             =   120
  46.       Width           =   3015
  47.    End
  48.    Begin VB.TextBox DestText 
  49.       Height          =   285
  50.       Left            =   960
  51.       TabIndex        =   1
  52.       Text            =   "Sanitas5.bmp"
  53.       Top             =   480
  54.       Width           =   3015
  55.    End
  56.    Begin VB.TextBox Mask1Text 
  57.       Height          =   285
  58.       Left            =   960
  59.       TabIndex        =   2
  60.       Text            =   "Char2M.bmp"
  61.       Top             =   840
  62.       Width           =   3015
  63.    End
  64.    Begin VB.TextBox Mask2Text 
  65.       Height          =   285
  66.       Left            =   960
  67.       TabIndex        =   3
  68.       Text            =   "SanitasM.bmp"
  69.       Top             =   1200
  70.       Width           =   3015
  71.    End
  72.    Begin VB.Label Label1 
  73.       Caption         =   "YOffset"
  74.       Height          =   255
  75.       Index           =   5
  76.       Left            =   120
  77.       TabIndex        =   12
  78.       Top             =   1920
  79.       Width           =   855
  80.    End
  81.    Begin VB.Label Label1 
  82.       Caption         =   "XOffset"
  83.       Height          =   255
  84.       Index           =   4
  85.       Left            =   120
  86.       TabIndex        =   11
  87.       Top             =   1560
  88.       Width           =   855
  89.    End
  90.    Begin VB.Label Label1 
  91.       Caption         =   "Source"
  92.       Height          =   255
  93.       Index           =   0
  94.       Left            =   120
  95.       TabIndex        =   7
  96.       Top             =   120
  97.       Width           =   855
  98.    End
  99.    Begin VB.Label Label1 
  100.       Caption         =   "Destination"
  101.       Height          =   255
  102.       Index           =   1
  103.       Left            =   120
  104.       TabIndex        =   6
  105.       Top             =   480
  106.       Width           =   855
  107.    End
  108.    Begin VB.Label Label1 
  109.       Caption         =   "Mask1"
  110.       Height          =   255
  111.       Index           =   2
  112.       Left            =   120
  113.       TabIndex        =   5
  114.       Top             =   840
  115.       Width           =   855
  116.    End
  117.    Begin VB.Label Label1 
  118.       Caption         =   "Mask2"
  119.       Height          =   255
  120.       Index           =   3
  121.       Left            =   120
  122.       TabIndex        =   4
  123.       Top             =   1200
  124.       Width           =   855
  125.    End
  126.    Begin VB.Menu mnuFile 
  127.       Caption         =   "File"
  128.       Begin VB.Menu mnuFileExit 
  129.          Caption         =   "E&xit"
  130.       End
  131.    End
  132. Attribute VB_Name = "FilesForm"
  133. Attribute VB_Creatable = False
  134. Attribute VB_Exposed = False
  135. Option Explicit
  136. Sub WaitEnd()
  137.     MousePointer = vbDefault
  138. End Sub
  139. Sub WaitStart()
  140.     MousePointer = vbHourglass
  141. End Sub
  142. Private Sub Form_Load()
  143. Dim pth As String
  144. Dim loc As Integer
  145.     pth = UCase$(App.Path)
  146.     loc = InStr(pth, "\CH4")
  147.     If loc > 0 Then pth = Left$(pth, loc + 3) & "\DATA"
  148.     SourceText.Text = pth & "\" & SourceText.Text
  149.     DestText.Text = pth & "\" & DestText.Text
  150.     Mask1Text.Text = pth & "\" & Mask1Text.Text
  151.     Mask2Text.Text = pth & "\" & Mask2Text.Text
  152. End Sub
  153. Private Sub Form_Unload(Cancel As Integer)
  154.     End
  155. End Sub
  156. ' ***********************************************
  157. ' End the application.
  158. ' ***********************************************
  159. Private Sub mnuFileExit_Click()
  160.     End
  161. End Sub
  162. ' ***********************************************
  163. ' Load the image files.
  164. ' ***********************************************
  165. Private Sub CmdLoad_Click()
  166. Dim frm As CompositeForm2
  167. Dim xoff As Integer
  168. Dim yoff As Integer
  169.     On Error GoTo Done
  170.     WaitStart
  171.     If IsNumeric(XOffText.Text) Then _
  172.         xoff = CInt(XOffText.Text)
  173.     If IsNumeric(YOffText.Text) Then _
  174.         yoff = CInt(YOffText.Text)
  175.     Set frm = New CompositeForm2
  176.     frm.Show
  177.     If Not frm.LoadFiles( _
  178.         Trim$(SourceText.Text), _
  179.         Trim$(DestText.Text), _
  180.         Trim$(Mask1Text.Text), _
  181.         Trim$(Mask2Text.Text)) Then _
  182.             frm.MakeComposite xoff, yoff
  183. Done:
  184.     WaitEnd
  185. End Sub
  186.