SEGUE ABAIXO O CÓDIGO PARA QUEM TRABALHA COM O VISUAL STUDIO E O VB.
Dim X1, Y1, Width1, Height1, X2, Y2, Width2, Height2
--------------------------------------------------------------------------------------------------
Private Sub Command1_Click()
X1 = 0: Y1 = 0: X2 = 0: Y2 = 0
Width1 = 800: Height1 = 800
Width2 = Image2.Width / 8: Height2 = Image2.Height / 6 ' variável ued e ait
Shape1.Top = Y2: Shape1.Left = X2
Shape1.Width = Image1.Width / 8: Shape1.Height = Image1.Height / 6
Label9 = X1
Label10 = Y1
Label11 = X2
Label12 = Y2
Label13 = Width1
Label14 = Height1
Label15 = Width2
Label16 = Height2
Picture1.Cls
Picture1.PaintPicture Image1, X1, Y1, Width1, Height1, X2, Y2, Width2, Height2
End Sub
--------------------------------------------------------------------------------------------------
Private Sub Command10_Click()
X2 = X2 + 100: VAI
Label13.Caption = X2
End Sub
--------------------------------------------------------------------------------------------------
Private Sub Command11_Click()
X2 = X2 - 100: VAI
Label13.Caption = X2
End Sub
--------------------------------------------------------------------------------------------------
Private Sub Command12_Click()
Y2 = Y2 + 100: VAI
Label14.Caption = Y2
End Sub
--------------------------------------------------------------------------------------------------
Private Sub Command13_Click()
Y2 = Y2 - 100: VAI
Label14.Caption = Y2
End Sub
--------------------------------------------------------------------------------------------------
Private Sub Command14_Click()
Width2 = Width2 + 100: VAI
Label15.Caption = Width2
End Sub
--------------------------------------------------------------------------------------------------
Private Sub Command15_Click()
Width2 = Width2 - 100: VAI
Label15.Caption = Width2
End Sub
--------------------------------------------------------------------------------------------------
Private Sub Command16_Click()
Height2 = Height2 + 100: VAI
Label16.Caption = Height2
End Sub
--------------------------------------------------------------------------------------------------
Private Sub Command17_Click()
Height2 = Height2 - 100: VAI
Label16.Caption = Height2
End Sub
--------------------------------------------------------------------------------------------------
Private Sub Command18_Click()
End
End Sub
--------------------------------------------------------------------------------------------------
Private Sub Command19_Click()
Dim R, F
If Line2(0).Visible = True Then R = "False" Else R = "True"
For F = 0 To 6
Line2(F).Visible = R
Next
For F = 0 To 4
Line3(F).Visible = R
Next
End Sub
--------------------------------------------------------------------------------------------------
Private Sub Command2_Click()
X1 = X1 + 100: VAI
Label9.Caption = X1
End Sub
--------------------------------------------------------------------------------------------------
Private Sub Command3_Click()
X1 = X1 - 100: VAI
Label9.Caption = X1
End Sub
--------------------------------------------------------------------------------------------------
Private Sub Command4_Click()
Y1 = Y1 + 100: VAI
Label10.Caption = Y1
End Sub
--------------------------------------------------------------------------------------------------
Private Sub Command5_Click()
Y1 = Y1 - 100: VAI
Label10.Caption = Y1
End Sub
--------------------------------------------------------------------------------------------------
Private Sub Command6_Click()
Width1 = Width1 + 100: VAI
Label11.Caption = Width1
End Sub
--------------------------------------------------------------------------------------------------
Private Sub Command7_Click()
Width1 = Width1 - 100: VAI
Label11.Caption = Width1
End Sub
--------------------------------------------------------------------------------------------------
Private Sub Command8_Click()
Height1 = Height1 + 100: VAI
Label12.Caption = Height1
End Sub
--------------------------------------------------------------------------------------------------
Private Sub Command9_Click()
Height1 = Height1 - 100: VAI
Label12.Caption = Height1
End Sub
--------------------------------------------------------------------------------------------------
Private Sub VAI()
Picture1.Cls
Picture1.PaintPicture Image1, X1, Y1, Width1, Height1, X2, Y2, Width2, Height2
Shape1.Top = Y2 / 2: Shape1.Left = X2 / 2
Shape1.Width = Image1.Width / 8: Shape1.Height = Image1.Height / 6
End Sub
--------------------------------------------------------------------------------------------------
Private Sub Form_Load()
X1 = 0: Y1 = 0: X2 = 0: Y2 = 0
Width1 = 800: Height1 = 800
Width2 = Image2.Width / 8: Height2 = Image2.Height / 6
Shape1.Top = Y2: Shape1.Left = X2
Shape1.Width = Image1.Width / 8: Shape1.Height = Image1.Height / 6
Image1.Picture = Image2.Picture
X1 = X1 - 100
VAI
End Sub
Nenhum comentário:
Postar um comentário