-
November 7th, 2006, 07:17 AM
#1
Window loses focus
I have a dilemma:
I have a main form that users can select videos from and they open in a new window with a windows media contraol on it.
The new window is set to open full screen but also has a button on it to return to main menu. I have the media player controls layout set to mini as the user needs to be able to stop the clip playing and for the button to appear to returnt o main menu.
There are 2 problems inn that if the user double-click during playback, the form seems to lose focus and disappear behind the main form. The other is that if the user clicks on the stop button, the form again seems to lose focus and remains running behind the main form. I need the main form to remain open so that it covers the taskbar so the users cannot get to the start button etc.
Please help . . . Some code:
Code:
The Main form:
Private Sub cmdTamarRun_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdTamarRun.Click
sString = "C:\Lifeboat Video Browser\videos\TamarRun.mpg"
frmVideo.Show()
End Sub
Code:
The Video Form:
Public Class frmVideo
Private Sub frmVideo_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Me.BringToFront()
AxWindowsMediaPlayer1.URL = sString
End Sub
Private Sub cmdMain_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdMain.Click
frmMain.BringToFront()
Me.Close()
End Sub
End Class
-
November 7th, 2006, 09:05 AM
#2
-
November 7th, 2006, 09:28 AM
#3
Re: Window loses focus
Sorted it - I had TopMost set to True!!!
DOH
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|