marquee selection in the drawing image control

I would like a vi that draw a marquee selection with the mouse in a control program image.

This works so far if the user begins to drag inside the image control. The code is actually robust against

start the image and entering again. Unfortunately this isn't the case if someone starts to slip outside

peak control. then drags succeeding is arrested after the mouse moving a few pixels (about 1 to 10) and the

rect selection gets fixed.

No idea what could be wrong with the vi? Thank you!

Your problem is with the fact that you have a structure of the event inside the other. This is generally a no-no and should be mentioned in the help (there is a warnings section).

Specifically, the structure is part to begin to get events when the VI goes into run mode. This means that from then on, the internal structure will start enqueueing mouse all events on the image, so that when you start outside and go inside, structure remembers this event, but won't have to deal with until he actually runs. When she is not running (because there was a supported external mouse event), it will load the mouse previous event immediately.

The basic solution is to use a unique event structure. You can use a cluster and a registry change to keep state data and don't forget what state you're in, if you need a timeout, etc., so that you know how to respond to each event.

Tags: NI Software

Similar Questions

  • Set the image of the 2d image control

    I do a few installers of pallet for ease of distribution for some libraries that I wrote. I'm following the example of screw (search finder example "palette API").

    I feel a certain sense of frustration by defining the new icon from the palette; the constant of the icon is a 2d image control, but I can't find a way to put my picture in there, and I can't put it programmatically as the image 2d screw control let me just draw shapes in there.

    Oh for a constant of comics, a little unusual, but just for the heck of it.

    (1) unpack attachment and save to disk.

    (2) If you use open LV10 photo Constant_Tree.vi or mass compile directory.

    (3) drag the file image Constant.xnode your DB.

    (4) drag a PNG/JPG/BMP file to the constant and take advantage of the results

    (5) right-click to "Flatten" to a constant of the normal image if you want to use the VI on a machine without this XNode.

    (6) If you wish, add photo Constant.xnode to your Palette, be sure to select all the files so that the .xnode files are visible when you add a VI.

    Yet, you don't want your users to be mucking with the cover and not the block diagram?

  • How to run the attached image control

    How to run vi in archive zip attached for image control.

    Communicate it always the entry is not valid.

    Thank you.

    For me, it works without worries. Furthermore, here the 3D image has been used.

    Indeed beautiful VI...

    Andrey.

  • How can I determine the position of the mouse in a 2D image control

    I have an app where I would like the user to be able to interact with objects in a 2D image control with the mouse.  To do this, I need to translate between the screen coordinates, which are transmitted with the events of mouse and in the control of 2D image.

    The problem that I am running is that I can't find a way to determine the screen coordinates of the top left corner of the drawing/client of the 2D image control area.  I tried to use the 'Position' of the image control property, but this results in a mismatch because of the difference between the upper-left corner of the image control (including the label, etc.) and the upper left corner of the drawing area.  See attached VI.

    Does anyone know how to get the coordinate of the screen from the corner of the drawing of the control of the photo area?

    Mark Moss

    I tend to use the mouse in the image control property to get the position.  Deals with things like the passage of origin for you.

  • 3D image control does not display the full image.

    I'm having a problem with the control of 3D image not showing my entire 3D model.

    At first, I thought it was 'FOG', but when I put the SceneObject Fog.Function to 'No. Fog' he has no effect.

    I tried several settings, but I can't seem to find anything that affects what I'm looking for.

    I included some photos to show what it is I'm looking for.

    If I Zoom in control of the 3D image, I see more of the image in the background.

    I don't know if this is a limitation of the 3D image control or a setting I can change.

    It seems to be your plan of demarcation.

    I forgot how to set it up, but there is a property somewhere node that defines a cup for youi view plan implemented.  There might be a function of the camera, I'm not quite sure...

    EDIT: Found, is as follows:

    Note  To prevent objects 3D appear deformed, avoid the scaling of items not in the plans of delimitation. Near demarcation plan, which defines the nearest plan of the Viewer, the default value is 0 units. The extreme demarcation plan, which defines the demarcation plan further from the Viewer, the default value is 10000 units. You can use the Projectionerspective method to set the values for the plans of delimitation by program

  • two questions about the scattered images secure

    I created an image that is secure and encrypted for sensitive documents.

    I have two questions:

    1. when I use the disk (if it is up, open and available), and I want to add something to it, I usually drag the file everywhere where it is currently in its destination folder in the sparse image control.  But it automatically makes a copy - with the same name (not with a '-1' ever, not with a suffix 'copying' or 'alias').  Which defeats the purpose and makes things complicated - I find myself comparing what is in each location to make sure it's in the sparse image and then it makes me nervous to delete the original.  Why it does this and how can I change such as dragging a file in a secure location gives there is not that a second copy of it left in an UNsecure location?

    2. I'm using Time Machine backup drive sitting on my desk (and a separate utility for monthly clones on a different backup disk).  Automatically makes Time Machine backup the content of the rare picture even if the safe drive is not mounted, open and available?  I hope not, because that would undermine the usefulness of having a backup disk on my desktop running of ordinary Time Machine backups, but find it me just that all the steps I take of course I do not lose any data may be so overprotective I have thought/hoped.

    Sous_forme_d' addendum, I'll check my clone, but as I put this out there, I wonder if SuperDuper!, my application of cloning is cloning automatically secure disk content, so... like the thoughts of anyone about it if it's an application that they use).

    FYI: I'm running 10.11.2

    Thank you.

    (1) by default, OS X makes a copy with the overcoming of the limits of volume and moves when in the same volume.

    You can reverse this behavior by holding down the command key when you drop. You will see the insignia of the icon changes (green + for copy, empty for move).

    (2) Time Machine will return to the top of the image 'file', but only when it is unmounted. I do not think that it automatically includes the volume mounted, but I would like to check and add to the exclusion list.

  • Get the width/height of the current image / information of KING of user input

    Hello

    I have two problems:

    First of all:

    Y at - it an option to get the width and height of the image to use for calculations or set a return on investment for the right settings?

    Second (more complicated):

    I have used Labview 8.5 custom interface (see the interface.jpg attachment).

    I am trying to get the return on investment of the Interface and use it in my app Builder of Vision, but I don't see the return on investment or its size or position or something...

    Is it possible to get this information from the Interface?

    Information:

    I use Vision Builder 2009 SP1, LabVIEW 8.5

    Thanks for your replies!

    Hello

    I missed that when I tested it... the display image control must have been larger than the size of the image and the property node returned the value that I expected.

    A restriction of the VI to Interface custom that you create in LabVIEW, is that it cannot have any dependencies (call any subgroup screws), other than the methods and the nodes property of the objects you put on. Therefore, I can't just call IMAQ GetImageSize her. So it does not seem possible at this point for the VI of custom Interface return the size of the image.

    The solution, at this stage, to get the size of the image of the Interior Vision Builder AI, is to use a step in LabVIEW Run, calling a simple VI that takes an image as input, called IMAQ GetImageSize and return res X and Y.

    Note that for purposes of distribution, when you call a VI using a LabVIEW execution step, you must save it as a source distribution in a Bachelor's degree in LAW and you must redistribute this llb with your inspection. See using setup step run LabVIEW for more details.

    Sorry there is no better way to do this now.

    Best regards

    Christophe

  • DisplayImageFile() does not change the dimensions of the image control

    Hello

    I put in an image with DisplayImageFile() control image + assigning to the attribute of control ATTR_FIT_MODE = VAL_SIZE_TO_IMAGE. The image size is larger, then the size of the control and I want the control to resize to the size of the image.

    It works fine except when I ask the dimensions of the control with GetCtrlAttribute (panel, control, ATTR_HEIGHT, & height), I get the original size (before calling DisplayImageFile())...

    It seems I missed something basic...

    Environment: LAB Windows CVI 2012, Windows 7

    Thanks in advance

    Ramy

    I don't know if you still experience this problem or not, but I came across this discussion now and wanted to point out that this could happen if your picture controls if it is covered by another control or is it hidden altogether (and there might be other similar situations that I can't think of right now).

    When this happens, the CVI runtime can pull the image directly on the image. Instead, he plans an asynchronous action that will redraw this section of the Panel from the back to the front (if it's just overlapped, not hidden). It is only in the later action that the image is applied to the control, and it is only then that the control is resized to fit the image. This may seem immediate to the casual observer, but, because it is asynchronous, you can't try to get new size immediately after calling DisplayImageFile, because the image is not yet in control at that moment.

    Ironically, this occurs only if the control has already been set to the image size at the time you call DisplayImageFile. If this isn't the case, then the new size is applied when you later change the mode made programmatically. Whereas if the adjustment mode has been already updated the image size, trying to programmatically set the same value of the image size has no effect and nothing happens then.

    If this is what is happening, one way around this would be to call ProcessDrawEvents or ProcessSystemEvents immediately after the call to DisplayImageFile. Unless the control or Panel has been hidden way explicit, which will require the drawing action will take place at this time, and you should then be able to get the new size of control at any time after that.

    Luis

  • Missing screws in the 3D 2010 image control?

    Hey everybody,

    I tried to follow this guide to the developer for visualization of Labviews functions:

    http://zone.NI.com/DevZone/CDA/tut/p/ID/7664

    I discovered that many screws shown here for 3D picture control are not available for (free) module in Labview 2010, even with the control and simulation tool. What is the case for other users?

    Examples of 3D picture control screws that I can't find in Labview 2010 block diagram functions are:

    'building of toroid.vi '.

    'create model.vi '.

    'Add a material.vi '.

    'Create transform.vi '.

    'Add a model.vi '.

    'create camera.vi '.

    «camera look at.vi»

    'create positional light.vi '.

    "make scene.vi".

    "to scene.vi".

    However, I can find the following screw:

    Geometry menu

    'create cone.vi '.

    'create cylinder.vi '.

    'create box.vi '.

    'create the height field.vi '.

    'create mesh.vi '.

    'create sphere.vi '.

    'create text.vi '.

    Object Menu

    'create object.vi '.

    'find the object.vi '.

    Transformations menu

    "to rotation.vi".

    "set rotation.vi".

    "rotation object.vi.

    "to scale.vi".

    "set scale.vi".

    "Object.vi scale".

    "to translation.vi".

    "set translation.vi".

    "translate object.vi.

    'clear the transformation.vi '.

    Menu of aid

    "color change.vi".

    "configuration window.vi".

    'create a clip plane.vi '.

    'texture.vi '.

    "new light.vi".

    "sensor mapping.vi.

    File loading menu

    «load ASE geometry.vi»

    'load the file.vi vrml ".

    "load STL geometry.vi".

    So my question is why can't I access the first list of the screws in 2010, are hidden with screws again features somehow? Or am I missing a library or where these functions abandoned for the 2010 version? If they have been abandoned, is it possible to build a scene and drawing from scratch in the 2010 version?

    Thank you very much!

    Hello

    Control of the 3D image is natively available for LabVIEW 2010. The question that you are running is because you try to open a VI that uses the first NOR-Labs 3D Picture Control, which was replaced by the native 3D image control. These functions are "obsolete" and manually replace your code with new API of navigation. You can also try using the old Toolbox, but keep in mind that this is not supported:

    http://zone.NI.com/DevZone/CDA/tut/p/ID/4411

    Examples of the new API is located in:

    C:\Program NIUninstaller Instruments\LabVIEW 2010\examples\picture\3D Picture Control

    and you should be able to find most of the VI need to change your old Toolbox to the new.

    I hope this helps...

  • How can I programmatically draw new circles on an image control

    Hi, I'm fairly new LV and programming in general. I'm creating a program to get better. In this program, I have balls bouncing around on an image control. I use a table to keep track of the ball position (x, y) and the other to follow their speed. I want that whenever a ball reaches the border of the image, it splits into 2 balls. My problem is that I can't find a way to programmatically add these new balls for each draw circle screw must be serialy connected and then drawn on the image. What Miss me?

    You need to iterate over your table of bullets.  This means that the use of automatic indexation.  Now, you have no reason of wire with a value of N in the loop For.  And wiring of this value to the array Index function gives you invalid data it's either nothing, or the ball even if it exists in the table.

    I cleaned up a few other things in your code.

    1 cancel the function.  No need to multiply by-1.

    An array of Index 2.  It is expandable.  Drag the bottom border down.

    Your next bit of code to add would be where you decide to add another ball and put it in the Position and speed tables.

  • Why when I backup after selection keep only last system only the old image image is maintained?

    Why when I backup after selection keep only last system only the old image image is maintained?

    Hello

    ·         What operating system is installed on the computer?

    ·         The computer is connected to the domain network?

    If you are using Windows 7 then you can try the steps mentioned below and check to see if they help.

    When you schedule a backup on your computer, all the backup files would be automatically and replaces the old backup data.

    You can follow these steps below to remove the system image backup.

    1. open the control panel (all items view).
    2. click on the backup and restore icon.
    3. as the backup, click on the link manage space.
    4. to select a backup location-
    NOTE: This is for which the backup of files the user is located in. If the backup location is already displayed, go to step 5.
    (A) under the backup location, click Browse.
    (B) go to the backup location and select it.
    (C) continue to step 5.
    5. under backup of user files, click View backups button.
    6. Select the period of backup that you want to remove, and then click Remove.

    See also:

    Learn more about the system image backup

    http://blogs.technet.com/b/filecab/archive/2009/10/31/learn-more-about-system-image-backup.aspx

    Should what backup settings I use to maximize my disk space?

    http://Windows.Microsoft.com/en-us/Windows7/what-backup-settings-should-I-use-to-maximize-my-disk-space

  • How could I possibly remove the default image in the image control?

    I use the image control and a bit of code to create a zoom on a picture effect. Everything works fine however I get a picture of labview when the Vi is loaded for the first time. I'm trying to get a blank area instead cause it looks like not really tidy!

    I have attached a picture and my code.

    Thanks for your help

    The image is configured to be the default value of "Photo". In other words: you must get rid of the default value. You can do this either by:

    (a) 'Image' of delete and recreate. Disadvantage: You have to re-create all the nodes property associated with this control.

    (b) load an image empty and select "data operations > use current default value.

    hope this helps,

    Norbert

  • change the border color of an image control

    Hi all

    I shows 30 photos on the façade by using an image control. I want the user to select 12 peaks of 30 photos.

    is there an interactive way to show what image has been selected. I thought that it would be OK to change the color of the border of the control.

    I would like to know how to change the border color of th and you are really welcome if you have a better way to say what peak has been selected.

    Thank you

    Ritesh

    Hi Ritesh,

    in my LV7.1 installation I could change bordercolor using the tool to color in development mode, but I couldn't find a property to change the colors by programming...

    So my advice would be to put a little bigger Boolean flags (or color boxes) behind the indicators of the photo. When the image is clicked/selected just change you the color of the underlying Boolean value. In this way imitate you the colorchanging of an indicator of the photo border...

  • Windows7 Desktop only shows black color whenever any substantive theme or Image are selected in the customization

    in my Windows7 Desktop only shows black color whenever any substantive theme or Image are selected in the customization. Plese geve me a solution

    Hi Odette.

    Thanks for posting your query on Microsoft Community forum.

    Question has started happening recently? If YES, did you of significant changes to the computer before this problem?

    The question could arise for various reasons, including corrupted cards, damaged TranscodedWallpaper.jpg file, Remove background images is selected in the Control Panel, etc. To diagnose and troubleshoot these causes of the problem, I suggest you try the steps outlined in the following link and check if the problem persists.

    Impossible to change the background image in Windows 7

    In addition, please refer to the steps provided by Shawn "Cmdr" Keene [MVP] replied on January 6, 2011 in the following thread link: "".

    I am unable to change the background of color United in my windows 7 ultimate

    Additional information:

    Why can't I change my desktop background?

    Hope this information is useful. Let us know if you need more help, we will be happy to help you.

  • Photo images to the draw layer: when you import pictures, it shows me the oldest first, how to show most recent first?

    Hello

    When I import an image from a folder on the ipad, it shows the older image first.

    So I have to scroll through my 1000 images to get to the most recent.

    is there a simple solution to this

    Thank you

    Jay,

    I'm going to make sure that the draw team sees this conversation, but at the present time, there is no way to reverse how images appear in the photo selection process. I'm sorry. I know that you are looking for a frame or something.

    Sue.

Maybe you are looking for

  • Tecra S1 not dΘmarre?

    Hi you all. I get crazy about my new Tecra S1. Now it only starts after disconnecting the battery and the power cord. After replacing them that it will start up, otherwise the screen remains black. XP - sp2 als removed processor and registry modified

  • start of test O2?

    Hello, I just want to know when the test for o2 users duration will start?Cause I'll get an email where I can fill a second investigation.These survey ended with the words:"Thank you for the questionnaire of pre-release Milestone A853 FroYo (Android

  • How to change phone number in the settings?

    I'using iphone 5S for a few days. I put the incorrect installation of bij number. So my contacts do not see my number of wright, is also a problem by text message. I gave the number of wright in wapp, so it's no problem. How to solve this problem? I

  • mouse wheel event LabVIEW

    I am trying to create a graphical interface on which I have a lot of digital orders I want when I scroll wheel of the mouse I could increment or decerment the valuse of digital control I did for a control, but not in a position to implement for other

  • Must install ADR in my 10.3.6 weblogic Server

    HelloI installed my stand-alone weblogic server in my laptop. And I tried to deploy one of my file (developed using Web merger application - ADF) EAR. It shows a few exceptions and finally I got to know who needs to install the ADR. (ADF Runtimes). I