Results 1 to 5 of 5

Thread: [02/03] How to Enforce a Reference box

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2008
    Posts
    13

    [02/03] How to Enforce a Reference box

    Hi all,

    I was just wondering what would be the best way to enforce a reference box?

    I know it goes something like this:

    Code:
    If RealName.here Is True Then
                   ' Insert Code to enforce reference box here
              End If
    Although I'm not sure what exactly to do with this.

    Any help would be appritiated!

    Thanks,
    A
    Smoking cigarettes is like World of Warcraft.

    You never quit, you only take breaks.

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [02/03] How to Enforce a Reference box

    It's not clear what you mean. What's a "reference box" and what about it are you trying to enforce? This sounds like your own terminology.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    New Member
    Join Date
    Oct 2008
    Posts
    13

    Re: [02/03] How to Enforce a Reference box

    Oh sorry about that!

    I'm trying to make it so when you click on a specific button in the program, it opens up a new window. In the new window there would be a data grid behind it.
    Smoking cigarettes is like World of Warcraft.

    You never quit, you only take breaks.

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [02/03] How to Enforce a Reference box

    I can't see how the code in your first post relates to that, or the thread title for that matter. If you want to show a form you create an instance and call its Show or ShowDialog method, depending on whether you want a modal dialogue or not.
    vb.net Code:
    1. Dim f2 As New Form2
    2.  
    3. f2.Show()
    What do you mean by a data grid "behind it"? If you want a DataGrid on a form then you add one to that form in the designer. I don't know what a DataGrid behind a form would be for though. Maybe you should try to provide a full and clear description of what you're actually trying to achieve.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  5. #5

    Thread Starter
    New Member
    Join Date
    Oct 2008
    Posts
    13

    Re: [02/03] How to Enforce a Reference box

    I'm trying to achieve is something like this:

    Code:
    Case "RealName"
                           If Not IsNothing(frmRealName) Then
                                 
                               If Not frmRealName.IsDisposed Then
                                  frmRealName.WindowState = FormWindowState.Normal
                                    frmRealName.BringToFront()                     
    Else
                                    frmRealName = New frmRealName
                                    frmRealName.MdiParent = Me
                                    frmRealName.Show()
                                    frmRealName.WindowState = FormWindowState.Normal
                                End If
                            Else
                     
                                frmRealName = New frmRealName
                                frmRealName.MdiParent = Me
                                frmRealName.Show()
                                frmRealName.WindowState = FormWindowState.Normal  
                            End If
    Basically, I want a Data Grid attached to this so that the new window is populated with data.
    Smoking cigarettes is like World of Warcraft.

    You never quit, you only take breaks.

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