草庐IT

creating-wpf-project-from-scratch

全部标签

windows - 线程 "main"com.jacob.com.ComFailException : Can't co-create object 中的异常

我正在学习本教程:http://www.joecolantonio.com/2014/07/02/selenium-autoit-how-to-automate-non-browser-based-functionality/在Windows中自动化非浏览器应用程序。importjava.io.File;importautoitx4java.AutoItX;importcom.jacob.com.LibraryLoader;importjava.lang.System;publicclassCalcTest{/****ReturnsiftheJVMis32or64bitversion*

c# - 在所有桌面上的任何窗口上的 WPF 中捕获 'text entering'

我希望能够捕获-在操作系统窗口级别-当输入文本时-在任何窗口中,在所有桌面上。详细信息-我喜欢有一个wpf(或winforms)应用程序,它可以挂接到Windows操作系统级别的事件(可能是光标更改或键盘点击)-这样我就可以对正在键入的文本运行一些逻辑。任何引用或示例-甚至研究主题都将不胜感激。谢谢 最佳答案 您需要使用win32api(使用setwindowshookex方法)来执行此操作阅读http://www.pinvoke.net/default.aspx/user32.setwindowshookex

wpf - Powershell 无法加载 Windows.Markup.XamlReader

我刚刚从foxdeploy.com获取示例代码来创建带有GUI的PowerShell脚本。它可以在Windows10机器上运行,但由于某种原因它不能在Windows7或WindowsServer2008R2上运行,它应该在最后运行(不是这段代码,而是带有GUI的最终PS脚本)。代码如下:#ERASEALLTHISANDPUTXAMLBELOWbetweenthe@""@$inputXML=@""@$inputXML=$inputXML-replace'mc:Ignorable="d"',''-replace"x:N",'N'-replace'^脚本似乎在$Form.FindName的第

c# - 如何确定 WPF 窗口是否打开?

我试图在我的WPF窗口未打开时运行一段代码。以下代码不起作用,请检查它并让我知道我哪里做错了。varwindow=IsWindowOpen(this.Title);if(window){//dosomething}else{//Mycodeblock}publicstaticboolIsWindowOpen(stringname=null)whereT:Window{varwindows=Application.Current.Windows.OfType();returnstring.IsNullOrEmpty(name)?Application.Current.Windows.Of

c# - 如何从运行在 Windows 10 Creators Update 上的 WPF 应用注册 BLE 通知?

我正在尝试编写一个使用WinRT蓝牙LEAPI(Windows.Devices.Bluetooth命名空间)的C#应用程序。该应用程序是Windows经典桌面应用程序(WPF,不是UWP)。当运行CreatorsUpdate之前的Windows10版本时,这些API会按预期运行。但是,当运行CreatorsUpdate时,应该将数据发送到蓝牙设备的API不起作用。具体来说,以下方法返回成功状态代码但不通过蓝牙radio传输任何数据(使用蓝牙流量嗅探器验证):GattCharacteristic.WriteClientCharacteristicConfigurationDescript

windows - Visual Studio 2017 : open AND build solution from a command line call

在visualstudio2017(或可能是任何版本)中,我想在IDE中打开一个解决方案并从命令行开始构建它。如果解决方案已经打开,那么我只想开始构建(在IDE中)。所以我可以这样打开解决方案:devenvsolution.sln或者我可以这样构建它:devenv/buildsolution.sln还有这个:devenvsolution.sln/command...但是很难找到有关“命令”的文档...该示例是一些用户制作的宏,但我假设还有其他内置命令?-这可能有帮助...?但我不确定如何:在IDE中打开一个解决方案并立即构建它如果它已经打开,就让它开始构建。有什么办法可以做到这一点吗?

python - Windows 上的 asyncio create_subprocess_shell python 3.7

我正在尝试在Windows上测试一些异步功能。我正在使用Python3.7。这会提示一些NotImplementedErrorimportasyncioimportosimporttimeimportsys#thisworksasyncdefsay_after(delay,what):awaitasyncio.sleep(delay)print(what)#thisdoesn'tasyncdeftest_async(num):print('Task#{0}start'.format(num))proc=awaitasyncio.create_subprocess_shell('C:/P

c# - 在 Windows 8.1 中打印 WPF FixedPage 时为空引用

我有一个.netFrameworkv4.7.2WPF应用程序打印了一个FixedPage,它在Windows7上运行时没有任何问题,但在Windows8.1上运行时我遇到了一些问题.以下代码块是造成问题的原因:privatevoidPrint(){using(varprintQueue=LocalPrintServer.GetDefaultPrintQueue()){varprintTicket=printQueue.DefaultPrintTicket;varwriter=PrintQueue.CreateXpsDocumentWriter(printQueue);writer.Wr

windows - 在 Windows XP 上 : How to create a user with read access to only one certain directory?

首先让我声明:我知道任何想要运行程序(甚至登录)的用户都必须有权访问(可能至少)Windows系统目录和%ProgramFiles中的共享库%,但我希望能够访问Skype,例如,通过与非特权用户一起运行它并确保它无法访问任何不必要的文件。p>我担心这样做的唯一方法是识别我存储我不希望该用户访问的文件的所有gazillion目录,然后创建一个可以访问这些目录的新用户组,或者运行VM中的Skype和Azureus。有没有更好的办法? 最佳答案 通常,帐户至少是Users组的成员,它确实可以访问很多东西。您可以使该帐户成为任何组的成员,或

java - Windows 上的 IBM Websphere - OutOfMemoryError : Failed to create a thread

我有一个J2EE应用程序在Windows操作系统上的IBMWebsphereApplicationServer上运行。偶尔我会在javacore文件中看到一个OutOfMemoryError异常,其中包含以下信息。1TISIGINFODumpEvent"systhrow"(00040000)Detail"java/lang/OutOfMemoryError":"Failedtocreateathread:retVal-1073741830,errno12"receivedJava使用以下配置运行:-Xms512m-Xmx1350m-Xscmx50M分析javacore文件,线程数只有1