[Windows] Event-based joystick handling

Hi,
      In case this might be of use, here's some sample code that traps joystick events with an event structure.  There may be an example like this here already - if so, apologies for taking up space.  The only examples I saw use polling to check for joystick changes.
This example builds on some code found here for trapping windows-messages.
Cheers.

... one more time
Am also attaching the messaging .zip and Messaging.txt - some source code that lists windows messages.
Cheers!
Attachments:
Util.WinAPI.Msg.Daemon.TEST.llb ‏347 KB
windows_messaging_que.zip ‏221 KB
Messages.txt ‏106 KB

Similar Messages

  • Error handler for event based messaging framework

    I've been very interested in using the event based messaging framework (described here http://forums.ni.com/t5/LabVIEW/Community-Nugget-2009-03-13-An-Event-based-messageing-framework/td-p...) for my next large application.
    My main concern is the fact that it seems like typos would be very difficult to debug since you need to ignore unknown commands to make this system work.
    To solve this problem I've been considering the idea of having a single message error handler VI which will store all valid commands and check all sent commands to see if they are valid.  Each VI would send out a register message on startup with their name and all messages they can send and receive.  The message error handler would store these and then check all future messages to be sure it is a valid message, throwing an error if it is not.
    My basic problem is this: for this to work the message error handler VI would have to be started before any messages are sent so that it can capture all the register events.  If this is a VI that will be continuously running the entire application how can I ensure it starts first since I cannot wait for it to complete? (I.e. the usual method of running an error out wire or using a sequence structure will not work since everything will then wait for it to complete which will not happen until the program is ready to shut down)
    I'm assuming the answer might be to use an asynchronous call but I'm not very familiar with this method.  
    Any help is appreciated.  Thanks. 

    Could you just use the error handler as a subVI inside a case structure that is only called when you have new message to be checked? I'm not sure I understood the exact functionality you are looking for, so sorry if this does not apply.
    Zach P.
    Product Support Engineer | LabVIEW R&D | National Instruments

  • Window event handling

    I am a seasoned windoze programmer and can do this quite easily. However, I am very new to Java and it doesn't seem to be as easy. There MUST be a way to do this; I am sure I just am not seeing it:
    I want to trap for window events BEFORE they occur. Specifically, I want to hijack the event WindowEvent.WINDOW_ICONIFIED and prevent it from being processed. Setting up a window listener and implementing windowIconified() is useless to me as that happens after the window has been iconified. I want to PREVENT the window from being ICONIFIED.
    I am forced to use JRE 1.2 so I cannot use setUndecorated(true);
    I looked at some of the Java source code and it looks like not all events can be consumed. It looks as if no window events can be consumed. Is this true? If they can, how would you go about consuming a window event?
    I have literally spent days trying to figure a way to do this. Does anyone have any ideas here?
    Thanks,
    - Brownie

    I dont have any idea. Perhaps you should post it in Advanced Language Topics or Project Swing. People seldom browse this forum I think.
    I guess Java won't have a way to do it, though. I doubt its portablility(thinking about Window Manager from X world). Not very sure about it.

  • Urgent help needed on writing errors in to windows events application logs

    Hi all,
    we have web based application. Whenever there is critical errors encounters in our application we need to write that errors in to windows
    event viewer, application logs. Please help me on how to do this.
    do we have any specific API for this ?
    thanks in advance
    Shivakumar

    You should use WinAPI to do so. Asking in JNI forum (or specialized WinAPI forum) for more details is good idea I think.

  • I need help with my event-based cue points with audio

    Im having trouble with my video game project for my action script 3 class at school. Here is what i did, i made a game called Tailgate toss up. I filmed my character and rendered it in Adobe Premiere. I than brought my .mov file into After Effects and I put event-based cue points-
    my first cue point at 0:00:03:13 called "loop"
    my second cue point at 00:00:03:27 called "draw"
    my third cue point at 00:00:05:24 called "bang"
    my fourth cue point at 00:00:13:29 called "dead"
    my fifth cue point at 00:00:14:29 called "You Lose"
    my last cue point at 00:00:19:14 called "End"
    Here is my action script 3 code
    ///first frame:
    start_btn.addEventListener(MouseEvent.CLICK, startGame);
    function startGame(event:MouseEvent){
    gotoAndStop(2);
    SoundMixer.stopAll()
    stop();
    ///second frame:
    stop();
    var loopTime
    var hitHim:Boolean = false;
    var vConnection:NetConnection = new NetConnection();
    vConnection.connect(null);
    var vStream:NetStream = new NetStream(vConnection);
    var client:Object = new Object();
    client.onCuePoint = onCuePoint;
    vStream.client = client;
    var myVideo:Video = new Video(418, 480);
    myVideo.y = 0;  ///this adjusts where the video is, right now it is the size of the canvas which is 418,480
    addChild(myVideo);
    myVideo.attachNetStream(vStream);
    vStream.play("michelle.flv");
    var throw_bottle:Sound
    throw_bottle = new Sound(new URLRequest("audio/throw_bottle.mp3")); //change to button noise, will add sound into ae file
    target_mc.addEventListener(MouseEvent.CLICK, shoot);
    target_mc.buttonMode = true;
    target_mc.visible = false;
    draw_mc.visible = false;
    function onCuePoint(cuePoint:Object):void {
       if(cuePoint.name == "loop"){
    loopTime = cuePoint.time;
        if(cuePoint.name == "draw"){
    var randomLoop:Number = Math.random()*10;
    if(randomLoop > 2){
    vStream.seek(loopTime);
    }else{
    setChildIndex(target_mc, numChildren - 1);  
    setChildIndex(draw_mc, numChildren - 1);    
    target_mc.visible = true;
    draw_mc.visible = true;
    if(cuePoint.time == "5:24"){
    draw_mc.visible = false;
    target_mc.visible = false;
    if(!hitHim){
    vStream.seek(15);    
    if(cuePoint.name == "dead"){
    vStream.close();
    myVideo.clear();
    gotoAndStop(3);
    if(cuePoint.name == "end"){
    gotoAndStop(3);
    function shoot(event:MouseEvent){
    throw_bottle.play();
    hitHim = true;
    ///my third and last frame
    playAgain_btn.addEventListener(MouseEvent.CLICK, playAgain);
    function playAgain(event:MouseEvent){
    gotoAndStop(2);
    SoundMixer.stopAll()
    stop();
    When I have no audio it works perfectly, no problems. When I bring audio in i re-render it as a .mov file and bring it back into After Effects and add the cue points to it. Than i re-render it out again as a flv file. When i bring it into my flash project it will work when the looping variable does just one loop and my target will appear so you can click on it or not. But when the looping variable makes it loop 2 to 10 times it skips over the catching (the part of the clip if you clip the button) and goes directly to the dropping of the can, not giving you the option of clicking the button. So basically it skips the "draw" or second cue point of my game and goes to "You Lose" cue point.
    Any suggestions?

    Hi,
    The latest audio driver for your machine is on the following link.
    http://ftp.hp.com/pub/softpaq/sp59501-60000/sp59649.exe
    Regards,
    DP-K
    ****Click the White thumb to say thanks****
    ****Please mark Accept As Solution if it solves your problem****
    ****I don't work for HP****
    Microsoft MVP - Windows Experience

  • Windows event coming through via db- put() call (very puzzling)

    We have this problem (https://bugzilla.osafoundation.org/show_bug.cgi?id=11202) where if we run a DEBUG build of chandler after running a RELEASE build on Windows (XP or 2000), running db 4.5.20 or 4.6.21, we're getting a windows event call while inside a db->put() call. This so happens in a somewhat critical section of code where windows events are definitely not expected.
    In no place that we can find are there any calls that we expect to tickle the Windows event loop (no yielding or somesuch). An MSVC stacktrace that doesn't even show any 'db' API to be on the stack at all. Yet, stepping through the python code in the python debugger clearly gets us to this error when stepping over the self._db.put() call which is more or less just a db->put() call in C.
    We think that we've ruled out threading weirdness, only one thread is involved here.
    Our wx engineer seems to remember having seen something about this strange interaction between Berkeley DB and wxWidgets before. Does this ring a bell ? Do you have any clues about what could be going on here ?
    Thanks
    Andi..

    Berkeley DB windows port utilizes Windows' CreateEvent function to implement the lock functionality, which is a fundamental functionality for databases.
    You do not have to protect berkeley db access methods for synchronization explicitly, rather, you should set DB_THREAD flag in the DB_ENV->open and DB->open funciton if the env and db handles are to be accessed by multiple thread of the same process, this way, Berkeley db will handle the synchronization internally

  • Generate an Event based on Counter Trigger

    Hello,
    I have the following part that is already working: a counter (used for period measurement) which is triggered by a digital input. After that I'm reading the data and I'm puting them in a Queue. Here I get an error. The Enqueue Element Vi is providing an error. (Error 1, something with a @  character that is illegal). I've notice that if I disable the trigger for the counter I don't get the error. I'm thinking that this is cause by the delay between the moment in which the Enqueue Block tries to enqueue and the moment in which the counter provides something to its ouptut.
    What I want to do is to Generate an Event based on the Counter Trigger Signal and to put all the reading and Enqueue part in an Event Structure. I've tried to do that using an Export Signal - Property Node, but I didn't manage to make it work.
    If you have any solution for this (with or without events -  I just want to get rid of that error) please let me know.
    PS: I have Labview 8.5.1 and the USB-6210.
    Thanks,
    LostInHelp

    Hello Mike,
    Thanks for your replay.
    I've attached two vi files. In one you can find how I've tried to generate an event based on the counter trigger (test.vi).
    The second one (test1.vi) is the vi where I get the queue error. I've deleted from the second vi the part where the data are dequeue and handled.
    Thanks
    LostInHelp
    Attachments:
    test41.vi ‏50 KB
    test110.vi ‏35 KB

  • Thinking about using the Windows Event Logs as my main log store - looking for pros and cons

    I have been writing some larger scripts that write to physical log files.  Until today I have avoided trying to use the Windows Event logs, but, am beginning to rethink this and wondered if anyone has done this, and, what the strengths and weaknesses
    of this logging approach has been.  If I do it, I will probably write a function that accepts pipelined input and simply pass output to the log.  I wanted to get a feel for what I would be getting into before I started writing things up since this
    will probably take a little bit of work to get set up to run properly.

    At my company we use the Windows event log for many of our batch process logging for several reasons:
    Unlike logging to a central database, the Windows event log is always available. I've seen poorly thought out logging solution which log to a database and if the database happens to be unavailable the batch process would fail.
    Monitoring tool such as SCOM already have Windows event log watchers so adding alerts to take action based on message written to the Windows event log is easy
    Built-in support for writing Windows event log entries in the Powershell V2 write-eventlog cmdlet, a simple CLR can created in SQL Server or even command-line eventcreate.exe
    Easy to create a custom event log so you don't have to use the default application log in Windows 2008 and higher.
    Most shrink-wrap S/W already use the event log
    Issues I've seen:
    Windows 2008 with UAC on requires "registering" i.e. creating a new event log source with UAC. This can be done one time manually. Unfortunately there isn't a way to automate UAC--pure GUI. The Powershell command would be "New-EventLog -LogName Application
    -Source  mysource" if you're using the Application log and must be run as  administrator.
    Errant process writes many entries to the event log. Depending on the volume like for example writing stack dumps this can performance problems. I  think I recall an issue an Windows 2003 or Windows 2008 with UAC off  if you're creating a new
    event log source each time (which you shouldn't) then these results in many registry entries which can cause problems.
    I don't think the issues outweigh the benefits--just something to be aware of.

  • Problem connecting old Philips WIndows XP based Multimedia PC to AEBS

    I upgraded my brother's wireless network by turning off the Wifi from his 'oldish' Linksys and attaching a AEBS in bridge mode to his linksys. This works fine for his imac and MacBook Pro, as well as his iPod and AE (used for AirPlay). The AEBS is set up to offer a separate network for the 2.4GHz and 5GHz bands. The channels are 'not wide'.
    But one older system refuses to connect. It is an old Philips Windows XP based media center with a AR5006XS chipset based 802.11 b/g card. The log in the AEBS shows a constant failure to connect with errors "WPA handshake failed with STA".
    Having looked around, I noticed some web pages with some info on problems with this chipset, no info specific to this Media Center PC. Does anybody have an idea what I could do best to get this system connected again? Drivers?
    If updated XP drivers for this thing are not available, I was thinking to use an older M8799LL/A AEBS I have lying around here. I would then want to set that one up in bridge mode and let it join the existing network. I would then attach the ethernet to the Windows PC. Would that work with that base station?

    Bob Timmons wrote:
    The channels are 'not wide'.
    If you are talking about 5 GHz, they need to be "wide" if you want maximum bandwidth on the network. I don't know why you would not want this, but you may have your reasons.
    Though his house is made from wood his reception problems are much bigger than mine (and my house is made from concrete). I have made the channels narrow to minimize interference as a possible source of problems.
    Having looked around, I noticed some web pages with some info on problems with this chipset, no info specific to this Media Center PC. Does anybody have an idea what I could do best to get this system connected again? Drivers?
    Based on your description, and a guess, this sounds very much like the Media Center PC wants to connect using older WEP 128 or WEP 40 encryption. It probably cannot handle WPA authentication.
    According to what Windows tells me I can select WPA and the log of the AEBS also shows me that an WPA attempt is being made. It just fails. It was also connecting with WPA succesfully to the linksys before I replaced the linksys' wireless with the AEBS. So it looks like a wifi compatibility problem between the driver on the XP machine and the AEBS.

  • BGP Event-Based VPN Import

    Hi Guys,
    I came across this command, but have problem understanding what it does or how to use it:
    Router(config-router-af)# import path selection {all | bestpath [strict] | multipath [strict]}
    It falls under the "BGP Event-Based VPN Import" section:
    http://www.cisco.com/c/en/us/td/docs/ios/ios_xe/iproute_bgp/configuration/guide/2_xe/irg_xe_book/irg_event_vpn_import_xe.html#wp1059052
    Does anyone know what this does or how this works?

    Hi,
    It specifies the BGP import path selection policy for a specific VRF instance.
    You might be aware on VRF-LITE, that's the VPNs without MPLS.
    BGP Event-Based VPN Import
    The BGP Event-Based VPN Import feature introduces a modification to the existing BGP path import process. BGP Virtual Private Network (VPN) import provides importing functionality for BGP paths where BGP paths are imported from the BGP VPN table into a BGP virtual routing and forwarding (VRF) topology. In the existing path import process, when path updates occur, the import updates are processed during the next scan time, which is a configurable interval of 5 to 15 seconds. The scan time adds a delay in the propagation of routes. The enhanced BGP path import is driven by events; when a BGP path changes, all of its imported copies are updated as soon as processing is available.
    When you use the BGP Event-Based VPN Import feature, convergence times are significantly reduced because provider edge (PE) routers can propagate VPN paths to customer edge (CE) routers without the scan time delay. Configuration changes such as adding imported route targets (RT) to a VRF are not processed immediately, and are still handled during the 60-second periodic scanner pass.
    Import Path Selection Policy
    Event-based VPN import introduces three path selection policies:
    •All—Import all available paths from the exporting net that match any route target (RT) associated with the importing VRF instance.
    •Best path—Import the best available path that matches the RT of the VRF instance. If the best path in the exporting net does not match the RT of the VRF instance, a best available path that matches the RT of the VRF instance is imported.
    •Multipath—Import the best path and all paths marked as multipaths that match the RT of the VRF instance. If there are no best path or multipath matches, then the best available path is selected.
    - Ashok
    Please rate the useful post or mark as correct answer as it will help others looking for similar information

  • Scheduler - Event Based Jobs

    Hi,
    I've been trying to create an event based job dependent on multiple jobs. I tried queuing, but it seems like it can only hand one Job at a time. Also, chains were recommended to me, but I want the Job to run on the dependence on the Job that ran on specific program at the specific time. I currently know that chains can only handle, programs, other chains and/or events.
    In my mind chains wouldn't work, because If I wanted to run Job3 dependent on the outcome of Job1 running Program1 and Job2 running Program2, chains wouldn't be able to accomdate that. For it to happen in chains I would have to attach Program1 and Program2 to the new chain Job and that is not exactly what I would want.
    Can anyone help/clarify this situation for me. Thank you.
    Tony

    Hi Tony,
    So the requirement is to run a job after 2 prior jobs have completed.
    There are two ways I can think of to do this, both using events. In both cases you need to set job A and job B to raise events on completion (succeeded, failed or stopped) and setup an agent for the Scheduler event queue in the schema in which you are working
    dbms_scheduler.add_event_queue_subscriber('myagent')
    In order to get Job C to start after jobs A and B have completed there are 2 options.
    1) Let job C point to a chain and start running whenever job A has completed. The chain will have 2 steps, one event step waiting on B and one that runs your task C. An event step does nothing but wait for a particular event and complete successfully when the event is received. The second step will run when the event step waiting on job B has completed.
    So your chain would look something like
    begin
    dbms_scheduler.create_chain('chain1');
    dbms_scheduler.define_chain_event_step('chain1','stepB',
    'tab.user_data.object_name = ''JOB_B'' and
    tab.user_data.event_type IN(''JOB_SUCCEEDED'',''JOB_FAILED'',''JOB_STOPPED''',
    'sys.scheduler$_event_queue,myagent');
    dbms_scheduler.define_chain_step('chain1','stepC','finalTaskProg');
    dbms_scheduler.define_chain_rule('chain1','true','start stepB');
    dbms_scheduler.define_chain_rule('chain1', 'stepB completed', 'start stepC');
    dbms_scheduler.define_chain_rule('chain1', 'stepC completed', 'end');
    dbms_scheduler.enable('chain1');
    end;
    And your job would point to the chain and run whenever job_A completes (similar condition and queue_spec). It would keep waiting till job_B runs and then the final task would run and it would complete.
    2) The second way is to require job_A to insert a row into a table somewhere. Rule conditions can access table data so you could have job_C have an event condition which checks for a completion event for job_B and checks the table to see whether job_A has completed. Then the code you run should then remove the row in the table
    e.g.
    queue_spec=>'sys.scheduler$_event_queue,myagent'
    event_condition=>'tab.user_data.object_name = ''JOB_B'' and
    tab.user_data.event_type IN(''JOB_SUCCEEDED'',''JOB_FAILED'',''JOB_STOPPED''' and
    (select count(*) from mytab where col='job_A')>0'
    Then when running C do - delete from mytab where col='job_a';
    Both of these assume that job_A always completes before job_B but both of these will then run job_C after job_B completes. Modifying either of these so that either job A or B runs first is also possible by having another job that waits on A rather than B.
    Hope this helps, if you have any more questions, let me know.
    -Ravi

  • Windows Error: 0x80070006 - The handle is invalid

    Hi community
    I set up a new App-V server App-V 5.0 SP1 including
    Management, Publishing and Reporting Server. Additionally I installed HF04
    (KB2940354) on it.
    I published an App-V package for Domain Computers.
    On the other side I've a RDS App-V Client with
    App-V 5.0 SP2 incl. HF02 (KB2934349). The RDS Client is configured via GPO and I verified that the settings are now correct.
    If I try to synchronize from RDS Client manually I get following output in Power Shell:
    PS C:\Users\<username>> Sync-AppvPublishingServer
    cmdlet Sync-AppvPublishingServer at command pipeline position 1
    Supply values for the following parameters:
    ServerId: 1
    Sync-AppvPublishingServer : Application Virtualization Service failed to complete requested operation.
    Operation attempted: RefreshPublishingServer.
    Windows Error: 0x80070006 - The handle is invalid
    Error module: Publishing. Internal error detail: 45500D2780070006.
    Please consult AppV Client Event Log for more details.
    At line:1 char:1
    + Sync-AppvPublishingServer
    + ~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidResult: (:) [Sync-AppvPublishingServer], ClientException
        + FullyQualifiedErrorId : RefreshPublishingServerError,Microsoft.AppV.AppvClientPowerShell.SyncAppvPublishingServer
    In App-V Eventlog on the RDS Client there are 2 Events resulting my manual action:
    1. Event ID 19203
    HttpRequest sendRequest failed.
    URL: http://<URL>:82 /
    Error code: 0x45500D27 - 0x80070006
    2. Event ID 10102
    Getting server publishing data failed.
    URL: http://<URL>:82 /
    Error code: 0x45500D27 - 0x8007000
    Who can help me out here?

    Hi Steve
    Meanwhile I found out that everything runs fine if I implement App-V Client settings manually on the RDS Client instead of populating with GPO. I use the same GPO settings like in our development environment where everything runs good.
    Here the desired output (anonymized):
    PS C:\Users\<user>> Get-AppvPublishingServer
    Id                     
    : 1
    SetByGroupPolicy        : True
    Name                   
    : <Name>
    URL                    
    : http://<FQDN>:82
    GlobalRefreshEnabled    : True
    GlobalRefreshOnLogon    : True
    GlobalRefreshInterval   : 1
    GlobalRefreshIntervalUnit                          
    : Hour
    UserRefreshEnabled      : False
    UserRefreshOnLogon      : False
    UserRefreshInterval     : 1
    UserRefreshIntervalUnit : Hour
    PS C:\Users\<user>> Get-AppvClientConfiguration
    Name                   
    Value                      
    SetByGroupPolicy
    PackageInstallationRoot D:\App-V\InstallationRoot  
    True
    PackageSourceRoot       False
    LocationProvider        False
    AutoLoad               
    2                          
    True
    EnablePackageScripts    1                          
    True
    ReestablishmentInterval 5                          
    False
    ReestablishmentRetries  3                          
    False
    CertFilterForClientSsl  LOCAL_MACHINE\MY\1.3.6.1.5.5.7.3.2 
    False
    VerifyCertificateRevocationList                    
    1 False
    SharedContentStoreMode  0                          
    False
    MigrationMode          
    0                          
    False
    RoamingFileExclusions   False
    RoamingRegistryExclusions                          
    SOFTWARE\CLASSES    False
    AllowHighCostLaunch     0                          
    False
    PackageStoreAccessControl                          
    0 False
    IntegrationRootUser     %localappdata%\Microsoft\AppV\Client...  
    True
    IntegrationRootGlobal   D:\App-V\RootGlobal        
    True
    VirtualizableExtensions exe,com,bat,cmd,vbs,ps1,cpl,jar,wsf,...  
    False
    IgnoreLocationProvider  0                          
    False
    ReportingEnabled        0                          
    False
    ReportingStartTime      False
    ReportingRandomDelay    False
    ReportingInterval       False
    ReportingServerURL      False
    ReportingDataCacheLimit False
    ReportingDataBlockSize  False
    ExperienceImprovementOptIn                         
    0 True
    EnablePublishingRefreshUI                          
    0 False
    ProcessesUsingVirtualComponents                    
    {%SystemRoot%\explorer.exe, %Program...                       
    False
    EnableDynamicVirtualization                        
    1 False

  • How to I trigger an event based on the status of a pushbutton​?

    I am trying to trigger an event based on the ON/OFF status of a pushbutton.  When I click the pushbutton to the ON position, I want the event structure in a loop to trigger on each iteration until the pushbutton goes back to the OFF position, either manually or programatically.  Is there an easy way to accomplish this?
    Many thanks.
    Solved!
    Go to Solution.

    Well, lets read the original question:
    diarmaede wrote:
    I am trying to trigger an event based on the ON/OFF status of a pushbutton.  When I click the pushbutton to the ON position, I want the event structure in a loop to trigger on each iteration until the pushbutton goes back to the OFF position, either manually or programatically.
    I cannot see anything about "switch until released", only "click to ON" and "OFF manually or programmatically". That seems to be a plain switch action.
    JHourigan wrote:
    If I want to simply detect a button push event. I set the mechanical action of the boolean button to switch-until-released. Then I use the mouse down event structure on that button to detect the event.  It avoids having to include a case structure logic to address the state of the boolean in an Value Change event structure. The button immediately returns to the false condition after release.
    So far you are not dealing with the OFF handling at all, which seems to be a requirement. There must be more to it that you mention to get this working as intended. The value of the boolean needs to be constantly monitored anyway, so it might be difficult to do things without a case structure. I am still confused about the logic of it all ....
    You should really include a small working example VI so we can see what you are talking about. Thanks!
    LabVIEW Champion . Do more with less code and in less time .

  • Wmode=opaque, origin of x, y of mousewheel event based on parent frame

    wmode=opaque, origin of x, y of mousewheel event based on parent frame.
    as a result , mousewheel on the dropdown of combo box, dropdown closed.
    Header Area
    Tab Area
    SWF Area is here.
    wmode=opaque
    The x, y of mousewheel is missing for value of top and left area.
    wmode=window
    The x, y of mousewheel is correct.

    http://forums.adobe.com/thread/628143

  • How to catch window event on jApplet

    Could you please let me know, How to catch �activate window� event on Japplet page. I am using the following class.
    public class CtApplet
          extends JApplet
          implements Runnable, ErrorHandlerI could implement the same on Jframe by using the following Api�s. I assume they don�t exist on Japplet.
    this.addWindowListener (��.);
    class ��
          extends java.awt.event.WindowAdapter
        public void windowActivated (WindowEvent e)
            ��..
    }Edited by: samtek on Oct 30, 2007 7:59 PM
    I extened my japplet class from WindowListener, and added function, windowActivated(), But not able to catch the event.

    Hi,
    I would try AWTEventListener; it should work with a JFrame.
    Now I probably could have done this better but I made 2 classes for this.
    HyperFrame to run the applet as an Application and have the Frame handle
    the AWT events, and AWTEventManager to process the Events when running as an Applet. In the future I will probably merge into 1 AWTEventManager.
    https://hyperview.dev.java.net/source/browse/hyperview/www/HyperView299/AWTEventManager.java?rev=1.3&view=markup
    https://hyperview.dev.java.net/source/browse/hyperview/www/HyperView299/HyperFrame.java?rev=1.11&view=markup
    Anyway, omit the View/List specific code and look at the setup; it should work for you. BTW Not ATM multi instance friendly but on my todo list several hundred down.
    You will need to tweak the Thread control as well; probably AWTEventManager is the class to study as it really shows all you need to implement an AWTEventListener
    Good Luck!
    (T)

Maybe you are looking for