How to make action() in kendo window set minimize as default. My code here :
.Actions(actions => actions.Pin().Minimize().Maximize().Close())
There is a function on the window called minimize(). I bet that you can simply call that when the window is created.
Related
I want to show my window when the keyboard shortcut - show desktop has invoked,is there any function can get this?
I display this window under a custom status bar item. So I want to do this.
I have solve this by myself,I think maybe you need this sometime,just set window self.window.collectionBehavior = NSWindowCollectionBehaviorStationary;
window will display all the time.
I am trying to call a GUI from a function, select an item from a pop-up menu in the GUI, and pass a variable associated with the pop-up selection back to the function. The only tutorials I find on GUIs have to do with just changing things within the GUI, but not sending anything out back to a main function.
So say I have 3 options in the pop-up: Image 1, Image 2, Image 3. When for instance Image 2 is selected and the OK button is pressed, I'd like the string 'Image 2' be passed back to the main function that called the GUI.
Thanks for the help!
You can try something like: [selection, ok] = listdlg('PromptString','Select a value:', 'SelectionMode','single', 'ListString',['Value 1';'Value 2';'Value 3']). The variable selection will give you the index of the selected value.
When we use WindowFromPoint winapi function we usually can get the case, when Point specifies to some control within a window. And in such cases WindowFromPoint returns handle to that control, not to the window that handles that control.
For example in my small test application if I point to the "body" of chrome browser I get the control with class = Chrome_RenderWidgetHostHWND and its hwnd.
But what I need is to get the "parent" window for that control (which is obviously should be the chrome window).
Traverse the parents using GetAncestor() passing GA_PARENT. This differs from calling GetParent() which will return the owner if the window is a top-level window.
Can't you just use GetParent? Keep traversing until you find the desktop window.
I'm creating a dialogbox with a picture control and whenever I initialize the dialog it sets the focus to that picture control, is there any way to give dialog the default without resetting the focus from picture control?
When you get the WM_INITIDIALOG message in your dialog procecure, if you return FALSE then it will not set the focus to one of the controls in the dialog.
from http://msdn.microsoft.com/en-us/library/ms645428(VS.85).aspx
The dialog box procedure should return TRUE to direct the system to set the keyboard focus to the control specified by wParam. Otherwise, it should return FALSE to prevent the system from setting the default keyboard focus.
Normally, what you would do is set the focus to whichever control you choose in WM_INITDIALOG and then return FALSE to prevent windows from changing the focus.
We have a VB6 application that uses a non-visible window (form) for DDE communication.
We have some clients reporting that occasionally they can see this window on their desktop.
I did a scan through the code for any visible = true or show's on the form in question, but nothing.
This about all we do with it:
Load frmDDELink
frmDDELink.stuff = stuff
We don't actually explicitly display (or explicitly not display it either).
What could cause a hidden window to be displayed on a user's desktop such that it is visible?
Try and set the location of the form to off-screen.
frmDDELink.ClientLeft = -100
frmDDELink.ClientTop = -100
A misbehaving app on the client's machine could do that. FindWindow() is a notoriously inaccurate API function. On top of that, all VB6 windows have the same class name. Thunder something, iirc. It might be finding your window instead of the one intended, making the wrong window visible.
I like Black Frog's simple hint to set the location off-screen, and nobugz's possible explanation. I would also suggest handling the Form_Activate event and setting the form invisible again.
Private Sub Form_Activate()
'Log something for debugging purposes?'
Me.Visible = False
End Sub
try to set the border into none, or me.visible = false, and set the property not to display in the task bar.