Solved

Set Window on Top when Media Player is full screen

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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…

734 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