windows-7

Is it possible to develop Windows Phone 7 apps without a Windows machine?

落花浮王杯 提交于 2020-01-22 10:39:06
问题 I don't have a Windows machine, just a Mac and a Linux box. Windows it pretty expensive, and I don't want to pirate it either. Is it possible to develop Windows Phone 7 apps in Mac OS X or Linux? Is Visual Studio required? 回答1: No. That being said maybe it is possible to run Visual Studio for Windows Phone (which is free) on Linux via Wine but I doubt it. You can do some Silverlight development on Linux and learn some of the XAML and C# concepts and apply them later on Windows Phone but you

C#: Set Desktop Wallpaper to a Solid Color

安稳与你 提交于 2020-01-21 12:04:06
问题 I'm using this code to remove the current wallpaper and set a solid color: public static class WallpaperColorChanger { public static void SetColor(Color color) { // Remove the current wallpaper NativeMethods.SystemParametersInfo( NativeMethods.SPI_SETDESKWALLPAPER, 0, "", NativeMethods.SPIF_UPDATEINIFILE | NativeMethods.SPIF_SENDWININICHANGE); // Set the new desktop solid color for the current session int[] elements = { NativeMethods.COLOR_DESKTOP }; int[] colors = { System.Drawing

C#: Set Desktop Wallpaper to a Solid Color

混江龙づ霸主 提交于 2020-01-21 12:02:41
问题 I'm using this code to remove the current wallpaper and set a solid color: public static class WallpaperColorChanger { public static void SetColor(Color color) { // Remove the current wallpaper NativeMethods.SystemParametersInfo( NativeMethods.SPI_SETDESKWALLPAPER, 0, "", NativeMethods.SPIF_UPDATEINIFILE | NativeMethods.SPIF_SENDWININICHANGE); // Set the new desktop solid color for the current session int[] elements = { NativeMethods.COLOR_DESKTOP }; int[] colors = { System.Drawing

How to properly escape quotes in powershell v2?

时间秒杀一切 提交于 2020-01-21 05:52:10
问题 How do you properly escape quotes in powershell v2 (called from within a batch file)? I have tried: powershell -Command "(gc file1.txt) -join "`n" | Out-File file2.txt" and powershell -Command "(gc file1.txt) -join ""`n"" | Out-File file2.txt" and powershell -Command "(gc file1.txt) -join '"`n`" | Out-File file2.txt" but they all fail. Editor's note : The purpose of the command is to transform Windows CRLF line breaks to Unix LF-only ones, so as to create a file that will be processed on

Why is my Debug.Write broken?

丶灬走出姿态 提交于 2020-01-21 05:33:56
问题 Can somebody explain why my Debug.Write stops working for no apparent reason - no output is visible? This has happened to me many times in Visual Studio 2008 (never on 2005), on both Windows XP, Windows 2003 Server and Windows 7. It is per project and at the same time (on Windows 2003 server), I have projects where Debug.Write works and does not work. Currently, on Windows 7 I have no debug output at all. I create a new windows forms project, put Debug.Write("bla") in Form_Load run it, and

Running Javascript with CScript?

给你一囗甜甜゛ 提交于 2020-01-21 02:39:09
问题 I'm trying to learn how to run Javascript (instead of VBScript) using CScript.exe, but when I try, I get an error: cscript temp.js Input Error: There is no script engine for file extension ".js". I thought this is possible -- any idea what's wrong? 回答1: Setting the registry with regsvr32 did not work for me. Also, I don't want it, since I want my .js to be linked with a plain text editor. But there is a command line option //E for cscript which makes the job: cscript //E:jscript hello.js 回答2:

FileSystemWatcher and windows 7

可紊 提交于 2020-01-20 21:38:27
问题 I am writing a tool that monitors a network directory and is running off of a Windows Server 2008 machine, the OnChanged event for the FileSystemWatcher is being fired correctly from files placed on the network drive by any computer that is not using Windows 7, for some reason if the amount of files copied is more than 19 on a windows 7 computer (at once) then no events are fired although it works if files are done individually. Is there a workaround for this or is that just how the Windows 7

How do I take out the focus or minimize a window with Python?

你。 提交于 2020-01-20 02:25:46
问题 I need to get focus to a specified window, and the only way I'm seeing on my head, is minimizing all windows on front of it until I get the right one... How can I do it? Windows 7, and no specific toolkit.... Every type of window, for example, firefox and console command 回答1: You'll need to enumerate through the windows and match the title of the window to get the one you want. The code below searches for a window with "firefox" in the title and sets the focus: import win32gui toplist = []

how do i prevent screen-savers and sleeps during my program execution?

怎甘沉沦 提交于 2020-01-19 05:40:11
问题 In a c++ program run on Win7, is there a way to fake a mouse movement or something like that, just to keep the screen saver from starting and the system from going to sleep? I'm looking for the minimal approach and I prefer not to use .NET. Thanks, -nuun 回答1: Don't mess with the screensaver settings, use SetThreadExecutionState. This is the API for informing windows on the fact that your application is active: Enables an application to inform the system that it is in use, thereby preventing

How to set environment variables with spaces?

狂风中的少年 提交于 2020-01-18 02:08:09
问题 I need to set values to a environmental variable using a batch file. I wrote the script for this: @echo off set value="Hello world" setx -M srijani "%srijani%;%value%" It gives the error: ERROR: Invalid syntax. Default option is not allowed more than '2' time(s). Type "SETX /?" for usage. I googled and found that while using white spaces we need to write it inside a double quotes. set value="Hello world" But, that is not working too. Note: I am on Windows 7. 回答1: The error output by command