Results 1 to 4 of 4

Thread: right - click

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2000
    Location
    Reading, UK
    Posts
    870

    Question

    This is what i need to do. A number is stored in a text box. If i left click the number decreases by one, and if i right click then the number increases by one.

    The problem is that when i right click a drop down menu appears!!!!

    How can I get rid of this drop down menu or is there an alternative method of what I am tring to do.

    Many Thanks

    Nick

  2. #2
    Hyperactive Member Alan777's Avatar
    Join Date
    Jan 2001
    Location
    New Zealand
    Posts
    303
    If you don't need to be able to type in it, you could use
    a Label instead. Change the backcolor and borderstyle
    to make it look exactly like a text box.
    "Today's mighty oak is just yesterday's nut,
    that held its ground."

  3. #3
    Fanatic Member Jerry Grant's Avatar
    Join Date
    Jul 2000
    Location
    Dorset, UK
    Posts
    810
    Use an UpDown control with the textbox:
    Add a Textbox and an UpDown control to a form and paste the following into the Form_Load event:
    Code:
    Private Sub Form_Load()
        
        Text1.Text = 0
        With UpDown1
            .BuddyControl = Text1
            .BuddyProperty = "Text"
            .Alignment = cc2AlignmentRight
            .Min = 0
            .Max = 50
        End With
        
    End Sub
    This allows the right click menu to be retained, as users will expect!
    Jerry Grant................tnarG yrreJ
    Website: <JG-Design></.net>
    Email: [email protected]
    Working towards a bug free world......
    (Not a Microsoft employee)

  4. #4
    Guest
    To disable right click in a textbox, take a look at this thread.

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