topmost window

Good day to everyone...

My problem is about the active mainform of my application which is top level form.  All settings has already been set, compiled with no errors and deployed at the workstation.  This small VFP program is just to warn me at the server if a certain workstation is already on-line.  But when the user start any on-line games, and I wanted to send message to him, my little vfp program will not show's up at the top of the active windows of games but only at the background. which the user doesn't know if he has a message from me.  Maybe there is something in my code which I miss.

Any help is very much appreciated.

Amado




Answer this question

topmost window

  • wildshark-uk

    >This should keep your form on top of the game window, unless the games switch to a completely different resolution.

    Christof,

    Curious.  Why would the resolution switching of the game effect the ability of a window to be AlwaysOnTop

    I've run into cases in Win2K and above where a window could not come to the foreground because it was not owned by the foreground process (it just blinks in the taskbar), but have never heard of a game's resolution effecting windows in this manner.

    I created a workaround for the blinking taskbar behavior awhile back...
    http://www.tek-tips.com/faqs.cfm fid=4262
    ...but was unaware that there maybe another potential problem like you describe for bringing a window to the front.  Any additional information on this would be appreciated.



  • tricky_richy

    Hi Craig,

    >
    Why would the resolution switching of the game effect the ability of a window to be AlwaysOnTop

    Well, games don't really switch the resolution. They use a particular feature in DirectX called "full screen exclusive mode". This means that the application receives full control over the video adapter. The details of this mode changed in various DirectX versions. Whether Windows can gain back control over the video adpater to display the desktop might depend on the version of DirectX as well as the flags used by the DirectX application.


  • CyberDogg

    Good day craig,

    It works well in XP & WIN2000, but in windows 98, showing it at the top, it sometimes doesn't work at all specially in MU Games and or Conquer where this games will automatically change the resolution setting upon opening.

    Amado



    Ok craig thanks a lot for this matter... i will try it tomorrow and i'll just let you know on monday if it work or not. 

    Thank you very much and more power

    Amado




  • Diesel31

    Here's how it happened, I make a small program installed in a workstation as a 'Net Time Monitoring System which I controlled at the server, at start-up it has no problem it works fine, if I shutdown the workstation & or restart it works well and send to the server the necessary data I need, but when I send a message it will shows-up as a foreground from other game windows but it don't shows-up at some other game windows like in CONQUER, MU and any other online games.

    If you have any other solution for this which is easier, thanks in advance for sharing it.

    Amado


  • Scott98390

    thank you Christof, it works fine now.

    amado

  • happyt

    I'm curious one of those games that appear to exhibit the problem will prevent the code I have posted at the link provided above (my earlier post) from forcing your window on top of the game.  Could you try it and post back whether it worked

    I haven't run into anything that that code will not force to the foreground, and I'd be interested if there is something else that needs to be taken into consideration such as the games you listed and the apparent resolution switching.  I've seen this resolution switching before with games like Rome Total War, but was not aware that it could cause problems when trying to bring a VFP window to the foreground.

  • nobodyman

    Hi Amado,

    Did you set the AlwaysOnTop property to .T. This should keep your form on top of the game window, unless the games switch to a completely different resolution.



  • ssmile73

    In this manner we will use also this what you called "full screen exclusive mode"  so how we will do this in VFP

    THANK YOU VERY MUCH

  • Larry Surat

    Hi Amado,

    my Struct class has got one sample that changes the current resolution (ftp:/ftp.foxpert.com/struct.zip). I'm not sure whether this works while playing a game, though. In any case would the game likely be interrupted and the player anything but happy. <s>


  • Habbit

    Yes I set the AlwaysOnTop property to True.    That last line maybe is the cause 'SWITCH TO A COMPLETELY DIFFERENT RESOLUTION'.  some Games has its own resolution setting.

    Can I ask a free code for VFP application that will automatically adjust to current resolution when I activate my form So that it will be always on top

    Thank you very much.

    Amado


  • topmost window