home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / CODE_UPLOAD80447232000.psc / PSSC1 / frmOpenPicForOpt1.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2000-07-13  |  2.7 KB  |  90 lines

  1. VERSION 5.00
  2. Begin VB.Form frmOpenPicForOpt1 
  3.    BorderStyle     =   1  'Fixed Single
  4.    Caption         =   "Open Picture:"
  5.    ClientHeight    =   4140
  6.    ClientLeft      =   45
  7.    ClientTop       =   330
  8.    ClientWidth     =   4815
  9.    ControlBox      =   0   'False
  10.    ForeColor       =   &H00C0C0C0&
  11.    LinkTopic       =   "Form1"
  12.    MaxButton       =   0   'False
  13.    MinButton       =   0   'False
  14.    ScaleHeight     =   4140
  15.    ScaleWidth      =   4815
  16.    StartUpPosition =   2  'CenterScreen
  17.    Begin VB.CommandButton Command2 
  18.       Caption         =   "Cancel"
  19.       Height          =   375
  20.       Left            =   2400
  21.       TabIndex        =   4
  22.       Top             =   3600
  23.       Width           =   2295
  24.    End
  25.    Begin VB.CommandButton Command1 
  26.       Caption         =   "&Add Picture"
  27.       Height          =   375
  28.       Left            =   2400
  29.       TabIndex        =   3
  30.       Top             =   3120
  31.       Width           =   2295
  32.    End
  33.    Begin VB.FileListBox File1 
  34.       Height          =   2820
  35.       Left            =   2400
  36.       Pattern         =   "*.bmp*;*.gif*;*.jpg*;*.wmf*"
  37.       TabIndex        =   2
  38.       Top             =   120
  39.       Width           =   2295
  40.    End
  41.    Begin VB.DirListBox Dir1 
  42.       Height          =   3465
  43.       Left            =   120
  44.       TabIndex        =   1
  45.       Top             =   480
  46.       Width           =   2175
  47.    End
  48.    Begin VB.DriveListBox Drive1 
  49.       Height          =   315
  50.       Left            =   120
  51.       TabIndex        =   0
  52.       Top             =   120
  53.       Width           =   2175
  54.    End
  55. Attribute VB_Name = "frmOpenPicForOpt1"
  56. Attribute VB_GlobalNameSpace = False
  57. Attribute VB_Creatable = False
  58. Attribute VB_PredeclaredId = True
  59. Attribute VB_Exposed = False
  60. Private Sub Command1_Click()
  61. ShowCursor (bShow = True) 'hide mouse pointer
  62. On Error GoTo er67h 'error handler
  63. frmOpt1Final.Image1.Picture = LoadPicture(Dir1.Path + "\" + File1.FileName) 'loads selected pic in the next forms image box
  64. frmOpt1Final.Show
  65. Me.Hide
  66. Exit Sub
  67. er67h:
  68. MsgBox Err.Description, vbOKOnly + vbCritical, "Error:"
  69. MsgBox "If the file you tried to load was in a drive and not a folder, then you must move that file to a folder and try again.  I'm sorry about this small problem!", vbExclamation + vbOKOnly, "Note:"
  70. Exit Sub
  71. End Sub
  72. Private Sub Command2_Click()
  73. frmSelectPicBasedScrSaver.Show
  74. Unload Me
  75. Load Me
  76. End Sub
  77. Private Sub Dir1_Change()
  78. File1.Path = Dir1.Path
  79. End Sub
  80. Private Sub Drive1_Change()
  81. On Error GoTo erh 'error handler
  82. Dir1.Path = Drive1.Drive
  83. Exit Sub
  84. MsgBox Err.Description, vbCritical + vbOKOnly, "Error:"
  85. Exit Sub
  86. End Sub
  87. Private Sub File1_DblClick()
  88. Command1_Click
  89. End Sub
  90.