Solved

Set Window on Top when Media Player is full screen

Posted on 2004-04-27
5
350 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
  • 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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Suggested Solutions

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

809 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