我试图将osk嵌入到wpf窗口或用户控件中,我发现下面的代码并且它适用于记事本但是对于tabtip.exe,它说它没有图形界面?
WaitForInputIdle失败.这可能是因为该过程没有图形界面.
我尝试让它休眠一段时间而不是调用waitForInputIdle方法,但它抛出了另一个异常:
进程已退出,因此无法获取所请求的信息.
但在我的任务管理器中,我仍然可以看到TabTip.exe正在运行.
namespace WpfApplication1
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
private System.Windows.Forms.Panel _panel;
private Process _process;
public MainWindow()
{
InitializeComponent();
_panel = new System.Windows.Forms.Panel();
windowsFormsHost1.Child = _panel;
}
[DllImport("user32.dll")]
private static extern int SetWindowLong(IntPtr hWnd, int nIndex, int dwNewLong);
[DllImport("user32.dll", SetLastError = true)]
private static extern int GetWindowLong(IntPtr hWnd, int nIndex);
[DllImport("user32")]
private static extern IntPtr SetParent(IntPtr hWnd, IntPtr hWndParent);
[DllImport("user32")]
private static extern bool SetWindowPos(IntPtr …Run Code Online (Sandbox Code Playgroud) 我甚至不知道这个问题的好标题是什么.
但是我有一张桌子:
create table trans
(
[transid] INT IDENTITY (1, 1) NOT NULL,
[customerid] int not null,
[points] decimal(10,2) not null,
[date] datetime not null
)
Run Code Online (Sandbox Code Playgroud)
和记录:
--cus1
INSERT INTO trans ( customerid , points , date )
VALUES ( 1, 10, '2016-01-01' ) , ( 1, 20, '2017-02-01' ) , ( 1, 22, '2017-03-01' ) ,
( 1, 24, '2018-02-01' ) , ( 1, 50, '2018-02-25' ) , ( 2, 44, '2016-02-01' ) ,
( 2, 20, '2017-02-01' ) …Run Code Online (Sandbox Code Playgroud) 我有一个文件
1 4 2 1 2
1 1 2 4 5
1 2 4 5 9
2 3 4 5 1
1 0 2 1 5
2 2 2 1 1
Run Code Online (Sandbox Code Playgroud)
sort -k1文件给出
1 0 2 1 5
1 1 2 4 5
1 2 4 5 9
1 4 2 1 2
2 2 2 1 1
2 3 4 5 1
Run Code Online (Sandbox Code Playgroud)
我只希望第一个字段进行排序,其他字段保留在应该位于的位置,例如,排序文件应该给出:
1 4 2 1 2
1 1 2 4 5
1 2 4 5 9
1 …Run Code Online (Sandbox Code Playgroud)