Is this VB6 to VB.NET code ok or can it be better?
After using the Upgrade Wizard, I obviously have a lot of things to fix. I used the wizard generated messages and came up with this for one of the PaintPicture problems. Would you folks take a look and see what you think? I am sure it could be done better.
Original VB6 code......
frmMyMain.PaintPicture frmMyMain.imgBackground.Picture, 0, 0, frmMyMain.ScaleWidth, frmMyMain.ScaleHeight
to VB.NET code.....
Dim gr As Graphics
gr.DrawImage(CType(frmMyMain, frmHorizontal).DefInstance.imgBackground.Image, 0, 0, CType(frmMyMain, frmHorizontal).DefInstance.imgBackground.Image.Width, CType(frmMyMain, frmHorizontal).DefInstance.imgBackground.Image.Height)