VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "Comdlg32.ocx"
Begin VB.Form Form2 
   Caption         =   "Form2"
   ClientHeight    =   6795
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   8385
   Icon            =   "Просмотр.frx":0000
   LinkTopic       =   "Form2"
   ScaleHeight     =   6795
   ScaleWidth      =   8385
   StartUpPosition =   3  'Windows Default
   WindowState     =   2  'Maximized
   Begin MSComDlg.CommonDialog Dlg1 
      Left            =   7440
      Top             =   240
      _ExtentX        =   847
      _ExtentY        =   847
      _Version        =   393216
      DialogTitle     =   "Загрузка фото"
      Filter          =   "*.bmp, *.jpg, *.gif"
      FontBold        =   -1  'True
      FontItalic      =   -1  'True
      FontStrikeThru  =   -1  'True
      FontUnderLine   =   -1  'True
      MaxFileSize     =   26000
   End
   Begin VB.CommandButton Command3 
      Height          =   495
      Left            =   7320
      Picture         =   "Просмотр.frx":0442
      Style           =   1  'Graphical
      TabIndex        =   2
      Top             =   1800
      Width           =   495
   End
   Begin VB.CommandButton Command2 
      DisabledPicture =   "Просмотр.frx":0884
      Height          =   495
      Left            =   6360
      Picture         =   "Просмотр.frx":0CC6
      Style           =   1  'Graphical
      TabIndex        =   1
      Top             =   1800
      Width           =   495
   End
   Begin VB.CommandButton Command1 
      Caption         =   "Загрузка"
      Height          =   495
      Left            =   6360
      TabIndex        =   0
      Top             =   1080
      Width           =   1455
   End
   Begin VB.Image Image1 
      Height          =   6735
      Left            =   0
      Top             =   0
      Width           =   5895
   End
End
Attribute VB_Name = "Form2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim метка, мет, rf, les, aa, rfiles As String, a, x, y As Integer, fl As Boolean

Private Sub Command1_Click()
On Error GoTo метка
fl = True
Dlg1.ShowOpen
rfiles = Dlg1.FileName
Image1.Picture = LoadPicture(rfiles)
x = Image1.Picture.Width
y = Image1.Picture.Height
If x > 11000 Or y > 9000 Then
x = 11000
y = 9000
End If
If fl = True Then
Image1.Width = x
Image1.Height = y
'Form1.Width = x + 2200
'Form1.Height = y + 500

Else
x = 6975
y = 5665
Image1.Width = x
Image1.Height = y
'Form1.Width = x + 2200
'Form1.Height = y + 500
End If

Exit Sub

метка:
Image1.Picture = LoadPicture()
fl = False
End Sub

Private Sub Command2_Click()
On Error GoTo метка

Form2.Cls

CurrentX = ScaleWidth - 4100
CurrentY = ScaleHeight - 4300
Form2.Print rfiles
rf = Left(rfiles, Len(rfiles) - 4)
les = Right(rfiles, 4)
aa = Mid(rfiles, Len(rfiles) - 5, 2)

a = Val(aa)
a = a - 1

If a < 1 Then a = 53

If a <= 10 And a >= 1 Then
aa = Right(Str(a), Len(Str(a) - 1))
rfiles = Left(rfiles, Len(rfiles) - 6) + "0" + aa + les
End If

If Val(aa) = 0 Then
rfiles = Left(rfiles, Len(rfiles) - 6) + "10" + les
a = 11
GoTo мет
End If

If a > 10 Then
aa = Right(Str(a), Len(Str(a) - 1))
rfiles = Left(rfiles, Len(rfiles) - 6) + aa + les
End If

мет:
CurrentX = ScaleWidth - 4100
CurrentY = ScaleHeight - 4100

Form2.Print rfiles, aa

Image1.Picture = LoadPicture(rfiles)
x = Image1.Picture.Width
y = Image1.Picture.Height
метка:

End Sub

Private Sub Command3_Click()
On Error GoTo метка

Form2.Cls

CurrentX = ScaleWidth - 4100
CurrentY = ScaleHeight - 4300
Form2.Print rfiles
rf = Left(rfiles, Len(rfiles) - 4)
les = Right(rfiles, 4)
aa = Mid(rfiles, Len(rfiles) - 5, 2)


a = Val(aa)
a = a + 1

If a > 53 Then a = 1

If a <= 10 And a >= 1 Then
aa = Right(Str(a), Len(Str(a) - 1))
rfiles = Left(rfiles, Len(rfiles) - 6) + "0" + aa + les
End If

If Val(aa) = 0 Then
rfiles = Left(rfiles, Len(rfiles) - 6) + "10" + les
a = 11
GoTo мет
End If

If a > 10 Then
aa = Right(Str(a), Len(Str(a) - 1))
rfiles = Left(rfiles, Len(rfiles) - 6) + aa + les
End If

мет:

CurrentX = ScaleWidth - 4100
CurrentY = ScaleHeight - 4100

Form2.Print rfiles, aa

Image1.Picture = LoadPicture(rfiles)
x = Image1.Picture.Width
y = Image1.Picture.Height

метка:

End Sub

Private Sub Form_Click()
Form2.Visible = False
End Sub

Private Sub Form_Load()
fl = False
End Sub

Private Sub Form_Resize()

If fl = True Then
Image1.Width = x
Image1.Height = y
Else
'x = 6975
'y = 5665
'Image1.Width = x
'Image1.Height = y
'Form1.Width = x + 2200
'Form1.Height = y + 100
End If
 
 Command1.Top = ScaleHeight - 2100
 Command2.Top = ScaleHeight - 1100
 Command3.Top = ScaleHeight - 1100
  Command1.Left = ScaleWidth - 1600
 Command2.Left = ScaleWidth - 2100
 Command3.Left = ScaleWidth - 1100
'Picture1.Width = Form1.Width - Picture1.Width
'If ScaleWidth > 2200 Then Image1.Width = ScaleWidth - 2200
'If ScaleHeight > 500 Then Image1.Height = ScaleHeight - 500

'Picture1.Top = ScaleHeight - 7000
'Picture1.Left = ScaleWidth - 8100

End Sub

Private Sub Image1_Click()
Form2.Visible = False

End Sub
