setting one forms data from other form

smriti

Regular
Joined
Jan 7, 2005
Messages
54
Hi friends,

I am developing a windows forms application.
I am strucked up with a problem.
I had two forms.
Main form
sub form.

First i displayed main form and from main form i invoked sub form.
later i want to exit from sub form nd display some information on main form.

My program flow is like this

class MainForm

sub Mainform_load
GetData()
end sub

sub btn_click

subform.activate()

end sub

sub dislayData()

me.label1.text="hi"

end sub

end mainform class



class subform

subform_load()

showData()

end sub

sub exitbtn_click()

dim obj as new Mainform
obj.displayData()-----here i am calling main form method so as to display the label on main form
but the label is not getting displayed with the text.

end sub


Is there any other way to do this?

Thanks
 
smriti said:
Hi friends,

I am developing a windows forms application.
I am strucked up with a problem.
I had two forms.
Main form
sub form.

First i displayed main form and from main form i invoked sub form.
later i want to exit from sub form nd display some information on main form.

My program flow is like this

class MainForm

sub Mainform_load
GetData()
end sub

sub btn_click

subform.activate()

end sub

sub dislayData()

me.label1.text="hi"

end sub

end mainform class



class subform

subform_load()

showData()

end sub

sub exitbtn_click()

dim obj as new Mainform
obj.displayData()-----here i am calling main form method so as to display the label on main form
but the label is not getting displayed with the text.

end sub


Is there any other way to do this?

Thanks

Can u pls use the VB Quote to make me able to solve ur problem easily
 
Back
Top