No.1 Posted March 21, 2008 Report Share Posted March 21, 2008 Hello, everyone, I want my user interface window to be maximum, and also want to disable the restore button when I open the vi. I do that as the attached file.Download File:post-11095-1205976114.bmp but the result is that the window can also be moved by draging the title bar, and also response once when double click the title bar, and then don't response to that any more. What can I do to realize the function in Labview 7.1? Thank you. Quote Link to comment
Jon Sweeney Posted March 21, 2008 Report Share Posted March 21, 2008 QUOTE (No.1 @ Mar 19 2008, 08:25 PM) Hello, everyone,I want my user interface window to be maximum, and also want to disable the restore button when I open the vi. I do that as the attached file.http://lavag.org/old_files/post-11095-1205976114.bmp'>Download File:post-11095-1205976114.bmp but the result is that the window can also be moved by draging the title bar, and also response once when double click the title bar, and then don't response to that any more. What can I do to realize the function in Labview 7.1? Thank you. Although it may not be desirable to you, one way is to hide the title bar, either by setting the "Title Bar Visible" property to false, or by unchecking "Window has title bar" in the VI properties. Quote Link to comment
No.1 Posted March 22, 2008 Author Report Share Posted March 22, 2008 QUOTE (Jon Sweeney @ Mar 20 2008, 11:22 PM) Although it may not be desirable to you, one way is to hide the title bar, either by setting the "Title Bar Visible" property to false, or by unchecking "Window has title bar" in the VI properties. But I want to show the title bar. Maybe I can do that by the Windows API? Quote Link to comment
Justin Goeres Posted March 22, 2008 Report Share Posted March 22, 2008 QUOTE (No.1 @ Mar 20 2008, 04:49 PM) But I want to show the title bar.Maybe I can do that by the Windows API? I don't know of a way to do what you're talking about natively through LabVIEW, but you might be able to find some Windows API calls to help you. EDIT: On second thought, is this more what you're looking for? http://lavag.org/old_files/monthly_03_2008/post-2992-1206071081.png' target="_blank"> (that's an Invoke Node on the left, instead of a Property Node. I'm not sure that method exists in LV7.1, though...) Quote Link to comment
Rolf Kalbermatter Posted March 22, 2008 Report Share Posted March 22, 2008 QUOTE (No.1 @ Mar 20 2008, 08:49 PM) But I want to show the title bar.Maybe I can do that by the Windows API? That is not likely possible without intercepting the window message handling function itself. In Windows a window with title bar is in principle always movable. A change in that would require a custom windows message handling function that intercepts the move messages and refuses to operate on them. Doing that in LabVIEW is quite low level programming and not really possible without an extra DLL that hooks the LabVIEW window message handling function and would intercept the appropriate messages before passing control back to the original LabVIEW window message handling function. All in all a lot of work and complexity to deal with and I would put every possible effort to avoid having to do that in your place. Rolf Kalbermatter Quote Link to comment
TobyD Posted March 22, 2008 Report Share Posted March 22, 2008 QUOTE (No.1 @ Mar 19 2008, 06:25 PM) Hello, everyone,I want my user interface window to be maximum, and also want to disable the restore button when I open the vi. I do that as the attached file.Download File:post-11095-1205976114.bmp but the result is that the window can also be moved by draging the title bar, and also response once when double click the title bar, and then don't response to that any more. This works in almost every case. Unfortunately you are still able to double click the title bar one time. I think this is a bug. If resizable is set to False then this should not happen. The functionality is sucessfully blocked once the window is small - you are not able to double click again to maximize. QUOTE (rolfk @ Mar 21 2008, 04:01 AM) In Windows a window with title bar is in principle always movable. If a window is maximized it should not be movable by dragging the title bar. Quote Link to comment
Rolf Kalbermatter Posted March 22, 2008 Report Share Posted March 22, 2008 QUOTE (TobyD @ Mar 21 2008, 11:06 AM) If a window is maximized it should not be movable by dragging the title bar. And it isn't in LabVIEW either until you make it not maximized. But maximized or not is not the same as resizable or not. And movable is an implicit attribute of non-maximized overlapped windows with title bar unless you customize the windows message handler. Rolf Kalbermatter Quote Link to comment
TobyD Posted March 22, 2008 Report Share Posted March 22, 2008 QUOTE (rolfk @ Mar 21 2008, 10:55 AM) maximized or not is not the same as resizable or not. And movable is an implicit attribute of non-maximized overlapped windows with title bar unless you customize the windows message handler.Rolf Kalbermatter I completely agree. My only point was that a window with a title bar is not "always movable". When the window is maximized it is not movable, so if there were a way to keep the window maximized the problem would be solved. Toby Quote Link to comment
Jon Sweeney Posted March 22, 2008 Report Share Posted March 22, 2008 QUOTE If a window is maximized it should not be movable by dragging the title bar. QUOTE ( @ Mar 21 2008, 12:55 PM) And it isn't in LabVIEW either until you make it not maximized. That's what I thought too, until No.1 posted his problem. I converted his .bmp file to LV code (using v8.2, PC) and found that as long as the Resizable property is set to False, the maximized window can be moved**. It doesn't really even appear to be maximized because the thin border is still displayed all around, and when the program is stopped, the title bar symbol (whatever it is called) indicates not-maximized. This appears to be more of a "FP.SizeToScreen" mode as in v6. When Resizable is set to True, maximize works as expected**. **except sometimes the first time it is run after changing Resizeable from T to F or from F to T! Download File:post-133-1206136701.vi Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.