Results 1 to 4 of 4

Thread: Strange Problem with mdi tabcontrol

Threaded View

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    May 2007
    Posts
    164

    Strange Problem with mdi tabcontrol

    Code:
    
    Public Class Form1
           Dim WebBrowserA, WebBrowserB As New WebBrowser
    
        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        ' WebPage   Inside the Tabcontrol
             Dim MyFristPage As New Form
            MyFristPage.Size = New Point(500, 500)
            MyFristPage.Location = New Point(500, 500)
            MyFristPage.Text = "Loading"
            TabControl1.TabPages.Add(MyFristPage)
            WebBrowserA.Dock = DockStyle.Fill
            WebBrowserA.Parent = MyFristPage
            WebBrowserA.Navigate("http://www.cyberspacers.com/games/Piano.swf")
         
               
    ' Webpage on MainForm
            WebBrowserB.Parent = Me
            WebBrowserB.Top = Me.Top - 50
            WebBrowserB.Left = Me.Width / 2
            WebBrowserB.Width = Me.Width / 2
            WebBrowserB.Height = Me.Height - 50
           
            WebBrowserB.Navigate("http://www.cyberspacers.com/games/Piano.swf")
       
        End Sub
    
        Private Sub Form1_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Resize
            TabControl1.Width = Me.Width / 2
            WebBrowserB.Left = Me.Width / 2
            WebBrowserB.Width = Me.Width / 2
        End Sub
    I have problem to play the piano swf inside the TabControl1 (WebBrowserA), but i can play piano swf within the main form (WebBrowserB).

    Anyone know why, and the method to solve it to play at tabcontrol1
    Last edited by edwinho; May 24th, 2012 at 01:47 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width