Click here to Skip to main content
13,001,454 members (60,748 online)
Rate this:
Please Sign up or sign in to vote.
See more:

I am very new to C# programming. I am creating GUI in windows from application.I want to estimate the incoming quantity based on three properties. I am able to get those properties. User can use any one of the property or all three properties to estimate the incoming quantity. The three properties are
1) Temperature
2) Pressure
3) Density
So i have created check box's for each property. when i tick the check box then i am going to use that property to estimate incoming property.
I have the conditions like this
1) Temperature is "30" to "60" and pressure is "100 to 300" and density "0 to 0.4" then it is "gas".
2) Temperature is "60" to "90" and pressure is "300 to 600" and density "0.4 to 1.4" then it is "liquid".
3) Temperature is "90" to "120" and pressure is "600 to 900" and density "1.4 to 3" then it is "water".

But the thing is user can use any one of the property or all above three properties to estimate. for example if user use only temperature then i need to use that property and based on that i have to estimate. if user wants to use all "temp, press, density" then i need to use all properties and if all is true then display the incoming quantity.

I have tried to upload my windows form images but i am not able to upload on this site. i don't know how to upload. so help me how to implement this concept.
Posted 3-Mar-13 22:55pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Instead of using check box you can use scroll bars.
You can set the Maximum and Minimum values for that.

So the TempratureScrollBar can be set like Minimum 30 and Maximum 120. similarly
the pressureScrollBar can be 100 and 900 in your case
But these Minimum and Maximum can be only integers - so for density you can set these limits by multiplying 100 to actual value and while reading the value you can divide that by 100 again.

These scrollbars will always be set to some value so you will not encounter a situation where any of these values are not available.

If this doesn't help you then probably you have to understand the requirement first and introduce more conditions accordingly.

Here on MSDN you can see ScrollBar controls for windows

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170624.1 | Last Updated 4 Mar 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100