window

Batch File - going back two steps in a directory path

你。 提交于 2019-12-29 07:21:28
问题 I am creating a batch file i am on a path C:\Validation\docs\chm I want to move back to the C:\Validation part which is in %DialogPath% This was entered by the user but when i write CD /D %DialogPath% An error occurs that tells this path does not exists 回答1: The direct answer to your question would be cd ..\.. But cd /D C:\Validation also works. The problem is more likely with the variable than then command. 回答2: Until you give more details as to the script in question, we can only guess to

Show multiple (2,3,4,…) images in the same window in OpenCV

余生长醉 提交于 2019-12-29 03:11:45
问题 I want to show 2, 3 or more images in the same window. My problem is how to put the second, third image just on the right side (above, left or upper) the main image. I want to create something like this, using OpenCV. --------------- | | | | | | --------------- | | | | | | --------------- Thanks in advance Jorge 回答1: You can find the answer on the OpenCV Wiki: https://github.com/opencv/opencv/wiki/DisplayManyImages :-) 回答2: I implemented this very recently. So thought of sharing it. It uses C

Application.Startup event limitations (bug?)

血红的双手。 提交于 2019-12-29 01:51:51
问题 It says, I can use Startup event for many things, like initialization, creating multiple forms, blablabla. However, try to create a new WPF application and add this event handler: private void App_Startup(object sender, StartupEventArgs e) { Window window = new Window(); } And after closing main window your application will hang up in the memory. Pausing executing in VS at that moment will drop ugly crash call stack window with a lot of calls somewhere far away from my source code. Any

How to put a shadow to a Frameless window in Qt

允我心安 提交于 2019-12-28 13:47:13
问题 I'm trying to create a Frameless window that has a shadow under it.When we create a borderless window with Qt::FramelessWindowHint flag it doesn't contain a shadow. But we can put shadows to a child widgets easy by creating a QGraphicsDropShadowEffect object and then pass it to the widget through setGraphicsEffect function. But this doesn't seem to work for QMainWindow. Please help me to put shadow to a frameless window in Qt... 回答1: You can do it using this simple hack: Add a "QWidget" (say

How to catch the ending resize window?

别来无恙 提交于 2019-12-28 10:00:58
问题 I need catch the event endresize in WPF. 回答1: WPF doesn't provide an event that solely fires at the end of the resize process. SizeChanged is the only event associated with Window resizing - and it will fire multiple times during the resizing process. A total hack would be to constantly set a timer ticking when the SizeChanged event fires. Then timer will not get a chance to tick until resizing ends and at that point do your one time processing. public MyUserControl() { _resizeTimer.Tick +=

Parent window freezes when child window freezes altough it's from another process

旧城冷巷雨未停 提交于 2019-12-28 06:27:11
问题 Disclaimer : I'm not familiar with the Win32 API, especially how windows work. I'd like to make the window of some process a child window of another process. The two processes are also parent and child. But I don't think that matters. So far, everything works like a charm - Until I freeze the main thread of the child window. Imagine a container.exe that 'hosts' notepad.exe and someApplication.exe When I suspend the main thread of someApplication.exe for a few seconds, its window is frozen for

How to send a WPF window to the back?

天大地大妈咪最大 提交于 2019-12-28 04:09:05
问题 In my application I have a window I use for plotting debug data. When it loads, I would like to open it "in the background", behind all other windows. What's the best way to achieve this? 回答1: You can use the following code: [DllImport("user32.dll")] static extern bool SetWindowPos( IntPtr hWnd, IntPtr hWndInsertAfter, int X, int Y, int cx, int cy, uint uFlags); const UInt32 SWP_NOSIZE = 0x0001; const UInt32 SWP_NOMOVE = 0x0002; static readonly IntPtr HWND_BOTTOM = new IntPtr(1); static void

Could a website force the browser to go into fullscreen mode?

微笑、不失礼 提交于 2019-12-28 03:38:08
问题 I want to run a psychological study for which participants have to look at large images. The experiment is done on the web and therefore in a browser window. Is it possible to tell the browser to go into fullscreen, for example on button press? I know there is the possibility to open a fixed-size popup window. Do you think this would be a feasable alternative? And if, what would be the best way to do it? Are there elegant ways of detecting a popup-blocker, to fallback and run the study in the

Difference between screen.availHeight and window.height()

妖精的绣舞 提交于 2019-12-27 18:23:43
问题 I am executing the following Javascript on my browser (Firefox). console.debug("Screen height = "+ screen.availHeight ); //outputs 770 console.debug("Window Height ="+ $(window).height() ); //outputs 210 (I am using jQuery as well) What is the difference between the two? Is 770 in pixels and 210 in mm? Similarly, when I write $(document).height() and $(window).height() , there is a difference. What is the reason? 回答1: window.outerHeight It's the height of the window on screen, it includes the

Difference between screen.availHeight and window.height()

落花浮王杯 提交于 2019-12-27 18:21:45
问题 I am executing the following Javascript on my browser (Firefox). console.debug("Screen height = "+ screen.availHeight ); //outputs 770 console.debug("Window Height ="+ $(window).height() ); //outputs 210 (I am using jQuery as well) What is the difference between the two? Is 770 in pixels and 210 in mm? Similarly, when I write $(document).height() and $(window).height() , there is a difference. What is the reason? 回答1: window.outerHeight It's the height of the window on screen, it includes the