Results 1 to 15 of 15

Thread: how can i use ctrl+esc in vb6?

Hybrid View

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2006
    Location
    /root/usr/local/bin
    Posts
    476

    how can i use ctrl+esc in vb6?

    can i ask a question?
    how can i use ctrl+esc in vb6?
    in my form i have image,label,and buttons.
    do have any solutions

    tnx!

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,930

    Re: how can i use ctrl+esc in vb6?

    Moved from CodeBank forum (which is for code examples, not questions)

  3. #3
    Addicted Member
    Join Date
    Apr 2006
    Location
    USA
    Posts
    207

    Re: how can i use ctrl+esc in vb6?

    basti42,

    Welcome to the forum.

    Feel free to ask any question that you want.

    We're all here to help, but I think we need a little more information.

    What are you trying to do. Check for ctrl+esc or send the keys ? Pressing ctrl+esc normally brings up the start menu.
    Keith_VB6

    If you have any further questions, just ask.
    If this solves things, then please mark the thread resolved.
    [Thread Tools] --> [Mark Thread Resolved]

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2006
    Location
    /root/usr/local/bin
    Posts
    476

    Arrow Re: how can i use ctrl+esc in vb6?

    tnx to you Keith_VB6,
    what i mean is i'm doing a project mini windows
    that's why i'm asking how to code the ctrl+esc
    pls. reply tnx.

  5. #5
    Addicted Member
    Join Date
    Apr 2006
    Location
    USA
    Posts
    207

    Re: how can i use ctrl+esc in vb6?

    I'm still not sure what you mean. Please explain in more details. What do you mean by "code the ctrl+esc" ?

    If you want to send CTRL-Escape then this code does that. Just add a command button.
    VB Code:
    1. 'API declaration
    2. Private Declare Sub keybd_event Lib "user32" _
    3.    (ByVal bVk As Byte, _
    4.     ByVal bScan As Byte, _
    5.     ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
    6.  
    7. 'constants
    8. Const VK_ESCAPE = &H1B
    9. Const VK_CONTROL = &H11
    10. Const VK_KeyDown = 1
    11. Const VK_KeyUp = 3
    12.  
    13. Private Sub Command1_Click()
    14. 'Simulate Key Press
    15.     keybd_event VK_CONTROL, 0, VK_KeyDown, 0
    16.     keybd_event VK_ESCAPE,0, VK_KeyDown, 0
    17.  
    18. 'Simulate Key Release
    19.     keybd_event VK_ESCAPE, 0, VK_KeyUp, 0
    20.     keybd_event VK_CONTROL,0, VK_KeyUp, 0
    21. End Sub
    Keith_VB6

    If you have any further questions, just ask.
    If this solves things, then please mark the thread resolved.
    [Thread Tools] --> [Mark Thread Resolved]

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2006
    Location
    /root/usr/local/bin
    Posts
    476

    Re: how can i use ctrl+esc in vb6?

    tnx for your prompt reply
    i have a project its a mini-windows
    if i press ctrl+esc it will show the form.

  7. #7
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: how can i use ctrl+esc in vb6?

    If Windows Explorer is not set as the desktop shell application then you should be able to use Ctrl+Esc. The only issue is that it is already registered by Explorer. Same with Alt+Tab. Ctrl+Alt+Del however is a low-level hotkey combination which is handled by the kernel, not the shell.

  8. #8
    PowerPoster
    Join Date
    May 2006
    Posts
    2,988

    Lightbulb Re: how can i use ctrl+esc in vb6?

    Basti42, the code in Post#5 answers your question.

  9. #9

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2006
    Location
    /root/usr/local/bin
    Posts
    476

    Re: how can i use ctrl+esc in vb6?

    i already tried rory...
    but still the start button of windows appears
    tnx

  10. #10
    PowerPoster
    Join Date
    May 2006
    Posts
    2,988

    Re: how can i use ctrl+esc in vb6?

    Quote Originally Posted by basti42
    i already tried rory...
    but still the start button of windows appears
    tnx
    it will as stated by others .. it is reserved for that while in the Explorer.exe shell ..

  11. #11
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: how can i use ctrl+esc in vb6?

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\Shell

    If that value is "explorer.exe", you cannot use Ctrl+Esc. If it is not, you can, but you lose the desktop, taskbar, and task switcher.

    Capeesh?

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