hello every1, this problem of mine has been irritating me for a long time. I have a form on which is a imagelist containing one single image(a bitmap). I want the image to be perfectly aligned with the top right corner of the form. So the most probable logic will be the following i suppose
Private Sub Command1_Click()
Me.PaintPicture ImageList1.ListImages(1).Picture, Me.Width - ImageList1.ListImages(1).Picture.Width, 0
End Sub
so if the form width is say 1000 and the picture width is 100, then 1000-100=900, thats where the picture must be painted allowing it to to be perfectly aligned with the top right corner of the form. But this is not the case. The picture is being painted atleast a thousand pixel away from the place. Whats the problem. Plz try this code and provide me with a solution.




Reply With Quote