CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 15 of 24

Hybrid View

  1. #1
    Join Date
    Jun 2004
    Location
    NH
    Posts
    678

    mini osk at windows login for Vista?

    I just got finished writing a mini on screen keyboard for the xp login screen.

    Does anyone know if this will be easily possible with Vista, or 7 ?
    If not, what are the hitches?


    I was beta testing 7 until recently, so I don't want to waste time re-installing it for no reason.

  2. #2
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,283

    Re: mini osk at windows login for Vista?

    Hey, great seeing you again!

    If it was possible with XP, then it should be with Vista - not sure about the implications though. There may be some differences with the API calls used ( as we have established in some of your earlier projects ). Otherwise you can post it here ( if you want ), and we can help test and identify the issues we encounter.

  3. #3
    Join Date
    Jun 2004
    Location
    NH
    Posts
    678

    Re: mini osk at windows login for Vista?

    Hello Hannes,

    Yeah, I'm back from a 3-4 month stint.
    Working on the next generation of human to computer input devices and all.
    Button-less mouse.
    This project is really awesome, and helpful.
    It includes my newest SendKeys module as well.
    Basically it's a USB device that uses laser emitters, to detect hand or foot movement.

    It was originally designed to help the handicapped, with shaking disorders, or amputees missing fingers, hands, or arms.
    However, gamers and online Virtual realities(WoW, SL...) can also use it,
    since you can set the laser triggers to just about any sequence of keyboard/mouse strokes or combos.
    Oh, and then I added other available events like Delay, SnapToWindow(mouse), and WaitFor different things to happen first before moving on to the next event in the chain list.
    Regular users can now automate almost anything.
    Sure, wannabe hackers could use it too, but that does not justify keeping the handicapped, handless anymore.
    The mini osk, is just icing on the cake, so that they don't have to switch between a normal mouse, and a virtual one during logoff-in.
    Nifty auto-login feature too.

    I guess my question is more specific to windows services.
    Is it not hard to get a windows service with user interface, to show up in the login window?


    While on the subject of keyboard input, here is a little tid bit that comes in handy for osks:

    Code:
    Const HWND_LASTACTIVEWINDOW As Int64 = 8975651603260375040
    Private Declare Function apiSetActiveWindow Lib "user32" Alias "SetActiveWindow" (ByVal hWnd As Int64) As Int64
    
    apiSetActiveWindow(HWND_LASTACTIVEWINDOW)
    I guess there are some API's that really should be used with 64 bit in mind.
    You could use Longs too, but then you'd get flamed for it. lol
    This is somewhat a rare exception, and it doesn't even match it's own description.
    The SetActiveWindow function activates a window. The window must be attached to the calling thread's message queue.
    I wasn't aware that the last window was attached, since you always must use AttachThreadInput for external windows. Hmmm. Cool.


    BTW, I'm using a mouse hook to avoid focus from even reaching my osk.
    However the titlebar must accept focus, so I call the SetActiveWindow API, only when the mouse enters the client part of the form.
    Button presses never recieve the mouse down, so it's smooth like the real thing.


    I guess I'm on the right track using motion detection to control a PC.
    It just made total sense to me.

    http://news.cnet.com/8301-13860_3-10...eadlinesArea.0

    Video:
    http://www.youtube.com/watch?v=AgWUtw0sbro

    However, the microsoft camera design lacks the ability to help handicapped with mobility impairments, like mine has.
    At least, as of now.
    Last edited by TT(n); August 5th, 2009 at 03:42 AM.

  4. #4
    Join Date
    Jun 2004
    Location
    NH
    Posts
    678

    Re: mini osk at windows login for Vista?

    Okay, well I just tried to install the osk service on Vista.
    It doesn't want to run the service, unless you manually use InstallUtil.exe.
    Then the service runs on boot, but does not show it's user interface.
    Apparently, it's not so easy. Jeesh, I wonder why.

    The main osk works on Vista though.
    I would like to get some beta feedback, from Vista/7 users.


    DOWNLOAD
    http://www.mediafire.com/?uimmenifizh

    If you have xp, and would like to try this on screen keyboard(BETA), then it should work with no problems.
    By default, the option for installing the osk on boot, is unchecked, so you will have to check it.

    There is a hidden benefit to using it, besides the obvious keyboard functionality.
    When you are at the welcome screen(boot), the system is logged on.
    This program has a couple extra features, that allow you to open the task manager, msconfig, or launch any other program using ShellExecute.
    This is great for killing some of those spywares or viruses before login.

    I took a screenshot of the welcome screen.
    I put it on the systems desktop, and the computer could not find it at all, when I was logged in, as a user or admin.
    So, I went back into the welcome screen, and sure enough, there it was sitting on the systems desktop.
    I copied over to my desktop, and here it is:


    Installed files
    Service name: LOGONCMD.EXE (IBM Touchboard in the ADD Remove Programs list. xp only)
    Service Application: TOUCHBRD.EXE (vb6.0 for speed and reliability during logoff.)
    Main Application: OnScreenKeyboard.exe
    Minor Application: OSKMini.exe
    MS Voice packs: Sp5TTIntXP(ADD Remove Programs. xp only)
    Last edited by TT(n); July 23rd, 2009 at 01:25 PM.

  5. #5
    Join Date
    Jun 2004
    Location
    NH
    Posts
    678

    Re: mini osk at windows login for Vista?

    Correction,... it is pretty easy to start up a custom osk with Vista/7(32-64 bit)

    All I had to do, was go into the registry path:
    Code:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Accessibility\ATs\osk
    You must change permissions of the key, which means also taking ownership first.
    Then you can modify the reg key's path to start your osk instead.
    I assume you can start any app by re-directing that path.

    However, I still must navigate to the accesibility options(bottom left) at the welcome screen.
    My regular windows osk, does not show up unless you coax it. Common little buddy,... I said start up.

    I've read that some people, can't get rid of the osk, and some have to hunt for it.
    Sounds like a small bug, because when I clicked apply she says cancel instead.

    EDIT UPDATED:
    There is an administror setting hidden in the accessibility section, to apply to all desktops or something.
    That's why people have to hunt for it, and some accidently turn it on, and can't get it off. heheheh
    Might as well have a laugh, for everytime that kind of thing happened to me. Uhhg

    In fact I only just recently found that hidden checkbox, all by itself, on some other page off to the side of the config area.
    I really hate the Vista/7 hair-brained control panel.
    For example, I didn't know that you can click small or large icons, and THAT brings me to a more classic look.
    I would have expected just small or large icons that are currently showing. Not an entirely different view.
    Who was the idiot behing the keyboard sleeping, when that was written?

    The following registry key turns the osk on/off boot.
    On
    Code:
            Dim regkey As Microsoft.Win32.RegistryKey
            regkey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\Microsoft\Windows NT\CurrentVersion\Accessibility", True)
            regkey.SetValue("Configuration", "osk")
            regkey.Close()
    Off
    Code:
            Dim regkey As Microsoft.Win32.RegistryKey
            regkey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\Microsoft\Windows NT\CurrentVersion\Accessibility", True)
            regkey.SetValue("Configuration", "")
            regkey.Close()
    The pointer to the osk, resides in this key:
    "hkey_local_machine\software\microsoft\windows nt\currentversion\accessibility\ats\osk"

    You can change the osk executable being pointed to like this:
    Code:
                Dim regkey As Microsoft.Win32.RegistryKey
                regkey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\Microsoft\Windows NT\CurrentVersion\Accessibility\ATs\osk", True)
                regkey.SetValue("ATExe", "osk.exe")
                regkey.SetValue("StartExe", Environment.SystemDirectory & "\" & "osk.exe")
                regkey.Close()
    You need to have full administrative access to this key before setting it.
    You may need to gain ownership, in order to get full administrative access to the key.
    Post 12 offers possible solution




    ___________
    Last edited by TT(n); August 5th, 2009 at 03:58 AM.

  6. #6
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: mini osk at windows login for Vista?

    Comments from an XP user:

    It works fairly well. Main problem: the keyboard appears and works for the password but then does not appear after startup, even when I click on a test entry field.
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

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

Featured