Dim backpiece As Integer
Dim middlepiece As Integer
Dim frontpiece As Integer
Dim bbtype As Integer
Dim backpiecedc As String
Dim middlepiecedc As String
Dim frontpiecedc As String
Dim backdc As String
Dim middledc As String
Dim frontdc As String
Dim backdcwidth As Integer
Dim backdcheight As Integer
Dim middledcwidth As Integer
Dim middledcheight As Integer
Dim frontdcwidth As Integer
Dim frontdcheight As Integer
Dim offset As Integer
Dim backdcground As Integer
Dim middledcground As Integer
Dim frontdcground As Integer
Dim color As Integer
Dim front As String
Dim colorn As String
--------------------------------------------------------------
Private Sub backarrowdown_Click()
backpiece = backpiece - 1
bbtype = 1
refreshimage
End Sub
Private Sub backarrowup_Click()
backpiece = backpiece + 1
bbtype = 1
refreshimage
End Sub
Private Sub colorblue_Click()
color = 1
bbtype = 1
colorn = "blue"
refreshimage
End Sub
Private Sub colorred_Click()
color = 2
bbtype = 1
colorn = "red"
refreshimage
End Sub
Private Sub Form_Load()
backpiece = 1
middlepiece = 1
frontpiece = 1
bbtype = 1
color = 2
refreshimage
End Sub
Private Sub frontarrowdown_Click()
frontpiece = frontpiece - 1
bbtype = 1
refreshimage
End Sub
Private Sub frontarrowup_Click()
frontpiece = frontpiece + 1
bbtype = 1
refreshimage
End Sub
Private Sub midarrowdown_Click()
middlepiece = middlepiece - 1
bbtype = 1
refreshimage
End Sub
Private Sub midarrowup_Click()
middlepiece = middlepiece + 1
bbtype = 1
refreshimage
End Sub
Private Sub refreshimage()
BitBlt carscreen.hDC, 0, 0, 800 * 15, 350 * 15, refreshbox.hDC, 0, 0, SRCCOPY
If backpiece = 1 Then
If color = 2 Then
backdc = fiftyfivecrownvicbackred.hDC
backdcwidth = fiftyfivecrownvicbackred.Width
backdcheight = fiftyfivecrownvicbackred.Height
backdcground = 350 - (fiftyfivecrownvicbackred.Height / 15)
End If
If color = 1 Then
backdc = fiftyfivecrownvicbackblue.hDC
backdcwidth = fiftyfivecrownvicbackblue.Width
backdcheight = fiftyfivecrownvicbackblue.Height
backdcground = 350 - (fiftyfivecrownvicbackblue.Height / 15)
End If
End If
If backpiece = 2 Then
backdc = fiftyfiveimperialbackred.hDC
backdcwidth = fiftyfiveimperialbackred.Width
backdcheight = fiftyfiveimperialbackred.Height
backdcground = 350 - (fiftyfiveimperialbackred.Height / 15)
End If
If backpiece = 3 Then
backdc = fiftyfivedevillebackred.hDC
backdcwidth = fiftyfivedevillebackred.Width
backdcheight = fiftyfivedevillebackred.Height
backdcground = 350 - (fiftyfivedevillebackred.Height / 15)
End If
If backpiece = 4 Then
backdc = fiftyfivedevillesedanbackred.hDC
backdcwidth = fiftyfivedevillesedanbackred.Width
backdcheight = fiftyfivedevillesedanbackred.Height
backdcground = 350 - (fiftyfivedevillesedanbackred.Height / 15)
End If
If backpiece = 5 Then
backdc = fiftyfivetwotensedanbackred.hDC
backdcwidth = fiftyfivetwotensedanbackred.Width
backdcheight = fiftyfivetwotensedanbackred.Height
backdcground = 350 - (fiftyfivetwotensedanbackred.Height / 15)
End If
If middlepiece = 1 Then
If color = 2 Then
middledc = fiftyfivecrownvicmiddlered.hDC
middledcwidth = fiftyfivecrownvicmiddlered.Width
middledcheight = fiftyfivecrownvicmiddlered.Height
middledcground = 350 - (fiftyfivecrownvicmiddlered.Height / 15)
End If
If color = 1 Then
middledc = fiftyfivecrownvicmiddleblue.hDC
middledcwidth = fiftyfivecrownvicmiddleblue.Width
middledcheight = fiftyfivecrownvicmiddleblue.Height
middledcground = 350 - (fiftyfivecrownvicmiddleblue.Height / 15)
End If
End If
If middlepiece = 2 Then
middledc = fiftysixcrownvicmiddlered.hDC
middledcwidth = fiftysixcrownvicmiddlered.Width
middledcheight = fiftysixcrownvicmiddlered.Height
middledcground = 350 - (fiftysixcrownvicmiddlered.Height / 15)
End If
If middlepiece = 3 Then
middledc = fiftyfivespecialmiddlered.hDC
middledcwidth = fiftyfivespecialmiddlered.Width
middledcheight = fiftyfivespecialmiddlered.Height
middledcground = 350 - (fiftyfivespecialmiddlered.Height / 15)
End If
If frontpiece = 1 Then
If color = 2 Then
frontdc = fiftyfivecrownvicfrontred.hDC
frontdcwidth = fiftyfivecrownvicfrontred.Width
frontdcheight = fiftyfivecrownvicfrontred.Height
frontdcground = 350 - (fiftyfivecrownvicfrontred.Height / 15)
End If
If color = 1 Then
frontdc = fiftyfivecrownvicfrontblue.hDC
frontdcwidth = fiftyfivecrownvicfrontblue.Width
frontdcheight = fiftyfivecrownvicfrontblue.Height
frontdcground = 350 - (fiftyfivecrownvicfrontblue.Height / 15)
End If
End If
If frontpiece = 2 Then
frontdc = fiftyfiveimperialfrontred.hDC
frontdcwidth = fiftyfiveimperialfrontred.Width
frontdcheight = fiftyfiveimperialfrontred.Height
frontdcground = 350 - (fiftyfiveimperialfrontred.Height / 15)
End If
If frontpiece = 3 Then
frontdc = fiftyfivefleetwoodfrontred.hDC
frontdcwidth = fiftyfivefleetwoodfrontred.Width
frontdcheight = fiftyfivefleetwoodfrontred.Height
frontdcground = 350 - (fiftyfivefleetwoodfrontred.Height / 15)
End If
If bbtype = 1 Then
BitBlt carscreen.hDC, 0, backdcground, backdcwidth, backdcheight, backdc, 0, 0, SRCCOPY
BitBlt carscreen.hDC, backdcwidth / 15, middledcground, middledcwidth, middledcheight, middledc, 0, 0, SRCCOPY
BitBlt carscreen.hDC, (backdcwidth / 15 + middledcwidth / 15), frontdcground, frontdcwidth, frontdcheight, frontdc, 0, 0, SRCCOPY
End If
bbtype = 0
carscreen.Refresh
End Sub