943,654 Members | Top Members by Rank

Ad:
  • VB.NET Discussion Thread
  • Unsolved
  • Views: 1074
  • VB.NET RSS
Jan 8th, 2008
0

Vb.net Help!!!!!

Expand Post »
hi
i have a numericupdown box on my first form and in the next form i want the number selected in the numericupdown box to produced that number of text boxs in the next form.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
jimmer12 is offline Offline
4 posts
since Jan 2008
Jan 8th, 2008
0

Re: Vb.net Help!!!!!

u mean that value from the numericupdown will read in next from?
i suggest to use public shared variable to accomodate the value from numericupdown.then u can call the variable in other form.
Reputation Points: 1182
Solved Threads: 392
Posting Sensei
Jx_Man is offline Offline
3,138 posts
since Nov 2007
Jan 8th, 2008
0

Re: Vb.net Help!!!!!

is it a web application or a regular program?

if it is a regular program:

dim whatever as integer
whatever = form1.dropdownlist1.selectedvalue

if it is a web application, pass the value

on the first form:

Context.Items.Add("VAL", dropdownlist1.selectedvalue)
Server.Transfer("~/form2.aspx", True)

on the second form

dim whatever as integer
whatever = Context.Items("VAL")
Team Colleague
Reputation Points: 14
Solved Threads: 29
Posting Whiz in Training
ericstenson is offline Offline
293 posts
since Dec 2007
Jan 8th, 2008
0

Re: Vb.net Help!!!!!

you cannot call controls directly cause friends status of controls.even if you change the modifiers to public. so i suggest to use public shared variable. you can access this variable form other form...
this declaration of the variable :
VB.NET Syntax (Toggle Plain Text)
  1. Public Shared value As Integer
this assignment value from NumericUpDown1 to value :
VB.NET Syntax (Toggle Plain Text)
  1. value = NumericUpDown1.Value
this code to call this variable in other form:
VB.NET Syntax (Toggle Plain Text)
  1. Label1.Text = Form1.value
Last edited by Jx_Man; Jan 8th, 2008 at 9:48 pm.
Reputation Points: 1182
Solved Threads: 392
Posting Sensei
Jx_Man is offline Offline
3,138 posts
since Nov 2007
Jan 9th, 2008
0

Re: Vb.net Help!!!!!

Click to Expand / Collapse  Quote originally posted by jimmer12 ...
hi
i have a numericupdown box on my first form and in the next form i want the number selected in the numericupdown box to produced that number of text boxs in the next form.
ans;
if it s windows application,use below code in form2
text box.text=form1.numericupdown.value
Reputation Points: 10
Solved Threads: 1
Newbie Poster
anansiva is offline Offline
4 posts
since Jan 2008
Jan 23rd, 2008
0

Re: Vb.net Help!!!!!

you can do this as.......

on form2 load

textbox1.text=form1.textBox1.text



just try this i think you can solve your problem easily

for any kind of web related information you can visit
http://webdesigningcompany.net
Reputation Points: 7
Solved Threads: 2
Newbie Poster
bector is offline Offline
13 posts
since Jan 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in VB.NET Forum Timeline: a list of items
Next Thread in VB.NET Forum Timeline: Challenging Project





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC