window

EnumWindows does not detect windows

随声附和 提交于 2019-12-14 00:03:01
问题 I am trying to use EnumWindows to print out the titles of all visible windows. It was working at first, EnumWindows was calling the callback function createWindow() multiple times with each call of EnumWindows. But without adding any meaningful code it stopped working and now only calls createWindow() once with a handle of a not visible window. Here is my code: int main() { int row = 2; int col = 2; vector<Window> detectedWindows((row * col) + 4); EnumWindows(&createWindow, (LPARAM)

Why does this.datacontext (Window) show data from viewModel and FrameContent.datacontext (page) does not?

我与影子孤独终老i 提交于 2019-12-13 22:13:37
问题 Why does this.datacontext (Window) show data from viewModel and FrameContent.datacontext (page) does not? Currently, I load the data from a page's view to the window. Instead of loading it directly to the dataContext of the window, I want to load it in the dataContext of the frame where the data is showed. Below my code: ViewConfiguration.xaml: <Frame x:Name="FrameContent" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" NavigationUIVisibility="Hidden" BorderThickness=

How to install METIS package in python on windows?

老子叫甜甜 提交于 2019-12-13 20:04:07
问题 I am currently running a source code in python which uses METIS. I wanted to run it using Jetbrains PyCharm, conda interpreter and these are installed on windows 10. Although I have installed METIS using conda, I could not enable shared libraries and I faced this error: ModuleNotFoundError: No module named 'metis' When I tried to run it without conda I faced the following error although I have added the metis.dll location to the environment variables. RuntimeError: Could not load METIS dll

C# Displaying error messages by completing a simple registration form

谁说胖子不能爱 提交于 2019-12-13 18:20:09
问题 I'm new about C#, I learnt C programmation for one year now. I created a Window Form which asks the user to complete a registration form. My registration form I'd like to display an error message below the buttons when a field is not filled or a field isn't well used. I used this basic code : private void button1_Click(object sender, EventArgs e) { if (!isOkay(userTextBox.Text)) { label5.Text = "Please, enter an username."; label5.Visible = true; } else if (!isOkay(mailTextBox.Text)) { label5

Office 365 app inside iframe?

不羁的心 提交于 2019-12-13 17:25:00
问题 OK, guys need some advice with runing ASP.Net app inside iframe. I have a CMS and ASP.Net app which talks to Office 365. Because I couldn't integrate my app into CMS (authentication issue) I am calling my office app using jQuery Window Plugin which has two advantages: I styled the window to look as though its part of the CMS It has onClose event which I was able to use as a trigger that I need to update UI Everything works great. Only issue is when user goes to sign in. Because Office API

Use applescript to resize a window in Xcode

本秂侑毒 提交于 2019-12-13 16:14:13
问题 This is one of my first times using Xcode/AppleScript in my life - so sorry if very stupid question. Anyway, I have a little test window under my MainMenu.xib file. I've set up a tab view with different buttons and things under each tab that have all sorts of random test functions (displaying dialogs, saying things, requesting passwords, etc.). In one tab, I want to have a lot of test content, but in another tab I only want a little. Is it possible, when you change tab, to have it resize the

How to get and/or overwrite the minimum size of windows in Mac OSX

泄露秘密 提交于 2019-12-13 15:14:29
问题 I want to resize any window on my machine, which I accomplish with AppleScript, using GUI Scripting. The script looks similar to the following: tell application "System Events" set appProcess to the first process whose name is "Finder" set appWindow to the front window of appProcess set position of appWindow to {100, 100} set size of appWindow to {10, 10} end tell Even though I set the width and height to 10px, the Finder will resize to at least a width of 344px and a height of 236px. I

Preventing execution pause when dragging game window

浪子不回头ぞ 提交于 2019-12-13 14:26:24
问题 I have a server and a client. But when ever I start moving the game window, it stops executing code until the window stops moving,causing a connection timed out because the server or client stopped responding for a while. What do I need to do in order to make the game always run code, even when the game window is being moved? 回答1: This is a known issue with XNA games, and there are several ways around it. One way is to move a fake window frame, which isn't the game window really. Game window

How to show system menu of a file in C#

泄露秘密 提交于 2019-12-13 12:19:19
问题 I need to show system menu of a file in my application. This menu same as the image. And, I also want to add a my menu element to this menu. How can I do ? Thanks 回答1: What you're looking for is called a shell context menu . To display such a menu in your application, you'll have to call the Windows API. This is not at all easy, but fortunately for you some other people have taken a stab at it. The C# File Browser on CodeProject has a shell context menu, which is also described in that

Getting selected item in active window

谁都会走 提交于 2019-12-13 12:18:52
问题 I am using C# to develop an application that works with the clipboard, an was wondering if its possible to get the contents of what the user has selected in the current window, no matter what window it is (e.g. could be FireFox, notepad, etc.). 回答1: I'm not sure if you're going to be able to get a general solution for this problem. Take a look at this link; http://www.eggheadcafe.com/software/aspnet/33899121/get-selected-text-of-active-window-.aspx The author of this post reports that their