General Discussion Off-Topic Discussion and Enlightenment

i need help with VB.NET

Old 10-06-2004, 06:57 PM
  #1  
0.0 BAR
Thread Starter
 
J-MAN's Avatar
 
Join Date: Mar 2003
Posts: 0
Default i need help with VB.NET

ok, i hope somebody can help me out because i am so stuck and have looked in the book and can't find ----.
here's the problems, i need to know the coding to have the numbers displayed to only go 2 numbers past the decimal point. and how would i make a button to clear the form to start over. kinda like a reset button.
any help would be appriciated.
J-MAN is offline  
Old 10-06-2004, 10:38 PM
  #2  
0.0 BAR
Thread Starter
 
J-MAN's Avatar
 
Join Date: Mar 2003
Posts: 0
Default Re: i need help with VB.NET

ok i figured out how to reset the form but still don't know how to get the number to stop after two past decimal.
J-MAN is offline  
Old 10-07-2004, 10:04 AM
  #3  
1.0 BAR
 
Johnyquest's Avatar
 
Join Date: Jan 2003
Posts: 438
Default Re: i need help with VB.NET

in vb it's like precision(2) or setprecision(2)... I am 99% on that one.

Matt
Johnyquest is offline  
Old 10-07-2004, 12:32 PM
  #4  
1.5 BAR
 
stingray's Avatar
 
Join Date: Jun 2003
Posts: 681
Default Re: i need help with VB.NET

couldn't you do something like .... and use a substring.... (indexof("."),2)
stingray is offline  
Old 10-08-2004, 09:06 PM
  #5  
1.5 BAR
 
Project CRXtacy's Avatar
 
Join Date: Apr 2004
Posts: 728
Default Re: i need help with VB.NET

Originally Posted by jeffsciv23
ok i figured out how to reset the form but still don't know how to get the number to stop after two past decimal.
damn thats hard i been trying and i cant get it man )=- sry if i do then i can tell you.
Project CRXtacy is offline  
Old 10-08-2004, 09:54 PM
  #6  
1.0 BAR
 
TekPhobia's Avatar
 
Join Date: Jan 2004
Posts: 253
Default Re: i need help with VB.NET

Store the numeric value in a string. Let, d, be your decimal and s be your string:

d=1.216589765

s=d.ToString("0.00")

Voila!

-Tim
TekPhobia is offline  
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
98ctr
General Discussion
28
01-05-2005 01:47 AM
93hatchdx
General Discussion
5
12-22-2004 11:19 AM
digihippie
Hybrid/Tech
0
09-19-2004 05:58 AM
Xplocivic
General Discussion
2
12-13-2003 09:48 PM
91rexBUG
General Discussion
26
07-29-2003 02:23 PM


Thread Tools
Search this Thread
Quick Reply: i need help with VB.NET



All times are GMT -5. The time now is 05:46 PM.