+ Reply to Thread
Results 1 to 2 of 2

How Can I '{F4} Key down event' on RefEdit Control?

  1. #1
    Zoo
    Guest

    How Can I '{F4} Key down event' on RefEdit Control?

    I'm trying to make a form like 'Paste Function' Dialog.
    And I want to switch the cell address in a RedEdit contorl from/to
    AbsoluteAdress<->
    Relative Address.
    So I type the code below.

    Private Sub RefEdit1_KeyDown(KeyCode As Integer, ByVal Shift As Integer)
    '115: F4 116:F6
    If KeyCode = 115 Then
    ChangeRefer
    End If

    End Sub

    However , this does not work.
    By Pressing {F4} , the control switch to another floating dialog and no
    events happens.

    So I want to know how my macro can know that {F4} is pressed by using hook
    such as SetWindowLong , GetWindowLong.

    I used spy++ to know what messages are sent to the form.
    But I could not specify what message make the form switch to the floting
    one.


  2. #2
    keepITcool
    Guest

    Re: How Can I '{F4} Key down event' on RefEdit Control?


    Hi Zoo,

    you can control this using a registry setting..
    (it was an original hotfix/workaround on xl2000,
    forgotten to set as default in both xl2002 and xl2003
    http://support.microsoft.com/?kbid=291110


    in
    HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Excel\Options
    Add a DWORD value named "QFE_Richmond"
    Set it's value to 1


    --
    keepITcool
    | www.XLsupport.com | keepITcool chello nl | amsterdam


    Zoo wrote in <news:<e#[email protected]>

    > I'm trying to make a form like 'Paste Function' Dialog.
    > And I want to switch the cell address in a RedEdit contorl from/to
    > AbsoluteAdress<->
    > Relative Address.
    > So I type the code below.
    >
    > Private Sub RefEdit1_KeyDown(KeyCode As Integer, ByVal Shift As
    > Integer) '115: F4 116:F6
    > If KeyCode = 115 Then
    > ChangeRefer
    > End If
    >
    > End Sub
    >
    > However , this does not work.
    > By Pressing {F4} , the control switch to another floating dialog and
    > no events happens.
    >
    > So I want to know how my macro can know that {F4} is pressed by using
    > hook such as SetWindowLong , GetWindowLong.
    >
    > I used spy++ to know what messages are sent to the form.
    > But I could not specify what message make the form switch to the
    > floting one.


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1