LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

why font dialog window popups when running this vi?

Solved!
Go to solution

1) Press and hold ctrl+R keys.

2) In few seconds, the font dialog window popups immediately.

 

Why this happens? Is this a bug?

 

Am using LabVIEW 8.5 and Windows XP SP2

0 Kudos
Message 1 of 7
(2,480 Views)
The font dialog window doesn't appear on my WXP SP2 running LV8.6... but it does with LV8.5.1.
Message Edité par JB le 10-28-2008 12:30 PM
0 Kudos
Message 2 of 7
(2,474 Views)
Message Edited by mathan on 10-28-2008 06:31 AM
0 Kudos
Message 3 of 7
(2,468 Views)

Could somebody please explain me the highlighted portion of the attached image? I don't know how to set it?

Message Edited by mathan on 10-28-2008 06:34 AM
Message 4 of 7
(2,461 Views)
Solution
Accepted by topic author Mathan

Hi,

 

You have called this dialog yourself from your code 😉

You have sent 0x30 Virtual Key code directly to keyboard via keybd_event function from user32.dll.

So, now you run your VI with Ctrl+R. So, control is pressed, then keybd_event call coming (with 0x30, which is actually key code for 0), so, now you have shortcut Ctrl+0, which is font dialog. No magic and no bug. On my PC its sometimes appeared, sometimes not (race condition between events from keyboard and keybd_event call).

 

best regards,

Andrey.

 

Message 5 of 7
(2,458 Views)
Kudos for you andrey. But why JB can't able to reproduce this in LabVIEW 8.6?
0 Kudos
Message 6 of 7
(2,455 Views)

Because this "trouble" depends from timing. When Ctrl+R keys pressed, then this key combination will be entered into Windows messaging queue. Now your call for keybd_event coming. This call should be entered also in the queue, and then Ctrl+0 combination will be simulated or not depends from the interference keybd_event call with windows keyboard queue.

I am able to reproduce this behaviour only when Ctrl+R pressed AND block diagram is active. Then Diagram Font Dialog appeared.

 

 

Andrey.

 

Message 7 of 7
(2,450 Views)