我需要使用批处理文件在GAC中注册程序集.有没有办法找到安装位置GacUtil.exe或有没有办法在没有GacUtil的情况下注册组件?
当我开始一个新的过程时,它会自动获得焦点.如何防止它获得焦点或者将焦点重新集中到我的应用程序?
这是我正在使用的代码:
string path = @"c:\temp\myprocess.exe";
ProcessStartInfo info = new ProcessStartInfo(path);
info.WorkingDirectory = path;
Process p = Process.Start(info);
Run Code Online (Sandbox Code Playgroud)
我只需要执行的过程不要获得焦点.
非常感谢,
Adi Barda
我需要在鼠标悬停时显示工具栏按钮边框,否则隐藏它。我尝试执行以下操作:
<Style x:Key="{x:Static ToolBar.ButtonStyleKey}" TargetType="Button" BasedOn="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
<Setter Property="Foreground" Value="Blue"/>
<Setter Property="Control.Background" Value="Transparent" />
<Setter Property="Control.BorderBrush" Value="Transparent" />
<Setter Property="Control.BorderThickness" Value="1" />
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="Control.BorderBrush" Value="Red"/>
</Trigger>
</Style.Triggers>
</Style>
Run Code Online (Sandbox Code Playgroud)
但它没有按预期工作。我期望发生的是,鼠标悬停在边框上将变成红色,否则将是透明的。实际结果是它的行为就像具有默认颜色的默认行为一样。
我肯定做错了什么。
有谁知道它是什么?