Procedure references – PicInfo sample application
IPicInfo
Filename [Get]
Public Property Get Filename() As StringDead but exposed
MaxColors [Get]
Public Property Get MaxColors() As VariantPicForm.DisplayPictureInfo:
MaxColors = IPicInfo.MaxColors
ReadFile
Public Function ReadFile(ByVal Filename As String) As BooleanPicForm.DisplayPictureInfo:
If IPicInfo.ReadFile(Filename) Then
Size [Get]
Public Property Get Size() As TPicSizePicForm.DisplayPictureInfo:
PicSize = IPicInfo.Size
PicBMP
IPicInfo_ Filename [Get]
Private Property Get IPicInfo_IPicInfo_ MaxColors [Get]
Private Property Get IPicInfo_IPicInfo_ ReadFile
Private Function IPicInfo_IPicInfo_ Size [Get]
Private Property Get IPicInfo_ReadBitmapFile
Private Function ReadBitmapFile(ByVal Filename As String) As BooleanPicBMP.IPicInfo_
IPicInfo_
PicForm
DisplayPictureInfo
Private Sub DisplayPictureInfo(ByVal Filename As String)PicForm.OpenFile_
DisplayPictureInfo Filename
PicForm.Pict_
DisplayPictureInfo Data.Files(1)
Form_ KeyPress
Private Sub Form_Dead - KeyPreview = False
Form_ Load
Private Sub Form_OpenFile_ Click
Private Sub OpenFile_PicForm.Form_
OpenFile_
Pict_ OLEDragDrop
Private Sub Pict_Pict_ OLEDragOver
Private Sub Pict_SaveFile_ Click
Private Sub SaveFile_PicGIF
IPicInfo_ Filename [Get]
Private Property Get IPicInfo_IPicInfo_ MaxColors [Get]
Private Property Get IPicInfo_IPicInfo_ ReadFile
Private Function IPicInfo_IPicInfo_ Size [Get]
Private Property Get IPicInfo_ReadGIF
Private Function ReadGIF(ByVal GIFFilename As String) As BooleanPicGIF.IPicInfo_
IPicInfo_
UInt
Private Function UInt(ByVal i As Integer) As LongPicGIF.IPicInfo_
IPicInfo_
IPicInfo_
Version [Get]
Friend Property Get Version() As StringDead
PicMain
CommDlgExtendedError
Private Declare Function CommDlgExtendedError Lib "comdlg32.dll" () As LongPicMain.FileDialog:
ErrCode = CommDlgExtendedError()
FileDialog
Private Function FileDialog(ByVal hwndOwner As Long, ByVal DefaultExtension As String, ByVal Filter As String, ByRef FilterIndex As Long, ByVal InitialDir As String, ByVal DialogTitle As String, ByRef Flags As EFileDlgFlags) As StringPicMain.ShowFileOpenDialog:
ShowFileOpenDialog = FileDialog(hwndOwner, DefaultExtension, Filter, FilterIndex, InitialDir, DialogTitle, Flags)
GetOpenFileNameA
Private Declare Function GetOpenFileNameA Lib "comdlg32.dll" (pOpenfilename As OpenFilename) As LongPicMain.FileDialog:
Result = GetOpenFileNameA(OFN)
GetSaveFileNameA
Private Declare Function GetSaveFileNameA Lib "comdlg32.dll" (pOpenfilename As OpenFilename) As LongDead
Main
Sub Main()ShowFileOpenDialog
Public Function ShowFileOpenDialog(ByVal hwndOwner As Long, ByVal DefaultExtension As String, ByVal Filter As String, Optional ByRef FilterIndex As Long, Optional ByVal InitialDir As String, Optional ByVal DialogTitle As String, Optional ByRef Flags As EFileDlgFlags = OFN_PicForm.OpenFile_
Filename = ShowFileOpenDialog(Me.hWnd, "", "Picture files (*.gif;*.bmp)|*.gif;*.bmp")