From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
08-08-2014 01:52 PM
Hi all
I create a Tank control in my Window Form but de Fill Area donsn't reflect the Value of de Tank, Can Any body Helpme please ?
private void Form1_Load(object sender, EventArgs e)
{
NationalInstruments.UI.WindowsForms.Tank bat1 = new NationalInstruments.UI.WindowsForms.Tank();
((System.ComponentModel.ISupportInitialize)(bat1)).BeginInit();
bat1.Name = "bat1";
bat1.Location = new System.Drawing.Point(100, 200);
bat1.Size = new System.Drawing.Size(100, 200);
bat1.ScaleVisible = true;
bat1.Visible = true;
bat1.Range = new Range(0, 20);
bat1.FillColor = Color.Red;
bat1.Value = 30;
bat1.TankStyle = TankStyle.Raised;
bat1.FillMode = NumericFillMode.ToMinimum;
bat1.FillBaseValue = 0;
bat1.FillStyle = FillStyle.Solid;
this.Controls.Add(bat1);
this.Refresh();
}
08-08-2014 02:00 PM
Your range is 0 to 20, but your value is 30.
08-08-2014 02:20 PM
It donsn't matter the value, it does not change, I've tried value=5, value=8, etc.. but it never chenge
08-09-2014 07:39 PM - edited 08-09-2014 07:41 PM
I am not sure why you are using
((System.ComponentModel.ISupportInitialize)(bat1))
but when I comment it out, I see a tank that is filled with red.
I am using Measurement Studio 2010 with C# 2010 Express.
08-10-2014 06:28 AM
I took this line from a example, I commented out this line worked, thanks very much.
08-10-2014 08:27 AM
There are several examples installed by default.
You should view them to see how to use Measurement Studio properly.