Solved

Set Window on Top when Media Player is full screen

Posted on 2004-04-27
5
347 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
Comment Utility
I works for me I use win XP
0
 
LVL 26

Expert Comment

by:EDDYKT
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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 utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

771 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now