7 Replies - 3719 Views - Last Post: 20 May 2012 - 05:38 PM Rate Topic: -----

#1 arafath077  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 22
  • Joined: 17-November 11

problem when open all form in panel

Posted 16 May 2012 - 08:46 AM

how to add all windows form on the same panel in vb .net?
Is This A Good Question/Topic? 0
  • +

Replies To: problem when open all form in panel

#2 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 9497
  • View blog
  • Posts: 35,844
  • Joined: 12-June 08

Re: problem when open all form in panel

Posted 16 May 2012 - 09:34 AM

... what? Would you rephrase that?
Was This Post Helpful? 0
  • +
  • -

#3 arafath077  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 22
  • Joined: 17-November 11

Re: problem when open all form in panel

Posted 16 May 2012 - 10:00 AM

I have 4 forms. Form1,breakfast,Dinner & lunch.. Form1 there is panel. in a panel 3 radiobutton(BF, lunch, dinner) . When check a radiobutton i want to view thath 3 form inside the panel . but i can open the form. which open first that always show in front. but when open another one that form open backside of the form(ex : when open BF form, after that i open dinner form that is open under BF form)
Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged

        Dim bf As New FrmBrkfast
        bf.TopLevel = False
        bf.Parent = Me.Panel1
        Me.Panel1.Controls.Add(bf)
        bf.Show()

    End Sub

This is the code which i write. i write like these 3 radiobutton..
Was This Post Helpful? 0
  • +
  • -

#4 arafath077  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 22
  • Joined: 17-November 11

Re: problem when open all form in panel

Posted 16 May 2012 - 10:00 AM

I have 4 forms. Form1,breakfast,Dinner & lunch.. Form1 there is panel. in a panel 3 radiobutton(BF, lunch, dinner) . When check a radiobutton i want to view thath 3 form inside the panel . but i can open the form. which open first that always show in front. but when open another one that form open backside of the form(ex : when open BF form, after that i open dinner form that is open under BF form)
Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged

        Dim bf As New FrmBrkfast
        bf.TopLevel = False
        bf.Parent = Me.Panel1
        Me.Panel1.Controls.Add(bf)
        bf.Show()

    End Sub

This is the code which i write. i write like these 3 radiobutton..
Was This Post Helpful? 0
  • +
  • -

#5 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 9497
  • View blog
  • Posts: 35,844
  • Joined: 12-June 08

Re: problem when open all form in panel

Posted 16 May 2012 - 10:10 AM

If you want to see the contents of a form in a panel you'll have to copy all the code and controls from a form to a 'user control'.. and then you can embed that into a panel to hide and show based on radio button selection.
Was This Post Helpful? 0
  • +
  • -

#6 arafath077  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 22
  • Joined: 17-November 11

Re: problem when open all form in panel

Posted 18 May 2012 - 06:42 PM

could you show me the sample code?
Was This Post Helpful? 0
  • +
  • -

#7 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 9497
  • View blog
  • Posts: 35,844
  • Joined: 12-June 08

Re: problem when open all form in panel

Posted 18 May 2012 - 07:07 PM

Ah.. There's no way for me to show you code on how to right click on a form, view the designer, and copy the code out.
Was This Post Helpful? 0
  • +
  • -

#8 arafath077  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 22
  • Joined: 17-November 11

Re: problem when open all form in panel

Posted 20 May 2012 - 05:38 PM

Yahh. Problrem solved. Thank you very much.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1