Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB Graphic Expert

Status
Not open for further replies.

marble

Programmer
Mar 17, 2001
22
CA
I am trying to create a Picture Viewer project! On the main form you can select drives, dir, and files. I can view the pictures correctly on the main form.

However when I try a print preview, the scaling of the pictures do not work. I have a dropdown combo box so that I can select different sizes of that pic. This does not work.

Can someone point me in the right direction! My code is below!

Thankyou in advance for any help!


i = 0 ' this var is declared public in module

If cboScale.List(0) Then
i = 0.25
ElseIf cboScale.List(1) Then
i = 0.5
ElseIf cboScale.List(2) Then
i = 1
ElseIf cboScale.List(3) Then
i = 1.25
ElseIf cboScale.List(4) Then
i = 1.5
ElseIf cboScale.List(5) Then
i = 2
ElseIf cboScale.List(6) Then
i = 3
ElseIf cboScale.List(7) Then
i = 4

End If
MousePointer = vbHourglass


' Make Pic(0) the correct size.
wid = Pic(0).Width + Pic(0).Width * i

hgt = Pic(0).Height + Pic(0).Height * i



' Copy the hidden picture into PreviewPict.
Pic(0).PaintPicture Pic(0).Image, _
0, 0, _
wid, _
hgt


Pic(0).Move 0, 0, wid, hgt

Pic(0).Refresh


ScrollReset2 ' call to reset srollbars
MousePointer = vbDefault

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top