Results 1 to 5 of 5

Thread: Can YOU fix this? shaping a form question!

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2000
    Location
    the UK
    Posts
    265

    Talking Can YOU fix this? shaping a form question!

    Your mission, should you choose to accept it, etc, etc, etc!

    I have this code (attached) that shapes the form to the bitmap on it.

    It's a great piece of code (courtesy of a chap called Doug with a funny surname!) but my problem occurs when I add a menu (which I need to enable right-clicking popup menu).

    Try it - open the project - run it (to see how good it is) and then add a simple menu (one item will do it) - then run it again - and you can see what happens!

    So . . . can YOU fix this?! I'm sure it just needs a tweak somewhere but for the life of me I can't see where.

    A free virtual Easter Egg for the winner*

    Happy Easter!

    Simon

    * virtual Easter Egg means I'll send you a nice thank-you e-mail!!!
    Attached Files Attached Files

  2. #2
    PowerPoster Keithuk's Avatar
    Join Date
    Jan 2004
    Location
    Staffordshire, England
    Posts
    2,236
    Remove Me.Caption, set Controlbox to False and add:

    VB Code:
    1. Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    2.  
    3. If Button = vbRightButton Then
    4.     PopupMenu mnuFile
    5. End If
    6.  
    7. End Sub

    Make a mnuFile menu NOT visible and an mnuExit menu.
    Attached Files Attached Files

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2000
    Location
    the UK
    Posts
    265
    Hi Keith,

    I did try that option but for some reason it makes the image a little-off centre (see attachment).

    (the one on the right is before - the one on the left is with the hidden menu)

    Simon
    Attached Images Attached Images  

  4. #4
    Not NoteMe SLH's Avatar
    Join Date
    Mar 2002
    Location
    192.168.0.1 Preferred Animal: Penguin Reason for errors: Line#38
    Posts
    3,051
    This is just my opinion, but i think the one on the left actually looks better.
    Quotes:
    "I am getting better then you guys.." NoteMe, on his leet english skills.
    "And I am going to meat her again later on tonight." NoteMe
    "I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
    "my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
    Have I helped you? Please Rate my posts.


  5. #5
    PowerPoster Keithuk's Avatar
    Join Date
    Jan 2004
    Location
    Staffordshire, England
    Posts
    2,236
    I downloaded your file, ran it, changed it and posted it back. It looks and works fine with me. As soon as you had a menu then you see the caption thats why I said remove caption and controlbox. Because your image was smaller than the form, I resized the form to suit.

    Sorry if it didn't work how you wanted it to.


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