Adding a Form in Panel in vb.net

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Gobindap
    New Member
    • Feb 2013
    • 25

    Adding a Form in Panel in vb.net

    I am using following code to add a form in Panel.

    Dim ChildForm As New UserSetting
    ChildForm.TopLe vel = False : ChildForm.AutoS croll = True
    ChildForm.Paren t = Me.Panel1
    Me.SplitContain er2.Panel1.Cont rols.Add(ChildF orm)
    ChildForm.Show( )

    This code add the form and give all access but when I want to edit text in the text box, it does does not get clicked in the middle of text (cursor for wring in not enabled). But it does so if i move cursor from via keyboard.

    I am going to make my question clear here.
    If i click on textbox having some text in it to edit whole text gets selected. If i double click cursor remains in initial position instead of place i click. By no means it does not get in position by mouse. But it does if i move cursor from the keyboard. This problem is not only for particular textbox but for all textbox that are in the added form.

    If I just use form.showdialog , it gives all access but form does not get fit inside the panel.

    textbox property is also fine i.e. readonly false
    for panel form property is also isMdicontainer true



    Please help
    Thanking you in advance.
Working...