从表单跟踪数据库项目 [英] tracking your database items from a form

查看:69
本文介绍了从表单跟踪数据库项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要知道如何创建一个条形图,该条形图将跟踪mysql中表中项目的数量.....这样,当其高于50%时将显示绿色,而当其低于50%时将显示红色...任何想法. ..在c#

I need to know how to create a bar that will track the quantity of items in my table in mysql..... such that it shows green when its above 50% and red when its below... any ideas... am doing it in c#

推荐答案

中执行此操作,进度条的颜色不变,因为它遵循操作系统的主题颜色.
修改颜色,您需要从Program.cs文件中删除此行
the color of progressbar doesn''t change because it follows operating system''s theme color.
to modify color u need to remove this line from Program.cs file
//EnableVisualStyles() applies color and style of operating system to ur controls.
Application.EnableVisualStyles();



注意:-此wud会删除项目中其他元素的操作系统主题样式和颜色


从另一个线程更新进度条.

若要将其红色保持在50%以下,则每次值更改时都需要将背景色设置为红色.

希望这对您有所帮助:)



Note:-this wud remove operating system theme styles and colors of other elements in your project


update the progressbar from another thread.

to keep it red below 50% u need to set backcolor to red for every change in value.

hope this helped u :)


尝试 ProgressBar [ ^ ].


这篇关于从表单跟踪数据库项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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