From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to forbid window title bar to be draged?

If a top level vi has the window title bar,how to forbid user to drag the title bar to change window's position?
P.S. vi's property "Allow user to resize window" has been forbidden.
LabVIEW 8.6
0 Kudos
Message 1 of 13
(4,060 Views)
Hi qiubin,

you can pin the window by (constantly) writing to the window bounds property.
Or you can catch all mouse down/ mouse move events to cancel them out when the user wants to drag the window...
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 13
(4,052 Views)
hi there
 
the mouse up/down events only work for the front panel area, but not for the window (title and frame). so i would write the windows origin constantly to a property node every some 10ms like GerdW suggested.
Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
0 Kudos
Message 3 of 13
(4,045 Views)
Unfortunately, the LabVIEW event structure does not provide an event like "Panel Move" or a similiar stuff.
I think, you have two different options:
a) Either use the event structure -> timeout case to set (if necessary) every Xms with the invoke method "Front Panel.Runtime Position.Custom" the position of the VI.
b) Probably you find an appropriate function in the attached zip file

Thanks,
ThSa
0 Kudos
Message 4 of 13
(4,042 Views)

Why not just hide the title bar then the usre can not move the window (except from the task bar but you can hide this too).  I write many industrial apps where I have no title bar size the windon to full screen and hide the task bar.  I also filer the keqboard commands and make the window modal.  This will appear to be an embedded application with little options to get back to the window environment once started.

 

Paul

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 5 of 13
(4,031 Views)
You can also kill the explorer.exe process. It's a bit of a hack, but it removes the task bar, and desktop.


Regards,


Wiebe.
0 Kudos
Message 6 of 13
(4,010 Views)
users who know how to do that can restat the explorer and the taskbar with the task manager ("CTL + ALT + DEL") and then Menu option "new task" -> "explorer.exe".
Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
0 Kudos
Message 7 of 13
(4,006 Views)
That's true.
0 Kudos
Message 8 of 13
(3,975 Views)
You can try to do this with the Windows API by deleting the "Move" menu item from the window's System menu. See attached (LabVIEW 8.20).
Message 9 of 13
(3,960 Views)

How to revert the action with the dll ? I found the InsertMenu option with some tries but without success ...

0 Kudos
Message 10 of 13
(3,216 Views)