CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Threaded View

  1. #1
    Join Date
    Jun 2008
    Posts
    12

    Question c# textbox problem

    Hi guys,

    Random problem here:

    I have got a form inside a MDI Parent using this code to make it 'floatable':

    Code:
            private void btn_CustMaintenance_Click(object sender, EventArgs e)
            {
                frm_CustomerMaintenance oCustomerMaintenance = new frm_CustomerMaintenance();
                oCustomerMaintenance.TopLevel = false;
                this.Controls.Add(oCustomerMaintenance);
                oCustomerMaintenance.StartPosition = FormStartPosition.CenterScreen;
                oCustomerMaintenance.Show();
                btn_CustMaintenance.Enabled = false;
            }
    When I add a textbox to the CustomerMaintenance form with some text in it, it acts very strangely. If you click on the text in the textbox, usually the text cursor thing would appear where you have clicked on the text, but it doesnt, it just goes to the left hand side of the text.

    If I put a textbox on the MDI page though, then that works correctly.

    Has anyone else had this problem? If so, how did you sort it? If no-one has had this problem, can you try and simulate it and come up with a solution! Have been searching for over a week now and really cant figure it out!

    Cheers,
    William
    Last edited by cheesepie; June 19th, 2008 at 04:26 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

Featured