|
-
Dec 19th, 2002, 12:34 PM
#1
Thread Starter
Hyperactive Member
How to align or paint a picture at the top right corner of a form???
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.
If Not VB Then Exit
------------------------------------------------
visit me @ http://mzubair.50g.com/
-
Dec 19th, 2002, 12:48 PM
#2
Frenzied Member
try setting both the forms and the pictures ScaleMode to 3
-
Dec 19th, 2002, 12:49 PM
#3
Frenzied Member
and then use ScaleWidth, not Width
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|