20-07-2008, 05:20 AM
Ok, so I have a set of codes that displays a picture based on the characters class in a picturebox on frmMirage, and here is the code.
And the BltClass Sub
I get the RTE 91 on;
DD_ClassSurf.BltToDC PictureBox.hDC, rec, rec_pos
NOTE: I also tried "val(Parse(10))" nothing :/
Code:
Call BltClassPic(Class(Int(Parse(10))).Pic, frmMirage.picClass)
And the BltClass Sub
Code:
Sub BltClassPic(ByVal PicNum As Long, PictureBox As PictureBox)
With rec
.top = PicNum * CLASS_PIC_Y
.Bottom = .top + CLASS_PIC_Y
.Left = 0
.Right = .Left + CLASS_PIC_X
End With
With rec_pos
.top = 0
.Bottom = CLASS_PIC_Y
.Left = 0
.Right = CLASS_PIC_X
End With
DD_ClassSurf.BltToDC PictureBox.hDC, rec, rec_pos
PictureBox.Refresh
End Sub
I get the RTE 91 on;
DD_ClassSurf.BltToDC PictureBox.hDC, rec, rec_pos
NOTE: I also tried "val(Parse(10))" nothing :/