Jump to content

Programmatically create separate windows


Recommended Posts

Posted

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 .....

Posted

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>

  • Like 1
Posted

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

Posted

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.

Posted

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

Posted

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.

Posted

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.

Posted

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>

  • Like 1
Posted

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.

post-10325-126031971322_thumb.png

<userlib>:\FRSE Tools\AppControl\Tool - Get Parent.vi

Cheers

JG

Posted

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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.