我希望控制鼠标在Windows窗体中移动 [英] i want get whcih control mouse move in windows form

查看:62
本文介绍了我希望控制鼠标在Windows窗体中移动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用win form应用程序这个应用程序在我的win形式中它们是多个控件,其中控制用户鼠标移动??

i am using win form application this application in my win form their are multiple control in which control user mouse move ??

推荐答案

假设你的意思是你是将像12.350这样的字符串转换为浮点值,然后最终零不会被截断,它只是无关紧要:浮点值不存储精度,因此它在小数点右边有一个无限的零点。



实际发生的情况是,当您将浮点数转换回字符串进行显示时,不会显示无关的零点。您可以通过在显示值时指定格式来强制它。



Assuming that you mean you are converting a string like "12.350" to a float value, then the "final zero" is not truncated, it's just irrelevant: a float value does not store a precision so it has an infinite supply of zeros to the right of the decimal point.

What is actually happening is that when you convert the float back to a string for display, the irrelevant zero is not being displayed. You can force it by specifying a format when you display the value.

float f = 12.350F;
Console.WriteLIne(f.ToString("00.000"));

将给出12.350

will give "12.350"

float f = 12.350F;
Console.WriteLine("{0:00.000}", f);

还会给出12.350


这篇关于我希望控制鼠标在Windows窗体中移动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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