Results 1 to 8 of 8

Thread: Making a Label's position where the mouse clicks.{RESOLVED]

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member stilekid007's Avatar
    Join Date
    Apr 2005
    Location
    DUDE! I'm your neighbor! HELLO!!!
    Posts
    388

    Making a Label's position where the mouse clicks.{RESOLVED]

    Hello,

    I am having my program let the user click on a picturebox in the form and it will create a Label that says hey!

    The only problem I am having is what happens when I click and create the label the label goes to the top left corner of the Pic box.

    How can I have it place the Label where the mouse clicks on the Picture box?

    VB Code:
    1. Static LabelNumber As Long
    2.  
    3.         LabelNumber = LabelNumber + 1
    4.         Set m_myLabel = Me.Controls.Add("VB.Label", "Label" & CStr(LabelNumber), Picture1)
    5.         m_myLabel.Visible = True
    6.         m_myLabel.Caption = "HEY!"

    Thank you and have a great day!
    Stilekid007
    Last edited by stilekid007; Jun 11th, 2005 at 06:09 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width