Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Jan 2003
    Posts
    867
    Thanks
    4
    Thanked 8 Times in 8 Posts

    Startup form covers other forms?

    This should be a fairly basic request but it's had me stumped for a while now. I have a startup form with a couple menus. I select an option from a menu and want another form to come up. This worked fine until I added some text to the startup form. Now this text shows up on top of other forms. When I select a new form, I want it to be on top of my startup form.

    This is my code to popup the new form:
    Code:
        Private Sub sdvinfo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles sdvinfo.Click
            Cursor.Current = Cursors.WaitCursor
            Dim fsdvinfo as sdvinfo_form = New sdvinfo_form
            fsdvinfo.Parent = Me
        End Sub
    The form is created, but most of it is hidden by the text from my startup form.

  • #2
    Senior Coder nikkiH's Avatar
    Join Date
    Jun 2005
    Location
    Near Chicago, IL, USA
    Posts
    1,973
    Thanks
    1
    Thanked 32 Times in 31 Posts
    Is this Windows Forms?

    fsdvinfo.Show(Me)
    http://msdn2.microsoft.com/en-us/lib...form.show.aspx
    Last edited by nikkiH; 11-30-2006 at 04:24 PM.

    If this post contains any code, I may or may not have tested it. It's probably just example code, so no getting knickers in a bunch over a typo, OK? If it doesn't have basic error checking in it, such as object detection or checking if objects are null before using them, put that in there. I'm giving examples, not typing up your whole app for you. You run code at your own risk.
    Bored? Visit
    http://www.kaelisspace.com/

  • #3
    Regular Coder
    Join Date
    Jan 2003
    Posts
    867
    Thanks
    4
    Thanked 8 Times in 8 Posts
    Yes, sorry I forgot to specify this is for Windows Forms. I came across that article while searching and when I try fsdvinfo.show(me) I get an error: "Too many arguments to 'Public Sub Show()'".

    I'll look for more info at that link though. Thank you.

  • #4
    Senior Coder nikkiH's Avatar
    Join Date
    Jun 2005
    Location
    Near Chicago, IL, USA
    Posts
    1,973
    Thanks
    1
    Thanked 32 Times in 31 Posts
    Note: This method is new in the .NET Framework version 2.0.

    You may need to stick with setting parent if you're still using 1.1.
    fsdvinfo.Parent = Me
    fsdvinfo.Show

    If this post contains any code, I may or may not have tested it. It's probably just example code, so no getting knickers in a bunch over a typo, OK? If it doesn't have basic error checking in it, such as object detection or checking if objects are null before using them, put that in there. I'm giving examples, not typing up your whole app for you. You run code at your own risk.
    Bored? Visit
    http://www.kaelisspace.com/


  •  

    Posting Permissions

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