window

Eclipse closes all shells when one is closed

喜欢而已 提交于 2020-02-07 04:05:27
问题 I've a project which is a randomizer. The randomizer gives a random number (of course) which is used to call a random game. For now, I only have one game. When I run the randomizer to get the game, everything works and it loads the game flawlessly. But, when I close the window which was created for the random game, it also closes the parent window which gives the user access to the randomizer. I am not sure as to why this is happening. I tried refactoring the name of my shell as well as my

Eclipse closes all shells when one is closed

爷,独闯天下 提交于 2020-02-07 04:05:26
问题 I've a project which is a randomizer. The randomizer gives a random number (of course) which is used to call a random game. For now, I only have one game. When I run the randomizer to get the game, everything works and it loads the game flawlessly. But, when I close the window which was created for the random game, it also closes the parent window which gives the user access to the randomizer. I am not sure as to why this is happening. I tried refactoring the name of my shell as well as my

How to get a Window's Icon in C#

生来就可爱ヽ(ⅴ<●) 提交于 2020-02-04 08:48:30
问题 How can I get a Window's icon from its Pointer or Process/Process Name? The Icon shown in the corner of the Window or on the Task-bar or in the ALT-Tab menu. 回答1: read about Icon.ExtractAssociatedIcon : Returns an icon representation of an image that is contained in the specified file. private void ExtractAssociatedIconEx() { Icon ico = Icon.ExtractAssociatedIcon(@"C:\WINDOWS\system32\notepad.exe"); this.Icon = ico; } http://msdn.microsoft.com/en-us/library/system.drawing.icon

When I change vertical size of XNA game window to minimum, it throws ObjectDisposedException for spritebatch, why?

主宰稳场 提交于 2020-02-04 01:15:30
问题 When I resize the game window and the viewport's height becomes 0, GC disposes of spritebatch, I think. Is this what happens? How do I prevent this? 回答1: Form gameForm = (Form)Form.FromHandle(Window.Handle); gameForm.MinimumSize = new System.Drawing.Size(800, 600); Short and sweet! 回答2: I had this same problem and some quick debugging shows that XNA calls UnloadContent and then LoadContent again to reinitialise resources; my guess it it loses the GraphicsDevice or something, hence the reload.

How to decrypt multiple pdf files using qpdf?

£可爱£侵袭症+ 提交于 2020-02-01 04:11:05
问题 I have some n number of pdf files which are SECURED( i.e not password secured, but owner secured). I was able to decrypt single pdf at a time using _ "qpdf --decrypt Input.pdf Output.pdf" from Cmd Promt in Windows. can you help me to do the same with multiple pdf's using batch file or from cmd prompt. 回答1: @echo off setlocal enableextensions disabledelayedexpansion if not exist output\ md output for %%a in (*.pdf) do qpdf --decrypt "%%~fa" "output\%%~nxa" Create an output folder under current

Cannot reduce size of gtk window programatically

混江龙づ霸主 提交于 2020-01-30 10:47:40
问题 I seem to be facing a problem when resizing a gtk window programatically. The problem is that once I have increased the width and height of the window to 800x600, I cannot seem to reduce it back to its original size of 400x200. Below is the sample code. Has anyone faced such a problem? #include <gtk/gtk.h> static gboolean is_clicked = FALSE; static void Child_window_resize( GtkWidget *widget, GtkWidget *window) { if(!is_clicked) { g_print("Inside If block increase bool value %d\n",is_clicked)

Why doesn't Visual Studio want me to add a new window to my WPF project?

孤人 提交于 2020-01-29 05:47:24
问题 Maybe a stupid question, but when I add item to a WPF project, Visual Studio only offers me UserControl, and not Window. Is this trying to encourage me to do MVVM, is my setup broken, or is there some other reason I haven't thought of? 回答1: Your project is probably configured as a WinForms project, or possibly as a class library. If it's created as either of these, you are only able to add a WPF UserControl, unfortunately. Of course, there's no technical reason for this limitation, so you can

jQuery: How to detect if popup window is closed?

这一生的挚爱 提交于 2020-01-25 23:13:11
问题 I want to detect if the user pressed the browser's close button on a popup window in my application. By searching around I found this solution: $(window).bind('beforeunload', function(event) { $.ajax({url:"acquisition_cleanup.php", async:false}); var dataStr = 'id={id}'; $.ajax({ type: "POST", url: "acquisition_cleanup.php", data: dataStr, success: function() { window.close(); } }); }); It works well on my Ubuntu machine with Firefox 31. But unfortunatly it does not work on windows machine

jQuery: How to detect if popup window is closed?

末鹿安然 提交于 2020-01-25 23:13:11
问题 I want to detect if the user pressed the browser's close button on a popup window in my application. By searching around I found this solution: $(window).bind('beforeunload', function(event) { $.ajax({url:"acquisition_cleanup.php", async:false}); var dataStr = 'id={id}'; $.ajax({ type: "POST", url: "acquisition_cleanup.php", data: dataStr, success: function() { window.close(); } }); }); It works well on my Ubuntu machine with Firefox 31. But unfortunatly it does not work on windows machine

How to have a PyQt window call a method when its “X” close button is selected

一曲冷凌霜 提交于 2020-01-25 03:00:19
问题 I'm trying to have a method called when the "X" close button of a PyQt window is selected. Briskly, I have a class of the object QtGui.QWidget and I want it to call one of its methods when the window is closed using the "X" close button in order to wrap up some subprocesses. How could this be done? The code is shown below. The method of the class interface that I want to have called is stylusProximityControlOff() . This method terminates a subprocess which is potentially a little messy, but