• Congratulations to the Class of 2024 on your results!
    Let us know how you went here
    Got a question about your uni preferences? Ask us here

~vb question~ (1 Viewer)

:: ck ::

Actuarial Boy
Joined
Jan 1, 2003
Messages
2,414
Gender
Male
HSC
2004
hi just wondering, is it possible to put images in a msgbox?

also, say for example u had an action - image1_click

is there a way to disable the right click for this image1?
 

Fosweb

I could be your Doctor...
Joined
Jun 20, 2003
Messages
594
Location
UNSW. Still.
Gender
Male
HSC
2003
For detecting mouse buttons:

Use the _mousedown event. It uses the Button parameter.
Just use simple if statement or case select to get the button clicked and then run whatever code you want.

eg:
Code:
Private Sub Image_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)

Select Case Button
    Case 1 '1 is left button
        MsgBox "Left Button Click"
    Case 2 '2 is right button
        Button = 0
End Select

End Sub
Images in a message box: You can do it. But is it really worth it?
Check out this site:
http://www.mvps.org/vbnet/index.html?code/comdlg/messageboxex.htm

For what you need - it is probably easier to create another form, and use it as a substitute to a message box.
 

:: ck ::

Actuarial Boy
Joined
Jan 1, 2003
Messages
2,414
Gender
Male
HSC
2004
thanks fos.. yet again u've saved the day :p
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top