vbAccelerator - Contents of code file: frmLaunch.frm

VERSION 5.00
Begin VB.Form frmLaunch 
   Caption         =   "Form1"
   ClientHeight    =   5640
   ClientLeft      =   2850
   ClientTop       =   2550
   ClientWidth     =   6135
   Icon            =   "frmLaunch.frx":0000
   LinkTopic       =   "Form1"
   ScaleHeight     =   5640
   ScaleWidth      =   6135
   Begin VB.CommandButton cmdPreview 
      Caption         =   "Pic File &Preview"
      BeginProperty Font 
         Name            =   "Tahoma"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   1335
   End
   Begin VB.Image imgPicture 
      Height          =   4815
      Left            =   0
      Top             =   720
      Width           =   6195
   End
   Begin VB.Label lblInfo 
      Caption         =   "Visit vbAccelerator on the web at
       http://vbaccelerator.com/"
      BeginProperty Font 
         Name            =   "Tahoma"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   435
      Left            =   1500
      TabIndex        =   2
      Top             =   0
      Width           =   2775
   End
   Begin VB.Label lblFile 
      BeginProperty Font 
         Name            =   "Tahoma"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   0
      TabIndex        =   1
      Top             =   420
      Width           =   6075
   End
End
Attribute VB_Name = "frmLaunch"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub cmdPreview_Click()
   Load frmPreview
   
   frmPreview.OwnerForm = Me
   Set frmPreview.cD = New cCommonDialog
   With frmPreview.cD
      .InitDir = App.Path
      .Filter = "Picture Files
       (*.JPG;*.GIF;*.BMP;*.ICO)|*.JPG;*.GIF;*.BMP;*.ICO|JPEG Files
       (*.JPG)|*.JPG|Graphics Interchange Files (*.GIF)|*.GIF|Bitmap Files
       (*.BMP;*.DIB)|*.BMP;*.DIB|Icon Files (*.ICO)|*.ICO|All Files (*.*)|*.*"
      .flags = OFN_FILEMUSTEXIST Or OFN_PATHMUSTEXIST Or OFN_HIDEREADONLY
      .FilterIndex = 1
      .DefaultExt = "BMP"
      .HookDialog = True
   
      'Make Dialog owner Me
      .hWnd = Me.hWnd
      .ShowOpen
       
      ' Will be blank if cancelled:
      lblFile.Caption = .filename
      If Not lblFile.Caption = "" Then
         Set imgPicture.Picture = LoadPicture(lblFile.Caption)
      Else
         Set imgPicture.Picture = Nothing
      End If
   End With
   
   Unload frmPreview
   Set frmPreview = Nothing

End Sub