last day (14 days later) » 

10:27 AM
2
A: textbox value not getting another form button click event in winforms

Nirav KamaniYou are creating new instance in every click event. Dim obj As New VisitorExitsign So the values are set in the new objects but not in existing object. So actually you have to refer to existing object of VisitorExitsign. EDIT: For example: You are creating form VisitorExitsign in some meth...

 
how i have to refer existing object?
what you mean y form showing code?
 
@user3252014 In your code where you are creating the form take its reference..that's all.
 
sir you can see i am creating form refernce inside the button click event
Dim obj As VisitorExitsign , i declared like this ,,and i try to cal txtbox value ,but still am not getting\
 
@user3252014 you are creating new VisitorExitsign in click event while you have to refer existing one...
@user3252014 Check the EDIT i hope it will help you...
 
sir i am working on vb.net application
 
10:28 AM
You just need to write your vb.net code to assign reference at the time of creating form...
nothing else...
i just removed c# tag from your question..
 
sir i wrote code like this: Dim obj As VisitorExitsign
Dim visitorid As String = obj.txtvisitoridExit.Text
but this is not working
 
i want code where you opened form..
www.youtube.com/watch?v=LbSdHau8STc
take a look at this...
hello?
take a look at this too...
0
Q: How to pass value of a textbox from one form to another form in vb.net

user1460610If I have a value stored into a textbox of form1 and I have to pass that value into an another textbox of another form2. What is the method to do this passing values from one form to another?

this will show you what is mistake in your code...
you got answer or not?
 
i am trying to find ot
out
give me 5 mnts
 
ok..
 
10:45 AM
sir
i checkd you tube vedio and your link ,i done code that way only ..but
 
did you checked the Obj.Show code in above question...
it will open new form...
and in your code you created new form..
but not shown...
and assigning object to form which is not shown...
so every time you are clicking button you are creating new object of form and assigning value to it...
Take some time...
debug the code...
i am unable to give exact code because i am not aware og vb.net too much.... but the mistake you are making is too common...
2) You are not giving code where you are opening form...
and how it works..
 
sir two form already opened in mdiparant form am opening two from togethar like this:
frmVX = New VisitorExitsign
frmVX.Location = New Point(781, 0)
frmVX.MdiParent = Me
frmVX.Show()

frmVE = New VisitorInfo()
frmVE.Location = New Point(0, 0)
frmVE.MdiParent = Me
frmVE.Show()
 
where above code is written...
 
in mdi parant form
 
and where frmVX is defined...
make frmVX global..
define it at class level..
 
10:54 AM
that is global only
i defined in class leval
 
remove Dim obj As New VisitorExitsign
from button click..
give me the code where you are assigning text in second textbox...
?
i hope you can do like..
 
how?
 
frmVX.textbox=value...
or frmVE.textbox=value..
put your proper textbox and value...
 
this i have to give in visitorinfo
?
 
so make frmVE.textbox.text=value
textbox means your textbox and value means value you want to assign..
 
10:59 AM
sir i can give this in visitorinfo form
?
 
yes..
 
sir frmvx is declared in MDIparant form like Dim frmVX As VisitorExitsign this
 
how i can get this frmvx in vistorinfo page
 
make some variable in frmVX class where you can assign the reference of frmVE..
 
11:02 AM
i didnt get u..
 
debug whole code...
step by step...
you will understand...
just look at the question you asked i got 3 upvotes so one maybe given by you... so the answer is right you just need to manipulate it in your way....
all the best...
 
ok,,sir thanks a lot for your help
 
11:28 AM
got solution or not?
 
12:12 PM
now i got..
 

last day (14 days later) »