1

Can we make form icon (that is present with the text of form) clickable. I set icon to another pic of my system now i want to click icon and it will go another place. Is this possible?

Private Sub frmdisplayform_Click(sender As Object, e As EventArgs) Handles MyBase.Click
    Dim x, y As Single
    x = Control.MousePosition.X
    y = Control.MousePosition.Y
End Sub

I am trying to use this code to get the position of click but it is not working in the title bar icon of the form.

SysDragon
  • 9,692
  • 15
  • 60
  • 89
sana naz
  • 35
  • 1
  • 5
  • I think you wont firing any event in there .. – matzone Jun 26 '13 at 11:55
  • You can start from here: [How to handle Form caption right click][1] [1]: http://stackoverflow.com/questions/1948014/how-to-handle-form-caption-right-click – HABJAN Jun 26 '13 at 12:04
  • 1
    It was already meant to do something when clicked, it displays the system menu. Hacking this is technically possible by intercepting the WM_NCLBUTTONDOWN message. This is in general not a useful hack, your user will be mystified when trying to display the menu and will never guess that clicking the icon is supposed to do something else. Create usable UI by creating windows that behave like any other window. – Hans Passant Jun 26 '13 at 12:17

0 Answers0