Results 1 to 5 of 5

Thread: How to pop up a box(dialog?) on listview doubleclick(RESOLVED)

  1. #1

    Thread Starter
    Member
    Join Date
    Apr 2003
    Posts
    38

    How to pop up a box(dialog?) on listview doubleclick(RESOLVED)

    When user doubleclicks on a row in the listview, i want to pop up a box that displays something like:


    This will make you mad.Continue?
    btnYes btnNo
    Last edited by yyayl; Apr 15th, 2003 at 04:44 AM.

  2. #2
    Fanatic Member sridharavijay's Avatar
    Join Date
    Sep 2002
    Location
    http://www.vijaysridhara.in
    Posts
    589
    go to listview events and select

    DblClick...
    and write in that code

    I think the sub would look like
    Private sub lsvItems_DblClick()

    Msgbox "Are you mad? Click once!",vbOkOnly,"Crack"
    End Sub

    HTH

  3. #3

    Thread Starter
    Member
    Join Date
    Apr 2003
    Posts
    38
    Originally posted by sridharavijay

    Msgbox "Are you mad? Click once!",vbOkOnly,"Crack"
    whats that vbOkOnly thingie?
    and i want the box to display 2 options which will do different things

  4. #4

    Thread Starter
    Member
    Join Date
    Apr 2003
    Posts
    38
    Ok i figured it out thx alot

    VB Code:
    1. Private Sub lvwRewards_DblClick()
    2.     MsgBox "Are you mad? Click once!", vbYesNo, "Confirm Redemption?"
    3. End Sub

  5. #5
    Addicted Member
    Join Date
    Sep 2002
    Location
    Cape Town, SA
    Posts
    144
    Private sub lsvItems_DblClick()

    Msgbox "Are you mad? Click once!",vbyesno,"Crack"
    End Sub

    the vbOkthingy is pre defined values that will create the buttons in the msgbox. Eg, vbYesNo will put a Yes and No button in the Msgbox. For moree info on this check in MSDN

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