minimize

How to make an undecorated window movable / draggable in JavaFX?

老子叫甜甜 提交于 2019-12-28 12:33:08
问题 I have to create an application in which minimize and maximize button will be disabled. I have used "StageStyle.UNDECORATED" with which the application will not be movable or draggable anymore, so I am searching for any other alternative to make my application. Do anyone having solution for this? 回答1: To achieve the window to be undecorated but still movable/dragable you have to handle the appropriate MouseEvent on any node of your choice. Example: import javafx.application.Application;

How to disable the minimize button in C#?

好久不见. 提交于 2019-12-28 06:35:27
问题 In my application I need to temporarily gray out the minimize button of the main form. Any ideas how this can be achieved? I don't mind doing p/invokes to Win32 dlls. Edit: Graying out the minimize button would be the preferred solution, but is there any other way of preventing the form from becoming minimized? 回答1: I read your comment in regards to my response and was able to drum up a more complete solution for you. I ran this quickly and it seemed to have the behavior that you wanted.

Minimizing a supplementary JFrame when main application JFrame gets minimized

£可爱£侵袭症+ 提交于 2019-12-25 16:57:12
问题 The application I'm working on contains a main JFrame, from which users might eventually open another supplementary frame. I am trying to implement such a behavior of the app where the supplementary frame is minimized (iconified) as soon as the main frame gets minimized. I was thinking of overriding the setExtendedState method of the main frame to capture the moment when it gets minimised, and then fire property change event from there so that the supplementary frame may act upon to it. I

Scipy Minimize - Unable to minimize objective function

谁都会走 提交于 2019-12-24 18:33:01
问题 I am trying to optimise a function to find max value of rev_tot using scipy minimise. Here obj_data is a list of probabilities, prem is a constant and inc can take any real value. Following is the code I have written for the objective function : import numpy as np import pandas as pd import scipy from scipy.optimize import minimize def objective(x,*args): prem = args[0] prob = args[1] inc = x[0] rev_tot = 0 rev = 0 del_p = 0.2*(1-np.exp(-2*(1-np.exp(-inc/400)))) for i in range(len(prob)): rev

Restore a minimised application via VBS within an HTA

寵の児 提交于 2019-12-24 17:06:41
问题 I have an HTA that is minimised while it carries out a backup. After this backup is complete I'd like to restore the HTA, but I'm having trouble. I've tried a few things (below), but with no success. Is anyone able to point me towards a definitive solution? First I tried to simply activate the HTA, but this failed. I'm no expert, but my understanding is that doing this should mimick a mouse click on the HTA in the task bar, thus restoring it - Sub RestoreBackupHTA() Shell.AppActivate "Backup"

scipy.optimize.fmin_cg: "'Desired error not necessarily achieved due to precision loss.'

醉酒当歌 提交于 2019-12-24 14:28:32
问题 I am using scipy.optimize.fmin_cg to minimize a function. The function takes various data sets and the fmin_cg returns good values for a lot of the data sets, except for the first 3 which fail: DATASET: 0 Warning: Desired error not necessarily achieved due to precision loss. Current function value: 2.988730 Iterations: 1 Function evaluations: 32 Gradient evaluations: 5 [ 500.00011672 -0.63965932] DATASET: 1 Warning: Desired error not necessarily achieved due to precision loss. Current

ValueError: No axis named 1 for object type <class 'pandas.core.series.Series'>

二次信任 提交于 2019-12-24 10:01:11
问题 I´m new to programming. I´m trying to use scipy minimize, had several issues and gotten through most of them. Right now this is the code, but I'm not understanding why I´m getting this error. par_opt = so.minimize(fun=fun_obj, x0=par_ini, method='Nelder-Mead', args=[series_pt_cal, dt, series_caudal_cal]) 回答1: Not enough info is given by the OP, but basically somewhere in the code it's specified to operate by data frame column (axis=1) on an object that is a Pandas Series. If the code

Prevent WPF Window From Minimizing (Winkey + D, mostly)

谁说我不能喝 提交于 2019-12-24 00:34:33
问题 I have a window which is supposed to act like a Windows Vista(+) gadget; its supposed to stay on the desktop, not to appear on taskbar and the alt+tab menu, but most importantly, not to get minimized. Here is its header: As its style is set to None, it has no control buttons (minimize, close, etc...) but it still can be minimized using the "Show Desktop" feature and the Winkey+D combination. How can I prevent that from happening? Thanks! 回答1: "Show Desktop" does more than just minimize

matlab: fmincon, pass variables into nonlcon

拈花ヽ惹草 提交于 2019-12-22 17:45:21
问题 I know its a stupid question, but I have no idea how to solve it... Lets say I have something like: x = fmincon(@myfun,x0,A,b,Aeq,beq,lb,ub,@mycon) and later on : function [c,ceq] = mycon(x) c = ... ceq = ... How to pass additional variables into @mycon , such as function [c,ceq] = mycon(x, variable) if variable == 1 c = ... ceq = ... else c = ... ceq = ... end Thanks :) 回答1: You pass mycon as anonymous function: x = fmincon(@myfun,x0,A,b,Aeq,beq,lb,ub,@(xx)mycon(xx,variable)) Note that

.NET (C#) Window Minimize Event

£可爱£侵袭症+ 提交于 2019-12-22 10:38:24
问题 Hey, I'm really stuck with my project here... I need to know when any open window has been minimized / restored and Handle the event in my own App. Any ideas? Edit: Musigenesis is right, i do want to know when OTHER applications are minimized/restored 回答1: I think you would need to use the SetWindowsHookEx Win32 API function (along with a few others). Basically, you would iterate through all open windows in the OS and hook into their resizing events. Obligatory comment: are you sure you need