windows-8

Modal dialogs opened by a fullscreen OpenGL window on Windows 7 are not showing

和自甴很熟 提交于 2019-12-19 04:49:09
问题 It seems that my problem may be the same as an unanswered related question (OpenGL with GLUT on windows 7, fullscreen mode not showing the message box). Since I switched to Win7 as a development environment, and a possible target platform for my applications, I noticed a regression in their behaviour. Whenever I have a fullscreen window containing a fullscreen OpenGL context, the applications have problems displaying modal dialog boxes (such as message boxes, file open dialog, etc.) The

WindowsError: [Error 740] The requested operation requires elevation even after disabling UAC

倖福魔咒の 提交于 2019-12-19 04:23:23
问题 I have disabled UAC and running my script in python. command = "abcd.exe" subprocess.Popen(command,stdout=subprocess.PIPE,stderr=subprocess.PIPE).communicate() Also, I set the application abcd.exe from its property to run as admin. Then I'm getting the following error: WindowsError: [Error 740] The requested operation requires elevation 回答1: You could try using: subprocess.call(["abcd.exe"], shell=True) Basically the important part here is shell=True ; if set to False , then you will get the

custom cursor in metro app

左心房为你撑大大i 提交于 2019-12-19 04:20:07
问题 I am developing a paint like application. I want to change cursor at some instance. So, how can I use the custom cursor in metro app ? I have found this Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Custom, uint id); In above method, there is one enum for "Custom" cursor and the second argument is for resource ID. So how can I get that ? 回答1: The basic route to doing this: Create your custom cursor and package it in a .res using a C++

Large images with Direct2D

别说谁变了你拦得住时间么 提交于 2019-12-19 03:59:30
问题 Currently I am developing application for the Windows Store which does real time-image processing using Direct2D. It must support various sizes of images. The first problem I have faced is how to handle the situations when the image is larger than the maximum supported texture size. After some research and documentation reading I found the VirtualSurfaceImageSource as a solution. The idea was to load the image as IWICBitmap then to create render target with CreateWICBitmapRenderTarget (which

Programmatically scroll controls into view when virtual keyboard opens

为君一笑 提交于 2019-12-19 03:59:11
问题 I have a page with a vertical set of textboxes. If one of them is focused, all of them should be visible, even if the onscreen keyboard is displayed. There are just enough of them that all of them fit in the available space above the keyboard. When the bottom textbox is focused, the page gets automatically scrolled up so that all of them are visible, but if the top textbox is focused, the onscreen keyboard covers the bottom one. This is a simplified example of my page: <Grid Background="

Unable to play sound in Windows 8

半城伤御伤魂 提交于 2019-12-19 03:56:07
问题 I want to play sound from a mp3 file in windows 8 metro-style app. I tried two approaches to do so: Method1: This is using the code provided by https://stackoverflow.com/a/10961201/147530. It works. Method 2: Here I just new a MediaElement and set its Source property like so: var x = new MediaElement { Source = new Uri("ms-appx:/Assets/MyMp3File.mp3") }; When I do x.Play() nothing happens however. There are no exceptions thrown. Question: How can I make method 2 work? EDIT: Wanted to update

Unable to play sound in Windows 8

蹲街弑〆低调 提交于 2019-12-19 03:56:05
问题 I want to play sound from a mp3 file in windows 8 metro-style app. I tried two approaches to do so: Method1: This is using the code provided by https://stackoverflow.com/a/10961201/147530. It works. Method 2: Here I just new a MediaElement and set its Source property like so: var x = new MediaElement { Source = new Uri("ms-appx:/Assets/MyMp3File.mp3") }; When I do x.Play() nothing happens however. There are no exceptions thrown. Question: How can I make method 2 work? EDIT: Wanted to update

how to identify if user agent is windows 8 tablet?

烈酒焚心 提交于 2019-12-19 03:38:10
问题 I have a web application. I my JavaScript, I am identifying devices by user agent string as follows: _android = navigator.userAgent.toLowerCase().indexOf("android"); _iOS = navigator.platform.indexOf("iPhone"); My task is to identify if device is win8 tablet or not? I have already seen this post. But, the string "Windows NT" is likely to appear in useragent on all the PC browsers. So, I need to find out a client side way of identifying if device is win8 tablet? Any thoughts? 回答1: You can't

Windows 8 Metro App File Share Access

半腔热情 提交于 2019-12-19 03:16:21
问题 I am developing a Windows 8 Metro app, and we intend to deploy it to only a few tablets within our company. It's not meant for the Windows Store. We need the app to access some directories on the company's network share, but forcing the user to use a FilePicker isn't what we want. Our first attempt was to use await StorageFolder.GetFolderFromPathAsync("J:\\"); . This didn't work, and produced the following exception: An unhandled exception of type 'System.UnauthorizedAccessException' occurred

How to disable selection a single item in a GridView

时光怂恿深爱的人放手 提交于 2019-12-19 03:09:23
问题 How do you disable the selection single item from a GridView? I have a GridView with it's ItemsSource bound to an IEnumerable<SampleDataItem>. I'd like to be able to programmatically not allow the selection of some items in the list while allowing selection of the others. 回答1: While I haven't done this, you should be able to use an ItemContainerStyleSelector on the GridView, the method gives you the container (GridViewItem) and the item you're binding to. From there you can set the IsEnabled