Current location: Hot Scripts Forums » Programming Languages » Windows .NET Programming » I need help with forms..


I need help with forms..

Reply
  #1 (permalink)  
Old 03-11-04, 01:05 AM
tazaramya tazaramya is offline
New Member
 
Join Date: Mar 2004
Location: Salem, Or
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Smile I need help with forms..

ok! This is what I wan to do.....

I have
frmToolKit (which is my main form)
it has an image and a RadioButtonList (called radOption)
then a HR

Under the HR I would like to show a different form based on the
radio button pressed. Example:

if radOption.SelectedIndex = 0 Then
frmLogFa.Show (or something like that)
end if

I'm not sure if this will work but how do I tell it to display on my main form?
kinda like frames but not really.

HELP!!!
Reply With Quote
  #2 (permalink)  
Old 03-16-04, 12:06 PM
TLWallace's Avatar
TLWallace TLWallace is offline
New Member
 
Join Date: Mar 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by tazaramya
ok! This is what I wan to do.....

I have
frmToolKit (which is my main form)
it has an image and a RadioButtonList (called radOption)
then a HR

Under the HR I would like to show a different form based on the
radio button pressed. Example:

if radOption.SelectedIndex = 0 Then
frmLogFa.Show (or something like that)
end if

I'm not sure if this will work but how do I tell it to display on my main form?
kinda like frames but not really.

HELP!!!
Here is one way to do subforms in VB.NET

==================[FrmMain]============
Private m_FrmSubForm AsNew FrmToolKit

Private m_RefSubFormIndex AsInteger

Private IsInitializing AsBoolean

PublicSubNew()

MyBase.New()

IsInitializing =
True

'This call is required by the Windows Form Designer.

InitializeComponent()

'Add any initialization after the InitializeComponent() call

IsInitializing = False

EndSub

PrivateSub radOption_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles radOption.CheckedChanged

If IsInitializing ThenExitSub 'Get out if you're intializing this form

Me.Panel1.Controls.Add(m_FrmSubForm)

m_FrmSubForm.Show()

'Set the index of this control

m_RefSubFormIndex = Me.Panel1.Controls.GetChildIndex(m_FrmSubForm)

EndSub
====================[end FrmMain]=================

==================[FrmToolKit]============
PublicSubNew()

MyBase.New()

'This call is required by the Windows Form Designer.

InitializeComponent()

'Add any initialization after the InitializeComponent() call

Me.SetTopLevel(False)

EndSub


=================[end FrmToolKit]==========
__________________
Arkitech EBC Corporation

<ST1:ADDRESS w:st="on"><ST1:STREET w:st="on">PO Box 294873

<ST1LACE w:st="on"><ST1:CITY w:st="on">Lewisville, <ST1:STATE w:st="on">Texas <ST1OSTALCODE w:st="on">75029-4873

Email : tcode@arkitechebc.com

Website: http://www.ArkitechEBC.com

</ST1OSTALCODE></ST1:STATE></ST1:CITY></ST1LACE></ST1:STREET></ST1:ADDRESS>
Reply With Quote
  #3 (permalink)  
Old 03-16-04, 08:52 PM
tazaramya tazaramya is offline
New Member
 
Join Date: Mar 2004
Location: Salem, Or
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks for your example. I don't have a FrmMain should I create this?

Susan
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
load and unload forms in VB.Net warpminded Windows .NET Programming 3 03-16-04 11:07 AM
Dynamic Forms - How do I add Combo Boxes on the fly assemblage JavaScript 0 02-06-04 10:03 AM
Calling D2K forms jacobe ASP 0 01-10-04 11:39 PM
how to disable "Enter" key in post forms magda JavaScript 2 11-08-03 12:07 AM
Passing a value between forms lordmerlin PHP 1 10-07-03 05:43 AM


All times are GMT -5. The time now is 02:20 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.