我有这样的用户控件:
<UserControl x:Class="MySample.customtextbox"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="20" d:DesignWidth="300">
<Grid>
<TextBox x:Name="Ytextbox" Background="Yellow"/>
</Grid>
Run Code Online (Sandbox Code Playgroud)
我在窗口中使用此控件并设置Tab键顺序...但是当我的窗口加载时,Tab键顺序无法正常工作!我的窗口代码:
<Window xmlns:my="clr-namespace:MySample" x:Class="MySample.window"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="window" Height="300" Width="600">
<Grid>
<Grid.RowDefinitions>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition></ColumnDefinition>
<ColumnDefinition></ColumnDefinition>
<ColumnDefinition></ColumnDefinition>
<ColumnDefinition></ColumnDefinition>
</Grid.ColumnDefinitions>
<my:customtextbox Grid.Column="1" KeyboardNavigation.TabIndex="0" InfoText="{Binding msg}" Height="20"/>
<TextBox Grid.Column="3" KeyboardNavigation.TabIndex="1" Text="{Binding msg}" Height="20" Background="Gold"></TextBox>
<my:customtextbox Grid.Row="1" Grid.Column="1" KeyboardNavigation.TabIndex="2" InfoText="{Binding msg}" Height="20"/>
<TextBox Grid.Column="3" Grid.Row="1" Text="{Binding msg}" Height="20" KeyboardNavigation.TabIndex="3" Background="Gold"></TextBox>
</Grid>
Run Code Online (Sandbox Code Playgroud)
浏览一些代码时,我发现了对OpenPrinter()的调用.代码编译并正常工作.但是,我们正在传递一个HANDLE而不是LPHANDLE(在MSDN中指定).我发现在windef.h以下声明中存在:
typedef HANDLE FAR *LPHANDLE;
Run Code Online (Sandbox Code Playgroud)
LP代表什么?我应该使用LPHANDLE,还是保留HANDLE?
我想在我的控制台应用程序中创建一个from后隐藏我的控制台.关闭表格后再显示:)或者我想要的时候...
Console.Hide???
Application.Run(nForm());
Console.Show???
Run Code Online (Sandbox Code Playgroud) 我需要一个脚本来改变我的身份列播种从3000到5000