none
Virtual Keyboard by wOOdy's Visual FoxPro code snippets

    Question

  • Recently I used the code of virtual keyboard on this article, very, very useful, but i had some instability behavior on this. I don´t know wy when we presses and releases the left(primary) mouse button twice on a top of keyboard form the screen split and vitual keyboard go to top of window and the apps go to down of the window. Somebody can help me to fix that?

    

    And Then:

    • Edited by FRGU05 Wednesday, September 5, 2012 10:31 PM
    Wednesday, September 5, 2012 12:37 AM

Answers

  • OK, now you got me downloading that sample. The numeric keyboard is implemented as Toolbar, and contrary to what I thought toolbars don't have a MaxButton property. Adding one doesn't change their behavior.

    So there is no real solution, live with it and don't double click on the toolbar. It makes the keypad dock to the screens toolbar section. You can drag the keypad from that section and it will return to normal.

    Redoing the toolbars as forms would give you the chance to turn off the title bar double click behavior, but then clicking on the keys will move focus and that problem is even worse. Toolbars are toolbars.

    Bye, Olaf.

    • Marked as answer by FRGU05 Monday, September 24, 2012 11:59 PM
    Monday, September 24, 2012 9:08 PM

All replies

  • Double click on a window title means "Maximize" so the window just does what you "want"... If the window behaves like a toolbar then the double click menas "Docking" which is exactly what you described. You may disable this feature in the code.

    Woody is available at German forum obviosly: http://social.msdn.microsoft.com/Forums/de-GE/foxprode/threads

    Wednesday, September 5, 2012 10:43 PM
    Moderator
  • Just set MaxButton=.F. and the double click funcitonality also doesn't maximise the form. But you need to do that additional to setting form.controlbox = .F. to hide the min/max/close buttons and menu icon from the titlebar.If you have controlbox=.f., but maxbutton is .t., the double click bahavior of the title bar still maximises it.

    If, as Pavel says, this is rather a docking behavor of a toolbar, then set Dockable = .F., simply do both, that can't hurt.

    Bye, Olaf.


    • Edited by Olaf Doschke Thursday, September 6, 2012 11:36 AM
    Thursday, September 6, 2012 11:34 AM
  •    THISFORM.oKeyboard = NEWOBJECT("tlbNumKeyboard1", "woody_keyboard.vcx")
       WITH THISFORM.oKeyboard
      .LEFT       = (THISFORM.LEFT + THISFORM.WIDTH) + 4 && position to the middle-right of form
           .TOP        = -8
      .MOVABLE    = .F.
      .LOCKSCREEN = .F.
      .VISIBLE    = .T.
      .controlbox = .F.
      .MAXBUTTON  = .F.


    I did try set all the properties with .f. and the system sent a message:

    Property MAXBUTTON is not found.

    Also i did try to set DOCKABLE = .F. and the system sent to me the same message:

    Property DOCKABLE is not found.

    I appreciate your help.

    • Marked as answer by FRGU05 Tuesday, September 11, 2012 9:51 PM
    • Unmarked as answer by FRGU05 Tuesday, September 11, 2012 9:51 PM
    Tuesday, September 11, 2012 9:12 PM
  • Thank you.

    FRGU05

    Tuesday, September 11, 2012 9:12 PM
  • WITH THISFORM.oKeyboard??

    You set form properties at the form and not at THISFORM.oKeyboard

    It must be THISFORM.MAXBUTTON = .F., not WITH THISFORM.oKeyboard.MAXBUTTON = .F., the same goes for controlbox, lockscreen.

    Movable, Visible and Top could be properties of THISFORM.oKeyboard, but you need to know what properties of what object you want to set. Get your code and thinking straight. I also miss an ENDWITH.

    Bye, Olaf.

    Wednesday, September 12, 2012 7:00 AM
  • Hi Olaf.

    I try to put THISFORM.MAXBUTTON = .F. inside all codes and nothing happen. I don´t know inside wich code i want to do the change. I just have the follow archives:

    12/01/2010  14:16             8.266 woody_keyboard.vct
    12/01/2010  14:16             4.084 woody_keyboard.vcx

    I don´t know if is the same version that you try to explain to me.
    By the way tanks.

    FRGU05
    Wednesday, September 12, 2012 9:04 PM
  • Again: Just set MaxButton=.F. and the double click funcitonality also doesn't maximise the form.

    Just set that property in the property window, not in code.

    Open the keyboard form or toolbar class and set it's maxbutton property .F., save that. Done, no code changes.

    Bye,  Olaf.

    • Proposed as answer by yanyee Friday, September 21, 2012 12:29 AM
    Thursday, September 20, 2012 3:27 PM
  • I did try:

    DEFINE CLASS MeutecladoAlfa AS Toolbar

    Caption                = "Teclado Virtual Alfabético"
    Height                 = 100
    Left                   = 0 && MUDA AQUI O LEFT
    Top                    = 0   && E O TOP
    Movable                = .F.
    Sizable                = .F.
    Width                  = 588
    ControlBox             = .F.
    ANCHOR                 = 30
    Name                   = "tlbnumkeyboard3"
    DoCreate               = .F.
    ShowTips               = .F.
    BorderStyle            = 0
    Closable               = .F.
    MaxButton              = .F.
    MinButton              = .F.
    MaxWidth               = 15
    MinHeight              = 15
    MinWidth               = 15
    KeyPreview             = .T.
    BackColor              = RGB(116,116,116)
    blockade               = .F.
    Docked                 = 0
    BackStyle              = 0
    BorderWidth            = 0

    And doesn´t works. All the other things works fine.

    FRGU05

    Monday, September 24, 2012 5:59 PM
  • OK, now you got me downloading that sample. The numeric keyboard is implemented as Toolbar, and contrary to what I thought toolbars don't have a MaxButton property. Adding one doesn't change their behavior.

    So there is no real solution, live with it and don't double click on the toolbar. It makes the keypad dock to the screens toolbar section. You can drag the keypad from that section and it will return to normal.

    Redoing the toolbars as forms would give you the chance to turn off the title bar double click behavior, but then clicking on the keys will move focus and that problem is even worse. Toolbars are toolbars.

    Bye, Olaf.

    • Marked as answer by FRGU05 Monday, September 24, 2012 11:59 PM
    Monday, September 24, 2012 9:08 PM