Solved

Set Window on Top when Media Player is full screen

Posted on 2004-04-27
5
355 Views
Last Modified: 2006-11-17
Hi All,

I want to show/set my Window on Top event when the Media Player is full screen,

i used the regular windows API [ SetWindowPos ] with hwnd_Topmost and other constants required,

it make the window on TOP for other windows but it donot make the window on top of Full Screen Media player

Need Quick Help
Thankx in Advance
0
Comment
Question by:meet_zorrer
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 26

Expert Comment

by:EDDYKT
ID: 10929068
I works for me I use win XP
0
 
LVL 26

Expert Comment

by:EDDYKT
ID: 10929086
Use this

Option Explicit
Private Const SWP_NOACTIVATE = &H10
Private Const SWP_NOMOVE = &H2
Private Const SWP_NOSIZE = &H1

Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Private Sub Command1_Click()
SetWindowPos Me.hwnd, -1, 0, 0, 0, 0, SWP_NOACTIVATE Or SWP_NOMOVE Or SWP_NOSIZE
End Sub
0
 
LVL 4

Author Comment

by:meet_zorrer
ID: 10936463
So success yet :( :(

I run you code and click the Command1 to fire the Command1_Click function the form gets Always on top.

Now i run the media player and my Form is over the top of media player now.

BUT

when i press Alt+Enter to make Media player full screen my form goes back and media player full screen covers all the screen of the monitor

I tried it on Win2K and XP both have same affect, any one would like to say something here????
0
 
LVL 26

Accepted Solution

by:
EDDYKT earned 500 total points
ID: 10937794
USe timer

Private Sub Timer1_Timer()
SetWindowPos Me.hwnd, -1, 0, 0, 0, 0, SWP_NOACTIVATE Or SWP_NOMOVE Or SWP_NOSIZE
End Sub

Private Sub Form_Load()
Timer1.Enabled
Timer.Enabled = True
End Sub
0
 
LVL 4

Author Comment

by:meet_zorrer
ID: 10938215
ok this works but why doesn't the the
form_deactivate
and
form_lostfocus
events fire as i coded in those events but these events don't fire as i've did the debugings :p
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question