double كيف يتم تغيير قيمة المتغير
الى خانتين عشريتين
dim x as double
x =6.9872
textbox1.text=x=6.9872
اريد ان يصبح
textbox1.text=6.99
double كيف يتم تغيير قيمة المتغير
الى خانتين عشريتين
dim x as double
x =6.9872
textbox1.text=x=6.9872
اريد ان يصبح
textbox1.text=6.99
مرحباً أخي الكريم,
جرب التالي :
Dim X [color= #b1b100;]As Double [color= #339933;]= [color= #cc66cc;]6.9872
X [color= #339933;]= Double[color= #339933;].Parse[color= #009900;](Format[color= #009900;](X[color= #339933;], [color= #0000ff;]"###.00"[color= #009900;])[color= #009900;])
MsgBox[color= #009900;](X[color= #339933;].ToString[color= #009900;]([color= #009900;])[color= #009900;])بالتوفيق
The important thing is not so much
that every child should be taught,
as that every child should be given the wish to learn.
خذ مني هذه طريقة ثانية
Dim X As Double = 6.9872 X = FormatNumber(X, 2) MsgBox(X)
اذا اردت تقريب اكثر او اصغر غير الرقم 2 حيث التقريب هناك
تم تعديل هذه المشاركة بواسطة assaf_abdullah في 23 مارس 2009 في 11:18
<EMBED src=http://www.abdelghafar.com/images/banners/bm2.swf width=486 height=60 type=application/x-shockwave-flash EMBED < menu="false" loop="true" quality="high">