我该如何设置picturebox .. [英] How do I set picturebox..

查看:52
本文介绍了我该如何设置picturebox ..的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

例如,如果label8说 0,016%或更少*则图片框启用,



问题在这里;



How to for example if label8 says 0,016% or less* then picture box enable,

Problem is here;

Dim myPercent As Single = Val(Label3.Text) / Val(TextBox1.Text)
       Label8.Text = String.Format("{0:N3}%", myPercent * 100)
       If Label8.Text = "0,016%" Then
           PictureBox6.Visible = True



它显示图片框,但我想设置如果是0,016%或更少**然后显示图片框,但如果值高于0,016%那么图片框可见=假...如何?


it show picture box but I want to set up if is "0,016%" or less** then show picture box, but if is value higher than "0,016%" then picture box visible = false... how to?

推荐答案

嗯...为什么要比较字符串,并期望值大于或小于?

为什么不直接使用 myPercent ,因为它是一个数字?

Um...why are you comparing strings, and expecting the values to be "greater than" or "less than"?
Why not just use myPercent directly, given that it's a number?
If (myPercent *100) <= 0.016 Then
   ...


这篇关于我该如何设置picturebox ..的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆