Call Windows Keyboard & Calc

Xbase++ 2.0 Build 554 or later
Post Reply
Message
Author
User avatar
PedroAlex
Posts: 231
Joined: Tue Feb 09, 2010 3:06 am

Call Windows Keyboard & Calc

#1 Post 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.
Pedro Alexandre

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Call Windows Keyboard & Calc

#2 Post by rdonnay »

runshell('','calc.exe')

runshell('','osk.exe')
The eXpress train is coming - and it has more cars.

User avatar
PedroAlex
Posts: 231
Joined: Tue Feb 09, 2010 3:06 am

Re: Call Windows Keyboard & Calc

#3 Post 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.
Pedro Alexandre

User avatar
Auge_Ohr
Posts: 1407
Joined: Wed Feb 24, 2010 3:44 pm

Re: Call Windows Keyboard & Calc

#4 Post 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 )
greetings by OHR
Jimmy

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Call Windows Keyboard & Calc

#5 Post 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.
The eXpress train is coming - and it has more cars.

c-tec
Posts: 379
Joined: Tue Apr 20, 2010 1:36 am
Location: SALZBURG/AUSTRIA
Contact:

Re: Call Windows Keyboard & Calc

#6 Post 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
Rudolf Reinthaler
digital pen & paper systems
http://www.formcommander.net

User avatar
PedroAlex
Posts: 231
Joined: Tue Feb 09, 2010 3:06 am

Re: Call Windows Keyboard & Calc

#7 Post 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
Pedro Alexandre

Post Reply