相关疑难解决方法(0)

无法在Win7 x64上从32位进程启动屏幕键盘(osk.exe)

90%的时间我无法osk.exe从32位进程启动Win7 x64.最初代码只是使用:

Process.Launch("osk.exe");
Run Code Online (Sandbox Code Playgroud)

由于目录虚拟化,这对x64无效.不是我想的问题,我只是禁用虚拟化,启动应用程序,然后再次启用它,我认为这是正确的做事方式.我还添加了一些代码,如果它已经被最小化(这可以正常工作)使键盘恢复 - 代码(在示例WPF应用程序中)现在看起来如下:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;using System.Diagnostics;
using System.Runtime.InteropServices;

namespace KeyboardTest
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        [DllImport("kernel32.dll", SetLastError = true)]
        private static extern bool Wow64DisableWow64FsRedirection(ref IntPtr ptr);
        [DllImport("kernel32.dll", SetLastError = true)]
        public static extern bool Wow64RevertWow64FsRedirection(IntPtr ptr);

        private …
Run Code Online (Sandbox Code Playgroud)

c# wpf 64-bit exception on-screen-keyboard

17
推荐指数
2
解决办法
3万
查看次数

使用 vb.net 调用屏幕键盘(OSK)

我正在使用下面的代码来调用On-Screen Keyboard(OSK)

Process.Start("C:\Windows\System32\OSK.EXE")
Run Code Online (Sandbox Code Playgroud)

但正如你在下面看到的,我收到了一个错误。但如果我手动打开它,它工作正常。

可以调用OSK,但只能显示数字(0 - 9) 在此输入图像描述

vb.net on-screen-keyboard vb.net-2010

1
推荐指数
1
解决办法
1万
查看次数

标签 统计

on-screen-keyboard ×2

64-bit ×1

c# ×1

exception ×1

vb.net ×1

vb.net-2010 ×1

wpf ×1