LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way to read the system DoubleClickTime double-click%3F

Hi,

 

I'm doing some customized actions on a tree if a user "slow-double-clicks" on a valid tag in the tree. My current solution works, but I would like to set the "limit" or interpretation of what constitutes a "slow" double-click based on the system DoubleClickTime setting of the system that the program is running on.. Anyone knows how to read this piece of information on a) windows system or b) any system?

 

Please note that due to what I'm trying to accomplish, I cannot use the "double-click" event to make this determination.  (Double-clicks are left alone to do whatever they would normally do.)

 

Microsoft MSDN on Double-clicks

 

--I guess a more general form of the question would be "how to read out windows system settings in LabVIEW".

 

For the specially interested, my program is an event driven queue machine. When I get a mouse up on the tree-control, I pass the ms timer to an action engine (get, set, re-set) which tracks delta time between two clicks and passes out an enum of "click type" (as defined by me) as either n/a, single, double, slow double.

 

In my queue handler loop, I take the click message (from event loop), do some basic checks (is tag of the tree coordinate location empty string?) and pass it all along to another state that determines what to do based on click type, parent(s) (or indent level) and column.  The need for this "slow-click" feature came about when I needed to let the user re-name a parent level tag-item.. If you double-click normally on a parent, it will expand or collapse its children list. . In some applications, (windows explorer for example), the default double-click action (open the file) can be "changed" to a "rename" function by clicking a little slower. Clicking too slow will be interpreted as a "single" click (e.g. select).

 

QFang
-------------
CLD LabVIEW 7.1 to 2016
0 Kudos
Message 1 of 6
(2,667 Views)

I can't say I ever looked specifically into this, but the answer is right there in the page you linked to:

 

Double click time.png

 

I'm not sure why that class is in the forms assembly, but I don't have a deep understanding of .NET. In any case, this is obviously Windows only, as this is OS dependant.

 

Incidentally, Windows explorer doesn't rename on a slow double click. It renames when you single click a selected item, so essentially the second click is treated as a completely new click.

 

 

 


___________________
Try to take over the world!
Message 2 of 6
(2,643 Views)

Hi tst,

 

How would you create that property node "from scratch"? 

 

I tried :

 

1) drop Connectivity --> .NET --> property node

2) right-click and select class --> .NET --> Browse but I don/'t have a System.Information in that list and there is no search function in that dialogue.

 

3) search LabVIEW help for SystemInformation 

4) Tried to get the snippet to work. 

  4.1) drag from/save as using Opera/Chrome browser to my computer to labview 2011/2012 (all failed, for something that was supposed to make code sharing simple, snippets sure are hard)

  4.2) drag-drop directly from IE (shudders as I open IE10) --> can't drag drop to block diagram. get the "stop" sign.

  4.3) save-as from IE --> also fails (drops as a png image on block diagram of 2011 and 2012) 

 

 

(I have never successfully opened a snippet to the point I typically just ignore them entierely).

 

 

QFang
-------------
CLD LabVIEW 7.1 to 2016
0 Kudos
Message 3 of 6
(2,632 Views)

How about now?

Example_VI.png

The clue is in tst's post above, its under .net, windows.forms http://msdn.microsoft.com/en-us/library/system.windows.forms.systeminformation.doubleclicktime.aspx


CLA CTAChampionI'm attending the GLA Summit!
Subscribe to the Test Automation user group: UK Test Automation Group
Message 4 of 6
(2,621 Views)

Your 4.3 step should have worked. I know that non-IE browsers don't allow direct snippet imports because they didn't handle drag and drop of content the same way IE did and you have to save the image to disk and drag it from there. It's possible that IE 10 also changed this, so that now you have to do the same there.

 

I didn't test this specific snippet, but I did notice that the CCT threw an error relating to finding the assembly at some point (I think it was when I closed the CCT, but I didn't have time to check it), so it's possible that the snippet was corrupted.

 

Anyway, as pointed out, the class is in the System.Windows.Forms assembly, so you have to select that assembly first from the list (or navigate to it manually if it's not in the list for some reason. I think they're usually under %windir%\assembly).


___________________
Try to take over the world!
Message 5 of 6
(2,605 Views)

Actually I can drop .aCe.'s snippet from Opera directly to the block diagram, but not the one you posted, so it probably is corrupted.

 

At any rate, I feel that between the two of you, all questions and un-clarities have been un-un-clarified, thank you both for your help!!

 

 

QFang
-------------
CLD LabVIEW 7.1 to 2016
0 Kudos
Message 6 of 6
(2,598 Views)