我最近开始使用Windows 10。显然,升级后,我的环境PATH变量迁移到了新的操作系统。在 Windows 10 上,我安装了 Python 3.4。安装后,我更新了我的 PATH 变量:
;C:\Python34\Scripts;C:\Python34\python.exe;
Run Code Online (Sandbox Code Playgroud)
但是,cmd 仍然找不到 python 命令。似乎 PATH 变量显然没有更新。关于如何解决这个问题的任何建议?
我正在为 WINdows 10 开发一个应用程序,我想在两个列表中实现拖放结构。但 Drop 事件在 Windows 10 应用程序中未触发 .. 以前它在 Windows 8.1 中运行 .. 以下是我的代码:
<ListView Grid.Row="1" x:Name="TasksList" SelectionMode="None" HorizontalAlignment="Stretch"
ScrollViewer.VerticalScrollBarVisibility="Hidden" IsItemClickEnabled="True"
VerticalAlignment="Stretch"
ItemsSource="{Binding Tasks}" ScrollViewer.VerticalScrollMode="Enabled"
CanReorderItems="True" ShowsScrollingPlaceholders="False"
DragItemsStarting="GridViewDragItemsStarting" AllowDrop="True" IsSwipeEnabled="False"
Drop="GridViewDrop" DragEnter="TasksList_DragEnter" CanDragItems="True"
ItemContainerStyle="{StaticResource ClientListViewItemStyle}" >
<ListView.ItemTemplate>
<DataTemplate>
<Border BorderThickness="0,0,0,1" BorderBrush="{StaticResource MydesqBorderBrush}" Padding="10">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid Grid.Column="0" Width="80" Height="60" Background="{Binding DueDateIndicatorColor,Converter={StaticResource HexToSolidColorBrushConverter}}" VerticalAlignment="Top" HorizontalAlignment="Center">
<Image x:Name="ImgClient" Source="{Binding Client.ClientPictureUrl,Converter={StaticResource ServerUrlConverter}}" Stretch="Fill" Visibility="{Binding Source, Converter={StaticResource NullToInvisibilityConverter}, ElementName=ImgClient}" Width="80" Height="60"/>
<Image x:Name="ImgAccount" Source="{Binding ImageUrl}" Width="35" Height="35" …Run Code Online (Sandbox Code Playgroud) 在 Visual Studio 2015 中,有多种项目类型可用于制作 Windows Phone 应用程序。这些是:
问题:如果我使用选项 1(Windows 通用),应用程序是否会在:
欢迎补充评论/评论。
windows-phone windows-phone-8 win-universal-app windows-10 visual-studio-2015
我试图在安装之前检查是否安装了 Windows 功能,以避免重新安装。
我用它来检查:
function Check-WindowsFeature {
[CmdletBinding()]
param(
[Parameter(Position=0,Mandatory=$true)] [string]$FeatureName
)
if((Get-WindowsOptionalFeature -FeatureName $FeatureName -Online) -Like "Enabled") {
# $FeatureName is Installed
# (simplified function to paste here)
} else {
# Install $FeatureName
}
}
}
Run Code Online (Sandbox Code Playgroud)
但是“if”总是返回false,即使安装了功能。
例子:
C:\> (Get-WindowsOptionalFeature -FeatureName Microsoft-Hyper-V-All -Online) -Like "Enabled"
False
C:\> Get-WindowsOptionalFeature -FeatureName Microsoft-Hyper-V-All -Online | ft -Property State
State
-----
Enabled
Run Code Online (Sandbox Code Playgroud)
我已经尝试过格式为表格,格式为宽,过滤器-Property State,输出为字符串,与正则表达式匹配,-eq与contains和匹配,但都不起作用。
功能$FeatureName正常,因为安装有效。
如何使这项工作?
此代码适用于 Windows 7,但不适用于 Windows 10。而不是更改壁纸只是黑屏
[DllImport("User32", CharSet = CharSet.Auto)]
public static extern int SystemParametersInfo(int uiAction, int uiParam,
string pvParam, uint fWinIni);
static void Main(string[] args)
{
SystemParametersInfo(0x0014, 0, "Image.jpg", 0x0001);
}
Run Code Online (Sandbox Code Playgroud) 我在进行UWP开发时遇到问题.在我的应用程序中,我需要获取计算机中运行的所有应用程序详细信息(包括其displayname或ExecutableFileName).
我的第一个解决方案是使用System.Process该类,我喜欢这样做
private void Mybutton_Click(object sender, RoutedEventArgs e)
{
var apps = Process.GetProcesses();
...
}
Run Code Online (Sandbox Code Playgroud)
但是在UWP中它并不是可用的,并且当我尝试这样做时会抛出异常.
其次,我已经尝试过System.AppDiagnostics该类,但该类只显示UWP应用程序的详细信息.
而且,令我失望的是,当我试图在网站上找到解决方案时.几乎所有的建议都不起作用,我发现UWP应用程序是沙盒式的,这意味着,实现它的方式有限.
这部分将是我的应用程序中最重要的部分.所以我有一个问题,我怎么能知道我的计算机中的所有过程细节.如果你能为我提供有用的解决方案,我将非常感激,谢谢.
我有包含这些声明的代码:
class IRealNetDll;
extern "C"__declspec(dllexport)
IRealNetDll * CreateRealInstance(int ilicence);
Run Code Online (Sandbox Code Playgroud)
这在Win7上使用Visual Studio 2012正确构建.
但是对于Windows 10上的VS 2015,2017,这一行:
extern "C"__declspec(dllexport)
Run Code Online (Sandbox Code Playgroud)
结果是:
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
error C3690: expected a string literal, but found a user-defined string literal instead
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
error C2146: syntax error: missing ';' before identifier 'IRealNetDll'
Run Code Online (Sandbox Code Playgroud)
为什么我会收到此错误,为什么只有较新的编译器,以及如何防止它?
我在尝试在Windows 10上安装VB6时遇到了问题.我尝试了几个不同的安装程序和指南,但无论如何,我都无法启动 setup.exe
每当我开始它都没有任何事情发生.但是,当我检查Windows事件时,我看到安装程序退出错误代码:0xc0000005
我甚至尝试过外部安装助手,但它总是以同样的方式发生.我还安装前清理了我的注册表.
任何帮助都非常感谢.先感谢您!
我试图在我的Windows 10系统中添加新的环境变量,我使用下面的powershell命令添加系统变量
$ env:ITH_PYTHON_PATH ='C:\ Python27\Python.exe'
我可以看到命令成功添加新值,并且当我使用命令$ env:ITH_PYTHON_PATH时我可以返回值.
有没有更好的方法永久添加环境变量?
windows-10 ×10
c# ×2
powershell ×2
uwp ×2
xaml ×2
back ×1
back-button ×1
c++ ×1
install ×1
path ×1
python ×1
setup.exe ×1
vb6 ×1
visual-c++ ×1
wallpaper ×1