Results 1 to 5 of 5

Thread: [RESOLVED] Need Press/Hold/Release type button

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Resolved [RESOLVED] Need Press/Hold/Release type button

    How do I make a button that does one function when pressed and held down and another function when released?
    Last edited by jmsrickland; May 9th, 2013 at 12:30 AM.


    Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.

  2. #2
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: Need Press/Hold/Release type button

    Can't you use the MouseUp and MouseDown events of the Command Button?
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  3. #3
    Banned
    Join Date
    Nov 2012
    Posts
    1,171

    Re: Need Press/Hold/Release type button

    set command16 caption to talk

    Code:
    Private Sub Command16_Click()
    Select Case Command16.Caption
    Case Is = "talk"
    your code here for talking
    Command16.Caption = "Stop"
    Case Is = "Stop"
    your code here stop talking
    Command16.Caption = "talk"
    End Select
    
    End Sub

  4. #4

    Thread Starter
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: Need Press/Hold/Release type button

    @ladoo your code is not for press and hold.


    Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.

  5. #5

    Thread Starter
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: Need Press/Hold/Release type button

    Quote Originally Posted by dee-u View Post
    Can't you use the MouseUp and MouseDown events of the Command Button?
    OMG, of course. It never entered my mind, duh


    Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.

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