windows-vista

Is there an API for vista to detect if the desktop is running full screen?

ε祈祈猫儿з 提交于 2019-11-30 15:58:00
问题 e.g, Is the user playing a movie full screen, or looking at powerpoint in full screen mode? I could have sworn I saw a IsFullScreenInteractive API before, but can't find it now 回答1: Here's how I've solved this problem: using System; using System.Collections.Generic; using System.Data; using System.Diagnostics; using System.Runtime.InteropServices; namespace Test { class Program { static void Main(string[] args) { Console.WriteLine(IsForegroundWwindowFullScreen()); } [DllImport("user32.dll")]

How to programmatically create a file association that works in XP, Vista and Windows 7

北城余情 提交于 2019-11-30 15:37:17
问题 I want to be able to register my file-extension from my program. (Associate the filetype with my program) There are lots of articles about this, but the technique discussed (fiddling with the registry) is only appropriate for Windows XP as far as I see. What is the best way to associate a filetype with a program so that it works under XP, Vista and Windows 7 as well ? (Are there any working code-examples ?) ClickOnce would be an option, but this only registers the filetype at installation

Sending and receiving data over USB port

好久不见. 提交于 2019-11-30 15:21:58
I'd like to send/receive data over a USB port to a device (from my vista pc). Is there a free/cheap library out there that can do this, and how involved would this project be (not taking into account what's being sent or received) ? You don't specify what's going on here. Does the device already exist? Is it already a USB device? If you already have a USB device, then the manufacturer should be able to help. If you are building the device, then you might want to look at something like a USB to serial adapter (which generally require no special drivers at all) or something from FTDI - they make

How do I grant SeCreateSymbolicLink on Windows Vista Home edition

走远了吗. 提交于 2019-11-30 15:19:02
I want to be able to use mklink to create symbolic links on my Windows Vista Home edition computer. However, I must grant SeCreateSymbolicLink before mklink will be able to function on Vista Home edition (by default the right is revoked). Home edition provides no UI or tool facility to grant/revoke discreet rights. A Wikipedia link on NTFS symbolic links says the ntrights.exe tool that comes in Windows Server 2003 Resource Kit Tools can be used to grant this right on Home edition. However, after installing these tools, that proved to be incorrect. That version of ntrights.exe does not

How do I get battery information in windows?

我们两清 提交于 2019-11-30 15:10:01
问题 I have two laptops here. One is running Vista, the other Windows 7. I need to get the specifications on the batteries in both, how do I go about that? The reason I'm asking is that I'd like to know if they're lithium ion or something else. Supposedly other types of batteries may have adversely affected charge capacities if left plugged in for too long. 回答1: You could use WMI and the Win32_Battery class. It has a property called Chemistry that has this information. UPDATE: Actually, there is

Disable Vista UAC per-application, or elevate privileges without prompt?

蹲街弑〆低调 提交于 2019-11-30 14:18:02
问题 I have an app that normal users need to be able to run, but requires administrator privileges to actually function. I tried to make the shortcut that my users run it with "Run as administrator" but this just causes a UAC prompt whenever they try to run the app. Is there any way to elevate privileges programatically, without my users needing to go through a UAC prompt and/or knowing an administrator password? From a security standpoint, I understand that most applications shouldn't be allowed

Can I get write access to raw disk sectors under Vista and Windows 7 in user mode?

安稳与你 提交于 2019-11-30 14:09:18
From the RawDisk website : The new security model of Windows Vista puts tight restrictions on applications executed in user mode. Even with elevated administrative rights, the application can’t get write access to raw disk sectors. Is this true? From the Microsoft doc : The changes to the file system and to the storage stack do not apply if the volume is not mounted or if the volume has no file system. Please give either a link to the official Microsoft doc confirming the RawDisk website or a working code example. (I obviously failed to create one, CreateFile() call fails with ERROR_ACCESS

C# Windows7/Vista style ListView

亡梦爱人 提交于 2019-11-30 13:44:41
when I create a ListView in details view in VS2008, it creates a rather old looking listview. It doesnt have any of the fancy hover effects and cool blue border that (for example) the file explorer in WinVista and Win7 has. See image for example: So to summarise, how can I get a ListView in C# VS2008 look like the one in the picture above? (VS2008 listview on the right for comparison) Thanks Try calling SetWindowTheme Like this: [DllImport("uxtheme.dll", ExactSpelling=true, CharSet=CharSet.Unicode)] private static extern int SetWindowTheme(IntPtr hwnd, string pszSubAppName, string pszSubIdList

The best PHP editor for Vista [closed]

為{幸葍}努か 提交于 2019-11-30 13:42:50
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 8 years ago . Some points to consider when answering my question: I'm new to PHP, coming from a Windows / .NET background My PHP dev enviroment

How do I make my program work in Windows Vista and Windows 7?

不羁的心 提交于 2019-11-30 12:17:39
问题 I have an application written in Delphi 2006 that was working fine in Windows XP. I packed the application using Inno Setup, using Program Files as the default folder. A few users migrated to Windows Vista and Windows 7. The issue here is that the application creates some files inside its installation folder by its own. This was working in XP but in Windows Vista the users were having problems with the created files (they don't appear and so on). After investigating the users' reports I