menghuihantang Posted December 7, 2009 Report Share Posted December 7, 2009 Can a VI create a new window programmatically, a new window which can float around anywhere? I am trying to finish a little program which can post a note on the monitor, an easy way to record some ideas. Each note is in a separate new window, and can be updated or deleted. (Yes, the program is available for free download somewhere online, but I wish to have a LV version). Maybe this is not a User Interface problem. It's more like a OOP, treating each note an object of the Class NOTE, and ..... Quote Link to comment
Norm Kirchner Posted December 7, 2009 Report Share Posted December 7, 2009 An easy way to accomplish this is through VI server and the usage of Re-entrant Front Panels or the use of *.vit 's First step is to make a VI that will be cloned over and over for each new note. Flag the open with option 0x08 and it will open a new VI with each call. <object width="1020" height="628"> <param name="movie" value="http://content.screencast.com/users/NJKirchner/folders/Jing/media/5fc68419-458d-495e-a4fe-582888c1dcf6/jingh264player.swf"></param>'>http://content.screencast.com/users/NJKirchner/folders/Jing/media/5fc68419-458d-495e-a4fe-582888c1dcf6/jingh264player.swf"></param> <param name="quality" value="high"></param> <param name="bgcolor" value="#FFFFFF"></param> <param name="flashVars" value="thumb=http://content.screencast.com/users/NJKirchner/folders/Jing/media/5fc68419-458d-495e-a4fe-582888c1dcf6/FirstFrame.jpg&containerwidth=1020&containerheight=628&content=http://content.screencast.com/users/NJKirchner/folders/Jing/media/5fc68419-458d-495e-a4fe-582888c1dcf6/2009-12-07_1054.mp4"></param> <param name="allowFullScreen" value="true"></param> <param name="scale" value="showall"></param> <param name="allowScriptAccess" value="always"></param> <param name="base" value="http://content.screencast.com/users/NJKirchner/folders/Jing/media/5fc68419-458d-495e-a4fe-582888c1dcf6/"></param>'>http://content.screencast.com/users/NJKirchner/folders/Jing/media/5fc68419-458d-495e-a4fe-582888c1dcf6/"></param> <embed src="http://content.screencast.com/users/NJKirchner/folders/Jing/media/5fc68419-458d-495e-a4fe-582888c1dcf6/jingh264player.swf" quality="high" bgcolor="#FFFFFF" width="1020" height="628" type="application/x-shockwave-flash" allowScriptAccess="always" flashVars="thumb=http://content.screencast.com/users/NJKirchner/folders/Jing/media/5fc68419-458d-495e-a4fe-582888c1dcf6/FirstFrame.jpg&containerwidth=1020&containerheight=628&content=http://content.screencast.com/users/NJKirchner/folders/Jing/media/5fc68419-458d-495e-a4fe-582888c1dcf6/2009-12-07_1054.mp4" allowFullScreen="true" base="http://content.screencast.com/users/NJKirchner/folders/Jing/media/5fc68419-458d-495e-a4fe-582888c1dcf6/" scale="showall"></embed> </object> 1 Quote Link to comment
menghuihantang Posted December 7, 2009 Author Report Share Posted December 7, 2009 You even made a video to demonstrate. Thanks so much. That helps totally. BY the way, is that clock running in LV too? Can you share the code? Quote Link to comment
asbo Posted December 7, 2009 Report Share Posted December 7, 2009 BY the way, is that clock running in LV too? Can you share the code? That looks a lot like the Vista/W7 clock widget ... Quote Link to comment
Norm Kirchner Posted December 7, 2009 Report Share Posted December 7, 2009 You even made a video to demonstrate. Thanks so much. That helps totally. BY the way, is that clock running in LV too? Can you share the code? Now that is flattery....no that was a google widget that I've been trying to make my stuff look like Quote Link to comment
menghuihantang Posted December 7, 2009 Author Report Share Posted December 7, 2009 Now that is flattery....no that was a google widget that I've been trying to make my stuff look like me too. I always want to make a clock-interface. Can you share the code when you finish? I don't know how to make the needles do a circular motion, unless the controls on the front panel have a angle property to modify. But they don't. Quote Link to comment
Norm Kirchner Posted December 7, 2009 Report Share Posted December 7, 2009 I think you misunderstood. The clock is not something that I have created. It is a google gadget. But if you look at LabVIEW Speak you will see that I mimic this click/drag ability combined with right click menus and notify icons (System Tray Icons) Quote Link to comment
Ryan Podsim Posted December 7, 2009 Report Share Posted December 7, 2009 I don't know how to make the needles do a circular motion, unless the controls on the front panel have a angle property to modify. But they don't. The needle part is actually fairly easy. Use a "Gauge" control and set all but the needle color to be Transparent. Here is an example I did up real quick. I used 3 gauges one for the minute hand, one for the hour hand and one for the numbers. Once running right the clock face and select Exit to stop. Ryan Clock.zip Quote Link to comment
menghuihantang Posted December 8, 2009 Author Report Share Posted December 8, 2009 An easy way to accomplish this is through VI server and the usage of Re-entrant Front Panels or the use of *.vit 's First step is to make a VI that will be cloned over and over for each new note. Flag the open with option 0x08 and it will open a new VI with each call. <object width="1020" height="628"> <param name="movie" value="http://content.screencast.com/users/NJKirchner/folders/Jing/media/5fc68419-458d-495e-a4fe-582888c1dcf6/jingh264player.swf"></param>'>http://content.screencast.com/users/NJKirchner/folders/Jing/media/5fc68419-458d-495e-a4fe-582888c1dcf6/jingh264player.swf"></param> <param name="quality" value="high"></param> <param name="bgcolor" value="#FFFFFF"></param> <param name="flashVars" value="thumb=http://content.screencast.com/users/NJKirchner/folders/Jing/media/5fc68419-458d-495e-a4fe-582888c1dcf6/FirstFrame.jpg&containerwidth=1020&containerheight=628&content=http://content.screencast.com/users/NJKirchner/folders/Jing/media/5fc68419-458d-495e-a4fe-582888c1dcf6/2009-12-07_1054.mp4"></param> <param name="allowFullScreen" value="true"></param> <param name="scale" value="showall"></param> <param name="allowScriptAccess" value="always"></param> <param name="base" value="http://content.screencast.com/users/NJKirchner/folders/Jing/media/5fc68419-458d-495e-a4fe-582888c1dcf6/"></param>'>http://content.screencast.com/users/NJKirchner/folders/Jing/media/5fc68419-458d-495e-a4fe-582888c1dcf6/"></param> <embed src="http://content.screencast.com/users/NJKirchner/folders/Jing/media/5fc68419-458d-495e-a4fe-582888c1dcf6/jingh264player.swf" quality="high" bgcolor="#FFFFFF" width="1020" height="628" type="application/x-shockwave-flash" allowScriptAccess="always" flashVars="thumb=http://content.screencast.com/users/NJKirchner/folders/Jing/media/5fc68419-458d-495e-a4fe-582888c1dcf6/FirstFrame.jpg&containerwidth=1020&containerheight=628&content=http://content.screencast.com/users/NJKirchner/folders/Jing/media/5fc68419-458d-495e-a4fe-582888c1dcf6/2009-12-07_1054.mp4" allowFullScreen="true" base="http://content.screencast.com/users/NJKirchner/folders/Jing/media/5fc68419-458d-495e-a4fe-582888c1dcf6/" scale="showall"></embed> </object> Sorry, but can you explain a little bit how you made the note.vi movable? It seems like something about register user event, but I cannot figure out how to implement it. Thanks again. Quote Link to comment
Yair Posted December 8, 2009 Report Share Posted December 8, 2009 If you want a clock written in LV which creates a round semi-transparent window, you can find an example here. Read the posts before and after it for more details. Quote Link to comment
Norm Kirchner Posted December 9, 2009 Report Share Posted December 9, 2009 Sorry, but can you explain a little bit how you made the note.vi movable? It seems like something about register user event, but I cannot figure out how to implement it. Thanks again. This should help DraggableFP.zip <object width="786" height="600"> <param name="movie" value="http://content.screencast.com/users/NJKirchner/folders/Jing/media/e383f68c-f6e5-4966-a51b-45a46b0d8724/jingh264player.swf"></param>'>http://content.screencast.com/users/NJKirchner/folders/Jing/media/e383f68c-f6e5-4966-a51b-45a46b0d8724/jingh264player.swf"></param> <param name="quality" value="high"></param> <param name="bgcolor" value="#FFFFFF"></param> <param name="flashVars" value="thumb=http://content.screencast.com/users/NJKirchner/folders/Jing/media/e383f68c-f6e5-4966-a51b-45a46b0d8724/FirstFrame.jpg&containerwidth=786&containerheight=600&content=http://content.screencast.com/users/NJKirchner/folders/Jing/media/e383f68c-f6e5-4966-a51b-45a46b0d8724/2009-12-08_1805.mp4"></param> <param name="allowFullScreen" value="true"></param> <param name="scale" value="showall"></param> <param name="allowScriptAccess" value="always"></param> <param name="base" value="http://content.screencast.com/users/NJKirchner/folders/Jing/media/e383f68c-f6e5-4966-a51b-45a46b0d8724/"></param>'>http://content.screencast.com/users/NJKirchner/folders/Jing/media/e383f68c-f6e5-4966-a51b-45a46b0d8724/"></param> <embed src="http://content.screencast.com/users/NJKirchner/folders/Jing/media/e383f68c-f6e5-4966-a51b-45a46b0d8724/jingh264player.swf" quality="high" bgcolor="#FFFFFF" width="786" height="600" type="application/x-shockwave-flash" allowScriptAccess="always" flashVars="thumb=http://content.screencast.com/users/NJKirchner/folders/Jing/media/e383f68c-f6e5-4966-a51b-45a46b0d8724/FirstFrame.jpg&containerwidth=786&containerheight=600&content=http://content.screencast.com/users/NJKirchner/folders/Jing/media/e383f68c-f6e5-4966-a51b-45a46b0d8724/2009-12-08_1805.mp4" allowFullScreen="true" base="http://content.screencast.com/users/NJKirchner/folders/Jing/media/e383f68c-f6e5-4966-a51b-45a46b0d8724/" scale="showall"></embed> </object> 1 Quote Link to comment
jgcode Posted December 9, 2009 Report Share Posted December 9, 2009 Hi Norm I know there is one in OpenG but your get parent ref is missing from the dist in case you meant to include it. <userlib>:\FRSE Tools\AppControl\Tool - Get Parent.vi Cheers JG Quote Link to comment
Norm Kirchner Posted December 9, 2009 Report Share Posted December 9, 2009 Hi Norm I know there is one in OpenG but your get parent ref is missing from the dist in case you meant to include it. <userlib>:\FRSE Tools\AppControl\Tool - Get Parent.vi Cheers JG Ooops, Thanks Tool - Get Parent.vi Quote Link to comment
jgcode Posted December 9, 2009 Report Share Posted December 9, 2009 Ooops, Thanks Tool - Get Parent.vi No probs, If forgot to say awesome effect too! Quote Link to comment
Ryan Podsim Posted December 9, 2009 Report Share Posted December 9, 2009 I'm a bit curious. Why did you use the timeout event with a timeout of 10 ms timeout instead of the mouse move event? I'm merely curious. I want to learn from the masters. Quote Link to comment
Norm Kirchner Posted December 9, 2009 Report Share Posted December 9, 2009 I'm a bit curious. Why did you use the timeout event with a timeout of 10 ms timeout instead of the mouse move event? I'm merely curious. I want to learn from the masters. Good question my friend. And it is for this reason, it doesn't work as well because if the person moves the mouse faster than LV can move the panel then everything gets out of whack and you lose the drag. I started by doing it that way. I actually don't like having to revert to polling but it was the only way to get consistent, repeatable and responsive interaction. On a very fast PC w/ nothing going on I would imagine that you 'might' not notice it. But if you were to change the algorithm and move the mouse quickly, you'll find that you lose the drag w/ out much effort. 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.