home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Final Windows Shareware CD
/
_.img
/
winshare
/
vb
/
bmpview2
/
openbmp.frm
< prev
Wrap
Text File
|
1993-09-20
|
11KB
|
395 lines
VERSION 2.00
Begin Form OpenBitmap
BorderStyle = 1 'Fixed Single
Caption = "Bitmap Viewer Control"
ClientHeight = 3108
ClientLeft = 3108
ClientTop = 3852
ClientWidth = 5688
ClipControls = 0 'False
Height = 3480
Left = 3084
LinkTopic = "Form2"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3108
ScaleWidth = 5688
Top = 3504
Width = 5736
Begin SSCheck SaveSettings
Caption = "&Save settings on exit"
Font3D = 0 'None
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 6.6
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00000000&
Height = 252
Left = 240
TabIndex = 8
Top = 2160
Width = 2292
End
Begin SSCommand AboutBitmap
Caption = "&About Viewer"
Font3D = 3 'Inset w/light shading
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 6.6
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00000000&
Height = 372
Left = 240
TabIndex = 7
Top = 600
Width = 1812
End
Begin SSCommand ExitViewer
Caption = "E&xit Viewer"
Font3D = 3 'Inset w/light shading
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 6.6
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00000000&
Height = 372
Left = 240
TabIndex = 6
Top = 1680
Width = 1812
End
Begin SSCommand Close
Caption = "&Close"
Font3D = 3 'Inset w/light shading
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 6.6
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00000000&
Height = 372
Left = 240
TabIndex = 5
Top = 1320
Width = 1812
End
Begin SSCommand LoadBMP
Caption = "&Load BMP"
Font3D = 3 'Inset w/light shading
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 6.6
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00000000&
Height = 372
Left = 240
TabIndex = 4
Top = 960
Width = 1812
End
Begin SSPanel Panel3D1
Align = 2 'Align Bottom
Alignment = 0 'Left Justify - TOP
BackColor = &H00C0C0C0&
BevelInner = 2 'Raised
BevelWidth = 3
Caption = "Panel3D1"
FloodShowPct = 0 'False
FloodType = 4 'Bottom To Top
Font3D = 0 'None
ForeColor = &H00000000&
Height = 3108
Left = 0
RoundedCorners = 0 'False
ShadowColor = 1 'Black
TabIndex = 0
Top = 0
Width = 5688
Begin SSCheck Aspect
Caption = "&Maintain aspect ratio"
Font3D = 0 'None
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 6.6
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00000000&
Height = 252
Left = 240
TabIndex = 10
Top = 2640
Width = 2292
End
Begin SSCheck OnTop
Caption = "&Always on top"
Font3D = 0 'None
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 6.6
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00000000&
Height = 252
Left = 240
TabIndex = 9
Top = 2400
Width = 2292
End
Begin FileListBox File1
BackColor = &H00C0C0C0&
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 6.6
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00000000&
Height = 2520
Left = 3960
Pattern = "*.BMP"
TabIndex = 3
Top = 240
Width = 1452
End
Begin DirListBox Dir1
BackColor = &H00C0C0C0&
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 6.6
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00000000&
Height = 1824
Left = 2160
TabIndex = 2
Top = 240
Width = 1692
End
Begin DriveListBox Drive1
BackColor = &H00C0C0C0&
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 6.6
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00000000&
Height = 252
Left = 240
TabIndex = 1
Top = 240
Width = 1812
End
End
End
Sub AboutBitmap_Click ()
BmpABout.Show 1
End Sub
Sub Close_Click ()
OpenBitmap.Hide
If (OnTop = True) Then
Topmost
Else
NotTopMost
End If
End Sub
Sub Dir1_Change ()
File1.Path = Dir1.Path
File1.SetFocus
If File1.ListCount Then
File1.ListIndex = 0
If LoadBMP.Enabled = False Then
LoadBMP.Enabled = True
End If
Else
LoadBMP.Enabled = False
End If
End Sub
Sub Dir1_Click ()
LastChange = DIRSBOXCLICK
End Sub
Sub Drive1_Change ()
On Error Resume Next
Dir1.Path = Drive1.Drive
If Err Then
MsgBox Error$
Drive1.Drive = Dir1.Path
End If
End Sub
Sub ExitViewer_Click ()
If (SaveSettings = True) Then
SaveINI
End If
BmpView.Image1.Picture = LoadPicture("")
Unload OpenBitmap
Unload BmpABout
Unload BmpView
End
End Sub
Sub File1_Click ()
LastChange = FileFormCLICK
If File1.ListCount Then
If LoadBMP.Enabled = False Then
LoadBMP.Enabled = True
End If
Else
LoadBMP.Enabled = False
End If
End Sub
Sub File1_DblClick ()
LoadBMP_Click
End Sub
Sub Form_Load ()
' Dim tmp As Integer
' Dim Slash As Integer
LoadBMP.Enabled = False
' If (BMPFileName <> "") Then
' tmp = InStr(BMPFileName, "\")
' While (tmp)
' Slash = tmp
' tmp = InStr(Slash + 1, BMPFileName, "\")
' Wend
' Dir1.Path = Left$(BMPFileName, Slash - 1)
' End If
End Sub
Sub Form_Unload (Cancel As Integer)
End Sub
Sub LoadBMP_Click ()
TheNewPath = Dir1.Path
If Right$(TheNewPath, 1) <> "\" Then
TheNewPath = TheNewPath + "\"
End If
BMPFileName = TheNewPath + OpenBitmap.File1.FileName
ViewAllowResize = False
ImageLoad
ViewAllowResize = True
OpenBitmap.Hide
If (OnTop = True) Then
Topmost
Else
NotTopMost
End If
End Sub
Sub SaveINI ()
Dim LIN As String
Dim NoTitle As String
Dim SaveSet As String
Dim Always As String
Dim AspectRatio As String
Dim INIChan As Integer
On Error GoTo INIERROR
INIChan% = 1
If (BmpView.Caption = "") Then
NoTitle = "Yes"
Else
NoTitle = "No"
End If
If (SaveSettings = True) Then
SaveSet = "Yes"
Else
SaveSet = "No"
End If
If (OnTop = True) Then
Always = "Yes"
Else
Always = "No"
End If
If (Aspect = True) Then
AspectRatio = "Yes"
Else
AspectRatio = "No"
End If
Open "C:\WINDOWS\BMPVIEW.INI" For Output As #INIChan%
Print #INIChan%, "[Current Bitmap]"
Print #INIChan%, BMPFileName
Print #INIChan%, "[Top]"
Print #INIChan%, Str$(BmpView.Top)
Print #INIChan%, "[Left]"
Print #INIChan%, Str$(BmpView.Left)
Print #INIChan%, "[Height]"
Print #INIChan%, Str$(BmpView.Height)
Print #INIChan%, "[Width]"
Print #INIChan%, Str$(BmpView.Width)
Print #INIChan%, "[No Title]"
Print #INIChan%, NoTitle
Print #INIChan%, "[Save Settings]"
Print #INIChan%, SaveSet
Print #INIChan%, "[Always on top]"
Print #INIChan%, Always
Print #INIChan%, "[Aspect Ratio]"
Print #INIChan%, AspectRatio
Close #INIChan%
Exit Sub
INIERROR:
If (Err) Then
MsgBox "Error saving BMPVIEW.INI in C:\WINDOWS"
Resume CarryOn
End If
CarryOn:
Form_Unload 0
End
End Sub