Visualizzazione dei risultati da 1 a 3 su 3
  1. #1
    Utente di HTML.it L'avatar di luisa227
    Registrato dal
    Mar 2002
    Messaggi
    2,305

    Vb6 - Registrare Piu Hotkeys

    Ho registrato un hotkey e tutto va benissimo. Ma se il mio programma dovesse usare + di una hotkey? Come faccio? A seconda della hotkey premuta mi scrive un messaggio, come si fa?

    codice:
    ret= RegisterHotKey(Me.hWnd, &HBFFF&, MOD_CONTROL, vbKeyC)
    ¡¥ ret= RegisterHotKey(Me.hWnd, &HBFFF&, MOD_CONTROL, vbKeyV) ¡¥seconda hotkey
    ProcessMessage
    
    Private Sub ProcessMessages()
        Dim Message As Msg
     
        'loop until bCancel is set to True
        Do While Not bCancel
            'wait for a message
            WaitMessage
            'check if it's a HOTKEY-message
            If PeekMessage(Message, Me.hWnd, WM_HOTKEY, WM_HOTKEY, PM_REMOVE) Then
    
    ¡K. ¡¥ se CTRL + V MSGBOX ¡§HAI PERSO¡¨ / SE CTRL +C MSGBOX 2HAI VINTO¡¨ „³ COME SI FA?
          
      End If
            'let the operating system process other events
            DoEvents
        Loop
    End Sub
    Le mie richieste qui sul forum sono al 99,9% considerate assurde e senza senso, ma per me un senso lo hanno e gradirei una risposta più seria possibile. Grazie

  2. #2
    Utente di HTML.it L'avatar di luisa227
    Registrato dal
    Mar 2002
    Messaggi
    2,305

    Re: Vb6 - Registrare Piu Hotkeys

    Originariamente inviato da luisa227
    Ho registrato un hotkey e tutto va benissimo. Ma se il mio programma dovesse usare + di una hotkey? Come faccio? A seconda della hotkey premuta mi scrive un messaggio, come si fa?

    codice:
    ret= RegisterHotKey(Me.hWnd, &HBFFF&, MOD_CONTROL, vbKeyC)
    ¡¥ ret= RegisterHotKey(Me.hWnd, &HBFFF&, MOD_CONTROL, vbKeyV) ¡¥seconda hotkey
    ProcessMessage
    
    Private Sub ProcessMessages()
        Dim Message As Msg
     
        'loop until bCancel is set to True
        Do While Not bCancel
            'wait for a message
            WaitMessage
            'check if it's a HOTKEY-message
            If PeekMessage(Message, Me.hWnd, WM_HOTKEY, WM_HOTKEY, PM_REMOVE) Then
    
    ¡K. ¡¥ se CTRL + V MSGBOX ¡§HAI PERSO¡¨ / SE CTRL +C MSGBOX 2HAI VINTO¡¨ „³ COME SI FA?
          
      End If
            'let the operating system process other events
            DoEvents
        Loop
    End Sub
    Le mie richieste qui sul forum sono al 99,9% considerate assurde e senza senso, ma per me un senso lo hanno e gradirei una risposta più seria possibile. Grazie

  3. #3
    Utente di HTML.it L'avatar di luisa227
    Registrato dal
    Mar 2002
    Messaggi
    2,305
    Hotkey

    Uffa, voglio che se premo crtl + b mi compare un mesgbox con scritto ciao e se premo ctrl + r un msgbox con scritto bye: come faccio? Un esempio grazie
    Non devo usare le hotkey? Cosa devo usare? Help!
    Le mie richieste qui sul forum sono al 99,9% considerate assurde e senza senso, ma per me un senso lo hanno e gradirei una risposta più seria possibile. Grazie

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.