Capturing events fired by ACtiveX control

How can i capture events fired by ACtiveX control. i am using RegEventCallback vi, but that controls user driven events. i have an activeX control that fires events at unspecified time, now i want to know how to handle such events in LabView.
Rubina

Hi InformaticsComplex,
Using the Register Event Callback VI is the correct method to capture events generated by an ActiveX control. Register Event Callback registers a VI to be called when the event occurs. I suggest checking out the LabVIEW Help articles Using ActiveX with LabVIEW and Register Event Callback as well as the following examples. I hope this helps!
Examples (all found in NI Example Finder):
ActiveX Event Callback for Excel VI: labview\examples\comm\axevent.llb
ActiveX Event Callback for IE VI: labview\examples\comm\axevent.llb
NET Event Callback for Calendar Control VI: labview\examples\comm\dotnet\Events.llb
NET Event Callback for DataWatcher VI: labview\examples\comm\dotnet\Events.llb
Mike Lyons
National Instruments
http://www.ni.com/devzone

Similar Messages

  • Event structure does not capture mouse click event on toolbar activeX control

    Hi
    We have a toolbar activeX control on FP.  It works perfectly on my computer, but on my coworkers deskyop,  somehow the event structure doesn't capture mouse click event.
    Any idea?  Thanks a lot for any help.
    Anne

    It's a standard activeX control.  I attach a simple vi .
    thanks  for any help.
    Attachments:
    toolbar test.vi ‏41 KB

  • InsertionPalette activex control key down event

    Hi,
    Can any one know how to get the key down event of InsertionPalette activex control.
    I have handled the KeyDownEvent but it is not fired while the control is active and key is pressed.
    regards,
    Ceaser

    Ceaser,
    what is the application developement environment you are working with?
    Norbert 
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • Registering events for own GUI controls

    Hi,
    I refer to the blog
    <a href="/people/thomas.jung3/blog/2004/09/01/using-net-windows-controls-in-the-abap-control-framework:///people/thomas.jung3/blog/2004/09/01/using-net-windows-controls-in-the-abap-control-framework
    In the mean time I was successful regarding the display of the media player inplace in the SAPGUI. But I didn't succeed with event handling of native events. The redefined method 'dispatch' is never called, altough I registered events as:
      DATA: my_simple_event TYPE cntl_simple_event.
      DATA: my_simple_events TYPE cntl_simple_events.
    ****Register Media Player Events with CFW
      my_simple_event-eventid = go_mp3->evt_endofstream.
    Specify that it's an application event
      my_simple_event-appl_event = 'X'.
      APPEND my_simple_event TO my_simple_events.
    Redefine SET_REGISTERED_EVENTS
      CALL METHOD go_mp3->set_registered_events
        EXPORTING
          events                    = my_simple_events
        EXCEPTIONS
          illegal_event_combination = 1
          OTHERS                    = 2.
    ****Set Event handler for Media Player
      SET HANDLER g_application->handle_end_of_stream FOR go_mp3.
    Does anybody have an running example, e.g. for the event handling of 'STOP button clicked' event in the media player?
    Furthermore: Is there a free download of the OLE object viewer?
    Thanks a lot,
    Thomas

    Hi Juergen,
    Sorry - not an answer. But I would like to hear from you if you manage to solve this problem. I am also working on using a custom COM object (VB.NET) in the SAPGui and am battling to capture events triggered by the control.
    In particular I am trying to find the eventID of an event so that I can register it in SAP - do you know how to capture and view the event ID of lets say the mouse 'click' event of your control?
    How are you identifying your events and registering them in SAP?. I have very little experience in Delphi - but I'm hoping COM is universal enough?
    Hope you find your answer! Sorry I only have questions!
    Regards,
    Neil

  • Handling events of ActiveX controls in TestStand!rol

    Hi,
    I want to use the Microsoft WINSOCK control with existing ActiveX Automation Adapter of TestStand. These control generates an event in case of incomming data.
    Question:
    Is there any way to treat the events of such controls in TestStand (same problem with MSCOMM control) or can this only be realized by polling the size of incomming buffer?
    In case of answer two, i would be interested in any realized example.
    Regards,
    Sunny

    Hi Sunny,
    Currently, you cannot call ActiveX controls using the ActiveX Automation Adapter in TestStand. To do this, you would need to call a code module that was set to display/utilize the control, and retrieve all of the events generated by the control. TestStand can only currently call ActiveX servers (either DLL or EXE) that support the IDispatch interface. Hope this answers your question.
    Regards,
    Bob

  • Flex ActiveX Control Event is Missing

    Hi,
    I wrote an ATL CAxDialogImpl based dialog DLL to host a flash
    activex control. When I launched the DLL dialog box from a command
    line C# program, I can get all the events sent from the flash
    activex control to the dialog instance object, e.g. fscommand,
    FlashCall, OnReadyStateChange, etc.
    Now, I try to load the dialog DLL in IE using a simple local
    html with VBScript, the dialog box shows up and the flash shows up
    too. But I can no longer get fscommand, and FlashCall events from
    the Flash activex control to the dialog instance object,
    interestingly, I can still get the OnReadStateChange events.
    I don't know if this is a known problem already, or it's a
    bug, or is there any workaround for it, or I simply did something
    wrong.
    Your help is highly appreciated.
    Best Regards,
    EJIANG

    Hi,
    This is due to security functionality introduced in Flash
    8.0. I have read the
    Security
    Changes in Flash Player 8 and pages linked in the
    fscommand
    function documentation several times but it's unclear for me in
    which sandbox are put files opened in hosted ActveX Flash control.
    If someone knows this would be very helpful.
    Adobe states that embeding Flash Player ActiveX is not
    supported and stays quiet. Maybe SliverLight guys will be more
    comunicative.
    We have resolved this by using AxWebBrowser control and
    hosting the Flash player in a webpage instead of hosting it in
    Flash ActiveX.
    Another solution if you are using only local files is to try
    to use "file://YOUR_PATH_TO_FILE" as an argument for LoadMovie
    method. But this works only on local files.
    Hope this helps

  • Disable mouse events in ActiveX control

    Hi,
    I am using the Quicktime COM/ActiveX control for Windows from C# but want to change its default behaviour slightly.
    Currently when the mouse is pressed on the player control it pauses, resumes when double clicked or if already playing reverts to fullscreen mode.
    How can I disable this behaviour so that mouse clicks on the control do nothing?
    I can respond to mouse down events and intercept the message in WndProc but the control still seems to recieve the message before my application code.
    I get the feeling that I just need to change a property of the player, but which one?
    Thanks in advance for your help.
    James

    Mate, you are a total life saver!!!!!!!!!
    Thanks so much again.

  • How to create ActiveX control in Java

    I know there are lots of experts in this forum
    thats y i'm putting this general question.
    Will all devices come with an Active X Control.
    "To capture a device's events we can use ActiveX Control."
    Hows this statement implemented.???
    Thanks for the Sample code

    I am new to this. I want to display the data from database like a grid control. Ok, what problems are you having. You been given a link to the tutorial which shows you how to build a table.
    There is also a tutorial on [url http://java.sun.com/docs/books/tutorial/]JDB Database Access here:
    http://java.sun.com/docs/books/tutorial/
    Start by creating your SQL statement and iterating throught the ResultSet. Once you know how to do that, instead of outputting the data you simply build a DefaultTableModel and create the JTable.

  • Qt_ended Event firing in IE

    I want to add image at end of quicktime movie,for that i m firing qt_ended and its working alright in Firefox,for IE im getting confused abt what change i have to made.Read the tutorial here http://developer.apple.com/library/safari/#documentation/QuickTime/Conceptual/QT ScriptingJavaScript/bQTScripting_JavaScri_Document/QuickTimeandJavaScri.html#//appleref/doc/uid/TP40001526-CH001-SW6 But unable to make it work.If someone can please give me some example for making me do above functionality in IE.Below is my code
    <script src="AC_QuickTime.js" language="JavaScript" type="text/javascript">
    </script>
    <script language="JavaScript" type="text/javascript">
    <!--
    /* define function that shows percentage of movie 1 loaded */
    function showProgress()
    var percentLoaded = 0 ;
    percentLoaded = parseInt((document.movie1.GetMaxTimeLoaded() / document.movie1.GetDuration()) * 100);
    document.getElementById("loadStatus1").innerHTML = 'Movie loading: ' + percentLoaded + '% complete...';
    /* define function that executes when movie1 loading is complete */
    function movieLoaded()
    document.getElementById("loadStatus1").innerHTML = "Movie Loaded" ;
    /* define function that shows percentage of movie 2 loaded */
    function showProgress2()
    var percentLoaded = 0 ;
    percentLoaded = parseInt((document.movie2.GetMaxTimeLoaded() / document.movie2.GetDuration()) * 100);
    document.getElementById("loadStatus2").innerHTML = 'Movie loading: ' + percentLoaded + '% complete...';
    /* define function that executes when movie2 loading is complete */
    function movieLoaded2()
    document.getElementById("loadStatus2").innerHTML = "Movie Loaded" ;
    /* define function that adds another function as a listener for a DOM event */
    function myAddListener(obj, evt, handler, captures)
    if ( document.addEventListener )
    obj.addEventListener(evt, handler, captures);
    else
    // IE
    alert("IN IE");
    obj.attachEvent('on' + evt, handler);
    /* define functions that register each listener */
    function RegisterListener(eventName, objID, embedID, listenerFcn)
    var obj = document.getElementById(objID);
    if ( !obj )
    obj = document.getElementById(embedID);
    if ( obj )
    myAddListener(obj, eventName, listenerFcn, false);
    function alertonend()
    //document.getElementById("loadStatus2").innerHTML = "Movie Loaded" ;
    alert("HEREEE");
    /* define a single function that registers all listeners to call onload */
    function RegisterListeners()
    RegisterListener('qt_progress', 'movie1', 'qtmovie_embed', showProgress);
    RegisterListener('qt_load', 'movie1', 'qtmovie_embed', movieLoaded);
    RegisterListener('qt_progress', 'movie2', 'qtmovie_embed2', showProgress2);
    RegisterListener('qt_load', 'movie2', 'qtmovie_embed2', movieLoaded2);
    RegisterListener('qt_ended', 'movie1', 'qtmovie_embed', alertonend);
    //-->
    </script>
    Two Movies with JavaScript Play/Stop Controls
    and Progress/Load Monitors
    <script language="javascript" type="text/javascript">
    QT_WriteOBJECT('b.mp4', '760','416', '', 'obj#id', 'movie1', 'emb#id', 'qtmovie_embed', 'emb#name', 'movie1', 'postdomevents', 'true', 'enablejavascript', 'true');
    </script>   
    <!--<script language="javascript" type="text/javascript">
    QTWriteOBJECT('samplesorenson.mov', '360','256', '', 'obj#id', 'movie2', 'emb#id', 'qtmovie_embed2', 'emb#name', 'movie2', 'postdomevents', 'true', 'enablejavascript', 'true');
    </script>-->
    <table width="100%">
    <tr>
    <td align="center">
    MOVIE LOADING...
    </td>
    <td align="center">
    MOVIE LOADING...
    </td>
    </tr>
    <tr>
    <td align="center">
    Play 1
    </td>
    <td align="center">
    Play 2
    </td>
    </tr>
    <tr>
    <td align="center">
    Stop 1
    </td>
    <td align="center">
    Stop 2
    </td>
    </tr>
    </table>

    Very curious to see answers to this post — I'm not getting a 'qt_ended' event in either Safari or Firefox (3.5.2). Nor were some of the other events firing (qt_timechanged comes to mind). Have noticed numerous messages on boards regarding troubles with the QT events, so I may just keep using my workarounds -- setInterval() monitoring loops.
    N

  • Need help inserting ActiveX Control

    We provide an ActiveX control to talk to an instrument. We sell very few of these but nonetheless I've been asked to upgrade the LabVIEW sample (even though it only accounts for 10% of our few sales). I did make a sample a long time ago for labiew 5.1 but was going to make a new one for labview 2011 (as its too difficult to import the sample from 5.1).
    For testing (and that I'm not releasing any proprietary stuff) I wrote a simple ActiveX control that contains some of the features of the instrument control. This includes going to a particular position, scanning between two positions and receiving events (data, message and status). I was very easily able to write a quick demo in VB6 and C#2010 but I've forgotten everything about labview (except I remember it was relatively complicated for a non-graphical programmer like myself to use an activex control back in the 5.1 days).
    I would like to make a simple demo (like the one for C#)
    On a button press it starts a collect, first taking the two values from the appropriate inputs as the range (sets the StartPos and StopPos properties) then calls BeginRun.
    On another button press it "goes to" a position (calls GoToPos with a parameter from another numeric input).
    Receives OnStateChanged events and displays the enumerated type in a string indicator. This event is fired when the state is changed (eg. by calling BeginRun).
    Receives OnData events and displayes the position and value from the event in an indicator. This event is fired during a run for each sample.
    Receives OnMessage events and displays the message string in an indicator. This event can occur any time - in this sample I'm firing it randomly about once per second and its just sending the time as a string.
    Events are asynchronous - calling BeginRun returns immediately but events will follow later.
    Can anyone help me build this simple example - I've forgotten all the (little) labview I did back in 2003. I've attached the ActiveX control (XTestControl.ocx) a very simple VB6 sample, a better compiled C#2010 sample and my fiddling, far-from-complete LabVIEW 2011 sample. Everything is 32-bit (although I'm running on 64-bit Win7).
    There's a lot I don't understand about LabVIEW and the time I've already spent on this so far probably means several years ROI for the small company I work for because of the low volumes.
    TIA
    Attachments:
    ActiveXTest.zip ‏277 KB

    Thanks for your reply nathand and taking the time to look at my sample.
    Yes, it is a very ligh VI because it doesn't have to do much. I want to numeric inputs that set the StartPos and StopPos properties of the ActiveX control and then call the BeginRun method (ie. 3 controls). Data is returned in the OnData event asynchronously and displayed (ie. 1 numeric display). I'me used to programming with the likes of VB and C# where events are a matter of course and you just select the event you want to code for and write the code so all this talk of "separate VIs" and "User Parameter List" is all confusing to me. The VB and C# samples I provided literally took me 15 minutes to write both and I won't tell you how embarrassingly long I spent playing with labview. From memory in (HP) VEE it was relatively easy to make a basic demo using our ActiveX control but we won't be supplying a demo for that this time (or possibly the old demo still works). This is supposed to be such a basic labview sample being provided by the vendor (our small company) as you suggested.
    I downloaded the 30-day LabVIEW 2011 trial, which I was assuming had proper "event structure" but its counter-intuitive to use.
    I've modified the attached control slightly (put a Run button on and a CallBack VI thingy) but I don't know how to wire up the run button to do something when clicked nor the event output to the (string) display.
    Attachments:
    ControlTest2.zip ‏15 KB

  • Integrating custom ActiveX control with SapGUI

    Hi everybody
    I'm in the process of writing a custom MFC based ActiveX control written in C++ that we want to use in a product. I am currently at the point where I can instantiate the control and interact with the various methods that it exposes but I have a problem integrating the control more tightly with the SapGUI e.g. change of colors, fonts etc.
    I want to make the control to reflect the user changes when the user modifies any settings of the SapGUI. I've tried catching various events that are exposed by some of the dictionary classes such as cl_gui_props_consumer=>color_change/global_prop_change and cl_gui_resources=>resources_changed but these events only fire in my control once the PAI of the client program that encapsulates the control fires which is hardly appropriate since it means that the control will have to wait for user input before it will change reflect any changes in user settings.
    I've written a test program for my control and when I change my SapGUI colors the rest of the controls etc on the screen do change color but my control only change color once I've performed some action that fires the PAI. Personally I think the controls written by SAP intergrates with the SapGUI through some interface that is called behind the scenes by the SapGUI since the GUI will have some way of knowing the set of ActiveX controls instantiated inside it  and I cannot find any event in the ABAP controls framework (e.g. CL_GUI_OBJECT, CL_GUI_CONTROL) that will allow this type of integration. I'll be digging for the answer but any suggestions will by greatly appreciated.
    Thank you in advance for any help.
    Kind regards
    Ettienne Hugo

    Hello Ettienne Hugo,
    To get the SAP GUI Theme or font changes events you need to add your MFC application or ActiveX MFC dll into u201CSAP Configuration->Application Tab->Addu201D and u need to call the functions SapHookInit and to stop getting the change events u need to call SapHookExit.(sapfhook.dll provides these functions)
    I tried with exe, never tried with ActiveX MFC dll/ocx. With EXE it works.
    Thanks and Regards,
    Ashwini

  • How to control and display video from IP camera using ActiveX control over Internet.

    Hello,
    I need to control my IP cameras over the internet. I need to log into the cameras and then display the video.  There's an ActiveX control registered on the computer and works fine with IE to access and control the cameras. Controlling the cameras using IE works fairly well, but there are some quirks that I'd like to eliminate by using my own custom code.
    Has anyone created a vi that controls a Foscam FI8905W over the Internet? I’ve attempted, but I keep getting a catastrophic failure when I try to call ManagementConnect Method in the DVM_IPCam2 ActiveX Control Module V1.0. I'm not sure whether I need to establish an IP connection with the cameras first, or allow the ActiveX control to establish it for me.
    Some example code would be greatly appreciated. Running LabVIEW 2011 on a Win7 32bit.  Even some code used to control a similar device using ActiveX over Internet would be helpful.

    I have an example vi for interfacing to the foscam activex.
    I plan on using mouse click events within the activex window to trigger the PT function.
    I only have the basic up/down/right/left directions and not the down-right/down-left/up-right/up-left in the enum.  You can load the camera's web page and view the source to see the Java script code that uses the activex control.  There are definitions for the other directions.
    I had to mark the control as "Disabled" to keep click events from going to the activex control.  If I double click the control, it goes full screen.  If I then click on it to get out of full screen mode the video never returns or returns to the wrong spot in the VI.
    Attachments:
    Foscam Demo.vi ‏24 KB

  • "the activex control for flash player could not be registered" - Solutions Roundup

    I recently ran into this problem on my computer:
    http://at32.s3.amazonaws.com/flash_install_problems2.jpg
    I am a Flash developer (as in I write SWFs, I don't work for Adobe).  and when I updated IE to 10.2, "the activex control for flash player could not be registered".  Since I am a developer, I also have Firefox and Chrome installed, with Flash running without problems.  For a long time now, Internet Explorer has used a different version (ActiveX) to the other browsers, which use plugins.  I am a strong supporter of Flash, it's great to develop with and has a very wide feature set which is growing all the time, unlike fixed technologies/standards.  However, the weakest part is the install process - I don't understand why their is a Download Manager.  Google Chrome does it's best (so far) by managing the install/update process entirely in the background.  Anyway, it was in my best interest to try and get to the bottom of this.
    For the record, on the problem machine I have Windows 7 with IE8, but I have seen almost  identical symptoms with IE9, Windows XP SP3, as well as various  iterations of Flash Player (10.0, 10.1, 10.2 and even some final  editions of version 9).
    First I tried the standard support here:
    http://kb2.adobe.com/cps/191/tn_19166.html
    Basically, doing the manual uninstall and manual install of the latest version (without using the download manager, or have IE open).  This did not work.  I also tried the Microsoft "subinacl" program, together with "reset_fp10.bat".  This didn't work either.  However, you should try all of these things first before progressing further.
    A quick note about people who had tried running the following at a command prompt: "secedit /configure /cfg %windir%\repair\secsetup.inf /db secsetup.sdb /verbose"
    I didn't do this, because on investigating further it didn't seem to work with Windows 7, only Windows XP, Windows 2000 or Windows 2003 - though there was a few threads where this had fixed the problem for some users.
    For my solution, it is recommended you use the manual uninstall / installers, so you should have them downloaded ready to use.
    I then heard about problems with permissions in the registry with the key: HKEY_LOCAL_MACHINE\Software\Classes\shockwaveflash.shockwave
    So I opened regedit.exe (start - run - typed "regedit.exe"), navigated to the key and sure enough, I couldn't open it - permission denied - even though I had an administrator account.  If for some reason, you can access this key (and any subkeys), then it's likely the following fix will not resolve the problem.
    I then done further diagnosis, by using Process Monitor to try and install Flash Player, and I got the following:
    http://at32.s3.amazonaws.com/flash_install_problems.gif
    This shows all the access denied errors the Flash Player install was experiencing when trying to write to the registry key.  This confirmed that this was the problem.  I only stress this because several people said it was unwise to tinker with the registry.  Though this is common advice, this is the only known fix for this precise problem at present, since you need to manually adjust the permissions yourself.  I don't know who is at fault here - Microsoft or Adobe - but let's just get Flash fixed...
    The solution:
    Firstly, you may want to backup your registry, or the exact key.  I didn't do this so I've provided no instructions on how to, but it is recommended for the paranoid.  Also make sure as much software is closed down as possible - browsers, IM software, any junk in your system tray. As way of example, I happened to have "BBC iPlayer" installed and running in the background which uses Adobe AIR and Flash Player, so I exited that too.
    1) Open regedit (start - run - type "regedit.exe").  You may need to right click on it and select "Run As Administrator", but I didn't as my account was already administrator.
    2) Navigate to the key. HKEY_LOCAL_MACHINE\Software\Classes\shockwaveflash.shockwave
    Click on it to confirm that you cannot access it (you will get an error) - if their are no problems - this probably isn't the cause of your issues.
    3) Right click on it and click Permissions, and ignore any message that may pop up.
    4) Under "Group or Usernames" click "Add".  Type your account name name, or "Administrators" in the box, then "Check Names" to format it correctly, then Ok.
    5) Now on the next screen click the checkbox to enable Full Control (this will also automatically enable "Read" permission too).
    6) Click Advanced, then the "Owner" tab at the top.  You will see that their is no "Current Owner".  This is what we will now fix.
    7) Click on your name to change the owner to (I went for Administrators).  Also enable the checkbox entitled "Replace Owner on subcontainers and objects".  Then click Ok.  You will get an error message, which you can try clicking Retry to, but hit Cancel - this is not a problem.
    8) Click Ok a couple of times and this part of your registry is now fixed.
    9) Now it's a simple case of running the manual Flash uninstall program, then finally the manual Flash installer (for Active X - not the Firefox/Chrome plugin versions).  To my surprise, after a couple of days looking into this - I finally had a solution and Flash in IE once more.  If you are using Firefox too you may find Flash is no longer installed their (the uninstaller removed it).  In this case just install via the Adobe site or try to watch a video on You Tube and you will be prompted or linked to the install.
    Hope this provides a good round up of the possible solutions to this problem.  Hopefully Microsoft or Adobe can find out what causes this issue in the first place so we don't have to go down this route for much longer.  Chrome's implementation of Flash shows how effortlessly things can work!

    They will stay on the screen.  However, Process Monitor is only intended for advanced users.  It is recommended that users try to navigate to the troublesome registry key using regedit, and see if they can access it or not without an error.  This is far easier than trying to use Process Monitor, which is very complicated.
    I used Process Monitor to confirm that it was just that key which was causing the problem, and not others.  Process Monitor is not to be confused with the new Resource Monitor which is accessible via Task Manager in Windows 7 (and possibly Vista).  If you must experiment (and Process Monitor is very useful for diagnosing many deep-level problems if you know what you're looking for) Process Monitor can be downloaded from here:
    http://technet.microsoft.com/en-us/sysinternals/bb896645
    It replaces the older Sysinternals "FileMon" and "RegMon".  For those interested in the technical side, I had to setup a number of filters to be able to get the results display as in the screenshot.  First of all to just show Registry events.  Then to just show events from the manual Flash activeX installer executable.  The I added a filter to show only non-successfull results.  And finally, for the purposes of the screenshot, added a filter to just show those with "Access Denied", since other non-critical errors are also picked up due to missing keys because installation has not yet been fully completed I guess.   When experimenting, most of these filters were applied using the "is not" boolean logic, which will make sense if you experiment with the program.
    Without adding any filters, it picks up so many events (hundreds per second) that it's otherwise unusable.  e.g. 40,000 events within the first few seconds of opening the program. For this reason, I recommend simply using Regedit to diagnose the problem with the particular Flash registry key.

  • Video not showing in WMP ActiveX control

    Trying to play an MP4 in Windows Media Player and I get a black control and WMP acts as if it is playing.  The MP4 does not have audio but other posts have suggested this is not affected by this issue.  I have tried all of the various solutions from other posts (converting to WMV, tuning off acceleration, ensuring WMP and refnums are closed properly) and nothing seems to work.
    I've been able to get the video to work at times, but after it starts to flake out (black) it never seems to recover.  If I recreate the container it always works for at least one play.  It does not matter if I allow it to play all the way to the end or click on the control (and stop it via the event case) -- the error can occur either way.  
    At times I have recieved an error (-2147417846) but this does not seem to be required in order to get the no-video effect (effect happens w/ or w/o the error).  I have not been able to track down details on the error but the 750ms delay seems to help with respect to occurence rate. 
    When I get the black control, the background shows various other video effects both inside and outside of the ActiveX container.  See the "while_running.png" attachment.  After I stop the VI, the screen looks as in "after_stopping.png".  The "after stopping" look persists until I move the screen (and thereby force a redraw) even a little.
    I do not recall installing any special CODECs, etc. and the videos all work fine repeatedely in stand-alone WMP.
    Running:
      Win 7 (32) Home Premium SP1
      LV 2011 Pro
      WMP 12.0.7601.17514
    Attachments:
    playMovie.vi ‏22 KB
    while_running.png ‏50 KB
    after_stoppin.png ‏146 KB

    @Norbert - your callback approach allowed the video to play repeatedly on both test machines, however...  Once you had me apparently past that hurdle I tried to figure out a way to keep the activeX control from resizing (autozoom to video files native size).  I searched through all prop and methods and tried everything I could think of but could not figure it out.  Fine, failing that, I tried to set the window size based on the resulting autosized activeX container with the WMP controls cropped ooutside the front panel window.  That broke the second playing of the video again. 
    @Dan - thanks for continuing to look at this.  From my perspective, it feels like the bit that gets corrupted (or set-but-then-not-unset-on-exit-of-first-video) has to do with zoom/scaling or aspect ratio, if that helps.
    Trying to make progress, and not finding any exposed WMP props for setting the player size in the ActiveX container, I tried loading the WMP inside a web page inside an ActiveX container per http://zone.ni.com/devzone/cda/epd/p/id/4540.  This gets me around the uncontrollable autosizing of the original VI (now cotrolled by the HTML layer) and also the no-video issue but introduces a new one -- clicking "stop" on the second-played video often results in a bad refnum passed to the "click" invoke inside the "stop" event case.  The VI stops but the video/audio keep going.   I thought it might be a reload-from-cache effect so I modified the "modifyHTML" subVI to save to a unique temp html file evey time and pass that path (as string) to the URL property in WMPBrowser -- no effect.   

  • First event fired to event structure

    Hi all,
       Does anyone know what's the first event being fired to the event structure on VI startup? I set a breakpoint on the event structure and it breaks. However i wasn't able to capture whats the event.
    My intention was simple; i have a table which list all the IO names and values. So during VI startup, i wan to populate the IO names first. Then in a timed-loop, the values are updated respectively. In this case, i don't need to "refresh" the table every time which waste time and resources.
    It something like the OnLoad event.
    Another way out is to register an user event, and have this event fired during application startup. But i wonder if anyone has a better way?
    Many thanks!

    j3r3mi wrote:
    My intention was simple; i have a table which list all the IO names and values. So during VI startup, i wan to populate the IO names first. Then in a timed-loop, the values are updated respectively. In this case, i don't need to "refresh" the table every time which waste time and resources.
    Why don't you show us some code.
    Are the IO name static for the duration of the program? Are you using a regular table column or the "row header strings []" property for the IO names?
    If you want to write the row headers at the start of the program, place the code before the main loop containing the event structure. No event case needed. If you have a specific event to update the table headers if needed, fire the event once at startup using a signaling value property, again with the property node placed before the main loop.
    LabVIEW Champion . Do more with less code and in less time .

Maybe you are looking for

  • Capture all SQL statements and archive to file in real time

    Want to Capture all SQL statements and archive to file in real time? Oracle Session Manager is the tool just you need. Get it at http://www.wangz.net This tools monitor how connected sessions use database instance resources in real time. You can obta

  • SAP Business Connector JDBC Mapping

    Dear all, I am using SAP BC to connect and query a MS SQL Database. I have a SAP Function Module called in SAP ABAP with the query in importing parameters and would expect the result in the given tables parameter. Mapping the importing parameter to t

  • Multiple masking

    Hi! I have an application which is needed tricky mask for one movie. This mask should contain several movies. But as result, mask needs to have just common part of these movies. Thanks for any ideas

  • An app counting minutes and data use. Please help!!!

    An app counting minutes and data use. Please help!!!

  • Can Mail.app 3.3 Work on 10.3.9?

    Hi all, I'm letting my wife use my computer for some weeks and I want to simply take my whole Mail folder and chunk it over onto her computer. Trouble is I'm using 10.5.4 and she's using 10.3.9. Can I still do this wild thing? Or must I try to export