home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
- Begin VB.Form frmSave
- BorderStyle = 1 'Fixed Single
- Caption = "SAVE AS ..."
- ClientHeight = 5445
- ClientLeft = 45
- ClientTop = 330
- ClientWidth = 4905
- LinkTopic = "Form1"
- LockControls = -1 'True
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 5445
- ScaleWidth = 4905
- StartUpPosition = 3 'Windows Default
- Begin VB.OptionButton opSave
- Caption = "TIFF File"
- Height = 315
- Index = 3
- Left = 3360
- TabIndex = 8
- Top = 210
- Width = 1000
- End
- Begin VB.CommandButton cmOK
- Caption = "OK"
- Height = 375
- Left = 3360
- TabIndex = 7
- Top = 4740
- Width = 1425
- End
- Begin VB.PictureBox pi00
- BackColor = &H80000010&
- Height = 3855
- Left = 150
- ScaleHeight = 3795
- ScaleWidth = 4575
- TabIndex = 4
- Top = 690
- Width = 4635
- Begin VB.PictureBox pi0
- Appearance = 0 'Flat
- AutoSize = -1 'True
- BackColor = &H80000010&
- BorderStyle = 0 'None
- ForeColor = &H80000008&
- Height = 3855
- Left = 0
- ScaleHeight = 3855
- ScaleWidth = 4635
- TabIndex = 5
- Top = 0
- Width = 4635
- End
- End
- Begin MSComctlLib.Slider sldJPG
- Height = 465
- Left = 1560
- TabIndex = 3
- Top = 4680
- Width = 1485
- _ExtentX = 2619
- _ExtentY = 820
- _Version = 393216
- Enabled = 0 'False
- Min = 1
- Max = 100
- SelStart = 65
- TickStyle = 1
- TickFrequency = 10
- Value = 65
- End
- Begin VB.OptionButton opSave
- Caption = "JPG File"
- Height = 315
- Index = 2
- Left = 2310
- TabIndex = 2
- Top = 210
- Width = 1000
- End
- Begin VB.OptionButton opSave
- Caption = "GIF File"
- Height = 315
- Index = 1
- Left = 1260
- TabIndex = 1
- Top = 210
- Width = 1000
- End
- Begin VB.OptionButton opSave
- Caption = "BMP File"
- Height = 315
- Index = 0
- Left = 210
- TabIndex = 0
- Top = 210
- Width = 1000
- End
- Begin VB.Label lbJpg
- Caption = "JPG Compression"
- Enabled = 0 'False
- Height = 285
- Left = 150
- TabIndex = 6
- Top = 4830
- Width = 1515
- End
- Attribute VB_Name = "frmSave"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Option Explicit
- Private m_Cancel As Boolean
- Private m_Compression As Integer
- Private m_Extension As String
- Private Sub cmOK_Click()
- On Error GoTo SErr
- SErr: If ErrS Then Exit Sub
- m_Cancel = False
- Unload Me
- End Sub
- Private Sub Form_Load()
- On Error GoTo SErr
- SErr: If ErrS Then Exit Sub
- m_Cancel = True
- m_Compression = 65
- opSave(0) = True
- pi0.Picture = frmTest.piX.Picture
- pi0.Move (pi00.Width - pi0.Width) / 2, (pi00.Height - pi0.Height) / 2
- Move (Screen.Width - Width) / 2, (Screen.Height - Height) / 2
- End Sub
- Public Property Get Cancel() As Boolean
- Cancel = m_Cancel
- End Property
- Public Property Get Compression() As Integer
- Compression = m_Compression
- End Property
- Public Property Get Extension() As String
- Extension = m_Extension
- End Property
- Function ErrS() As Boolean
- ErrS = False
- If Err.Number <> 0 Then
- MsgBox "Error with number: " & Format(Err.Number, "#,##0") & vbCr & vbCr & Err.Description, vbCritical, "ERROR"
- ErrS = True
- Err.Clear
- End If
- End Function
- Private Sub opSave_Click(Index As Integer)
- On Error GoTo SErr
- SErr: If ErrS Then Exit Sub
- If Index = 0 Then m_Extension = "bmp"
- If Index = 1 Then m_Extension = "gif"
- If Index = 2 Then m_Extension = "jpg"
- If Index = 3 Then m_Extension = "tif"
- If Index = 2 Then
- lbJpg.Enabled = True
- sldJPG.Enabled = True
- Else
- lbJpg.Enabled = False
- sldJPG.Enabled = False
- End If
- End Sub
- Private Sub sldJPG_Change()
- On Error GoTo SErr
- SErr: If ErrS Then Exit Sub
- Dim tmp As String
- tmp = App.Path & "\~tmp"
- frmTest.piX.SavePicture tmp, caFileJpg, sldJPG.Value
- pi0.Picture = LoadPicture(tmp)
- m_Compression = sldJPG.Value
- Kill tmp
- End Sub
-