[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
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.
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.
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:
Dim f2 As New Form2
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.
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.