windows-vista

How to achieve Vista glass transparency (AERO) in a WPF application?

五迷三道 提交于 2019-11-29 02:32:33
It's easy for a WPF application to make parts of a window transparent or semi-transparent. But how to I apply the current Vista theme (colors, opacity) to these transparent parts? When I have a green glass border how will I get a green glass background of the same style? Is it even possible to do this without calls to the Windows API? I am thinking of something like this Stefan Here's a nice example: CodeProject: Adding Glass Effect to WPF using Attached Properties Take a look at this link, look for the section titled "IE7 – Extending the glass frame": http://blogs.msdn.com/wpfsdk/archive/2008

How to share memory between services and user processes?

一个人想着一个人 提交于 2019-11-29 00:03:00
I have a set of Win32 applications that share information using a shared memory segment created with CreateFileMapping() and MapViewOfFile() . One of the applications is a system service; the remainder are started by the logged-in user. On Windows XP, there was no problem. We named our segments “Global\Something” and all was well. The additional security in Vista (and assumedly Windows 7) appears to prevent this architecture from working. Normal users are not allowed to create (Win32 error 5) objects in the global namespace. The MSDN indicates that if the account has the “create global”

HttpListener.Start() AccessDenied error on Vista

二次信任 提交于 2019-11-28 23:29:35
Running this code as a regular user throws HttpListenerException (access denied). Snippet runs ok as an administator class Program { static void Main(string[] args) { HttpListener listener = new HttpListener(); listener.Prefixes.Add("http://myip:8080/app/"); listener.Start(); //.... and so on } } i went ahead and added the uri using netsh (netsh http show lists the uri) netsh http add urlacl url=http://+:8080/app user=domain\user still getting the same error. Adding ACLs did work for other projects (they didn't use HttpListener though). I tried multiple port/application name combinations,

Draw Custom Buttons on Windows Vista/7 Aero Titlebar

杀马特。学长 韩版系。学妹 提交于 2019-11-28 21:38:39
I found this question on StackOverflow . Basically, the user wanted to draw custom buttons on the titlebar. I tried the code and realised it works in vista/7 only when Aero is disabled. My question is, is there any way to draw custom buttons on the titlebar while aero is enabled? Also, is there any way of reading information from the current theme so I can style my buttons to match the already existing ones. Update Here is a screenshot from my computer demonstrating the above concept. I got the additional titlebar buttons after installing DisplayFusion. And I know DisplayFusion is a .NET

Command/Powershell script to reset a network adapter

烈酒焚心 提交于 2019-11-28 20:52:28
问题 OS: Vista enterprise When i switch between my home and office network, i always face issues with getting connected to the network. Almost always I have to use the diagnostic service in 'Network and sharing center' and the problem gets solved when i use the reset network adapter option. This takes a lot of time (3-4 min) and so i was trying to find either a command or a powershell script/cmdlet which i can use directly to reset the network adapter and save myself these 5 mins every time i have

C++: Get MAC address of network adapters on Vista?

为君一笑 提交于 2019-11-28 20:48:33
We are currently using the NetBios method , and it works ok under XP. Preliminary tests under Vista show that it also works, but there are caveats - NetBIOS has to be present, for instance, and from what I've been reading, the order of the adapters is bound to change. Our alternative method - with SNMPExtensionQuery - seems to be broken under Vista. The question is: do you know of a reliable way to get a list of the local MAC addresses on a Vista machine? Backwards compatibility with XP is a plus (I'd rather have one single method than lots of ugly #ifdef's). Thanks! Could you use the

How can I/O priority of a process be increased?

感情迁移 提交于 2019-11-28 18:26:05
I want to increase the I/O priority of a process. Answers for both .NET and Windows Vista would be nice. processexplorer is ok as well. The relevant information seems to be a bit scattered compared to the usual MS documentation. There is this white paper that discusses I/O Prioritization in windows . This doc seems to have beta flags all over it but I guess it's probably mostly pretty accurate. Two important things to note: You can only reduce the priority of IO requests below normal. The driver can ignore any such request and treat it as normal anyway. The useful APIs for client applications

Windows batch file starting directory when 'run as admin'

情到浓时终转凉″ 提交于 2019-11-28 17:08:49
I have a batch file which is in a directory and must be run from there as well because it updates files within this directory. This works perfectly fine, except when the user runs the batch file as administrator (required on Vista). Then the starting directory is C:\Windows\System32. Is there any way to still be able to know from which directory the batch file was run? I dont want the user to enter the directory manually. Try to access the batch files path like this: echo %~dp0 For more information see the following quote from the command for /? that describes how the above command works: You

Chrome Style C# Applications?

谁说胖子不能爱 提交于 2019-11-28 16:45:26
I'm not talking about the vista glass feature, I already know how to accomplish that. The feature that I'm talking about is add controls to the titlebar, like office 2007 does with the logo and toolbar. You need to do some Win32 interop to achieve that effect. Depending on whether you are using Winforms or WPF, the way you hook to the message processing differs (I don't remember Winforms, so I'll give all examples for WPF). But in both cases, you need to: Intercept the creation of the window and modify the window styles and extended styles. In WPF you need to inherit from HwndSource and modify

Qt: Erase background (Windows Aero Glass)

只愿长相守 提交于 2019-11-28 16:32:08
问题 Update see Using Blur Behind on Windows for an example of using Qt and DWM.alt text http://labs.trolltech.com/blogs/wp-content/uploads/2009/09/blurbehind2.png Original question: I want to create a Windows Aero Glass window with Qt, now it looks like this: But after calling some my_window->repaint() my window's label becomes broken: But now if I resize the window slightly, it repaints properly. The question is : how do I erase the window background, so that widgets would paint themselves on a