Page 1 of 1

Call Windows Keyboard & Calc

Posted: Tue May 31, 2016 7:44 am
by PedroAlex
On tablets in Windows 10 it is useful use some system resources.

This xBase Command run ok However it call the DOS Console.

runshell( "/C /B START","calc.exe",.t. )

But this do not run..

runshell( "/C /B START","osk.exe",.t. )

Who has experience in this type of calls could say it has had success with this type of command or other type of found solution.

Many Thanks.
best regards.

Re: Call Windows Keyboard & Calc

Posted: Tue May 31, 2016 8:13 am
by rdonnay
runshell('','calc.exe')

runshell('','osk.exe')

Re: Call Windows Keyboard & Calc

Posted: Tue May 31, 2016 8:48 am
by PedroAlex
hello Roger.

runshell('','calc.exe') - This Runs OK

runshell('','osk.exe')- But This Not

The error Code
Descrption : Operating System Error
Operation : RunShell
Thread ID : 1
Operating System Error : 740

This command runs OK for you on Windows 10?

Many Thanks.

Re: Call Windows Keyboard & Calc

Posted: Tue May 31, 2016 9:09 am
by Auge_Ohr
comercial wrote:On tablets in Windows 10 it is useful use some system resources.
64bit or 32bit ?

Code: Select all

     IF "OSK.EXE" $ UPPER(cAction)
        IF Is64Bit()
           @Kernel32:Wow64EnableWow64FsRedirection(FALSE)   // disable before API Call
        ENDIF
        SHELLOPENFILE("C:\WINDOWS\system32\","osk.exe")
        IF Is64Bit()
           @Kernel32:Wow64EnableWow64FsRedirection(TRUE)    // enable again
        ENDIF

...
FUNCTION SHELLOPENFILE(cPath, cFILE )
...

   lSuccess := DllCall( "SHELL32.DLL"  , DLL_STDCALL, ;
            "ShellExecuteA", AppDesktop():GetHWND(), "open", cPath+cFile,;
            NIL, CurDir(), SW_NORMAL )

Re: Call Windows Keyboard & Calc

Posted: Tue May 31, 2016 9:28 am
by rdonnay
This command runs OK for you on Windows 10?
I haven't tried it on Windows 10. It works fine on Windows 7.
Possibly it is not in your path on Window 10.

Re: Call Windows Keyboard & Calc

Posted: Tue May 31, 2016 10:14 am
by c-tec
Hello, use the correct path on a 64 bit system:c:\Windows\SysWOW64\osk.exe in runshell or copy this exe in your application path, there is also always a 32 bit version that does not work..
regards
Rudolf

Re: Call Windows Keyboard & Calc

Posted: Tue May 31, 2016 10:50 am
by PedroAlex
My Windows 10 is 32 Bits.

Operating System Error : 740 = Operation need elevation.

I tried run aplication on admin privilegies but do not work.


I found a soft solution :

Runshell( "/C START OSK.EXE" ) - This run but open & close a previous black screen (DOS Session) and than the keyboard open.

Jimmy - I understaind Your post, but I do not have and do not know most of the functions used in the sample. In my opinion this is the right way to do system calls.

Roger - The calc.exe and osk.exe are in the same Windows folder
I verified the rights and user permissions of this files and are identical.

Many Thanks