11-02-2010 08:11 AM
hello,
please find this attachment. there you can find main. vi. run this main.vi then press the child vi button, one graph will be opened as a child window. you can move this vi on with in the main window.
my problem is when click on the child vi its little bit moving down direction. how to solve this...? this problem happend when i each click on the vi using mouse.
if the child vi not set as child window then this issue was not happend, only if i set as a child then its getting down with each mouse click on this vi.
11-02-2010 09:31 AM
I cannot run your code since you did not include the "positionFPonMouseDown" VI. As for the code itself:
11-02-2010 10:46 AM
hello,
sorry i forget to add one vi....this sub.vi set as a child window and main as a parent window using user32.dl
now try this, just check....
1. click on the child vi button
2. sub.vi will open
3. just click on the graph, now check when you do each click the sub.vi will move down below.
open the sub.vi, where you will find set parent and child.vi, make disable that using disable structure
4. run the main.vi
5. click the child vi button
6. subvi will open and click on the graph using mouse, when you do each click on the graph the vi will not move down below.
As per my task, I want to keep my main.vi as a parent and all subvi’s as a child.( Not as a subvi), also when I click on the graph the vi should not move down below.
On my project I am calling vi as dynamically only….this is for example vi which I sent you.
Help me..!
11-02-2010 11:57 PM
can you any one reply me...?
i am awaiting for your reply
11-03-2010 12:36 AM
My guess is that there are some pixels that are being determined in the position related to the borders of the VI. When the window has toolbars vs. when it doesn't. And possible the difference between Window bounds and the mouse position relative to panel coordinates.
Actually, your subVI is NOT being called dynamically. It is explicitly called by being an object on the block diagram. You may want to call it dynamically, and start the VI running and set the bounds of the Window before you show the front panel. Store the previous position in a shift register so you know where to set the bounds to.
You could possibly factor in the horizontal and vertical jump (I'm seeing 2 pixels to the right and 22 pixels down) in your new position calculations. But even doing that, I see a jump up and to the left on the first call of the subVI.
I'm sorry I don't have an exact answer for you. Searching the forums for terms like "windows bounds" "panel" "pane" and "origin" might turn up some threads with better explanations. I just think there is a discrepancy between the window location and the WinBounds property that is partly determined by the presence or absence of borders and toolbars when the subVI first starts running.
11-03-2010 03:25 AM
Hello Balaji,
Run and see this now once... Let me know if your issue is solved..
Regards,
Nitz
11-03-2010 03:37 AM
Hello Nitzy,
is it possible to send me in labview 8.6...? i could not open your vi's
11-03-2010 03:51 AM
this one is in 8.6..
11-03-2010 03:57 AM
i am very sorry, still its is also labview 2010 only... i cant able to open it
11-03-2010 05:32 AM
Hello Balaji,
In your positionFPonMouseDwon vi's block diagram, 'from mouse down event' you are using a comparison(=) to 1. Change that 1 to 0 or something else and see. I don't know whether this is the right solution or not but it worked when i tried it.
Regards,
Nitz