Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Erum

Pages: [1]
1
QB64 Discussion / Re: Scroll Bar
« on: September 23, 2019, 02:37:00 pm »
Respected QB64 members,
Thank you for making me feel confident for asking questions, you truly are friendly folks. As for the reply, I understood it, and I’ll use it. Thank you!
My queries are officially over. Thanks once more to everyone.
Regards.

2
QB64 Discussion / Re: Scroll Bar
« on: September 23, 2019, 11:57:29 am »
To all the respected QB64 team,
Thank you for all those who helped me so much once again. However, I have one last dumb question.
I am done with the whole software, all I need is to add colours. My software is a bit crowded, so I thought adding colours would make the data vivid and easy to read.
I know how to add colours to each line using RGB mixing, but I want to know if it is possible to add more than one colour on one line (text colour only).
I would be grateful to anyone who takes precious time to answer this dumb question.
Regards.

3
QB64 Discussion / Re: Scroll Bar
« on: September 22, 2019, 05:37:48 am »
Respected TempodiBasic and blpus,
Thnak you so much once again. I am gonna focus and try them and see which one works best.
Regards.

4
QB64 Discussion / Re: Scroll Bar
« on: September 21, 2019, 02:51:22 pm »
Respected Petr and bplus,
Thank you for showing concern and for constantly helping me.
For Petr: Yes I think text boxes can be used instead. I will try them once you provide the guidelines.
For bplus: I do think that these things can be complex, but Iam sure I can figure them out once I study them in detail. P.S. I am a ‘she’, not a ‘he’ ;)
Regards.

5
QB64 Discussion / Re: Scroll Bar
« on: September 21, 2019, 10:45:36 am »
Respected bplus,
Thank you for that reply. You did a great job helping a dummy like me, as I said Iam a ninth grader and the only BASIC I learnt was from the chapter 'basics of BASIC." ;) I completely understand the select case syntax and I think I might use that. Thanks again.
Regards.

6
QB64 Discussion / Re: Scroll Bar
« on: September 21, 2019, 10:41:13 am »
Respected TempodiBasic,
I know I am annoying all the experts like you with my dumbness ;) Thank you for that kind and enlightening reply. I guess that coding for scroll bar is going to take a bit of studying and research. Thanks.
Regards.

7
QB64 Discussion / Re: Scroll Bar
« on: September 21, 2019, 10:20:55 am »
Respected bplus,
Could you please tell me the code for just a scroll bar? That would be a big help. I would do a detailed study on that code later.
Regards.

8
QB64 Discussion / Re: Scroll Bar
« on: September 21, 2019, 08:12:57 am »
OK, I will make my question more clear.
You see, as I am a beginner with no special knowledge, my program is very basic with something like this:

CLS
myscreen$= _NEWIMAGE(1600, 800, 32)
SCREEN= myscreen$
INPUT "ENTER pH OF SOIL"; p
INPUT "ENTER TEMPERATURE IN FAHRENHEIT"; T
IF p >= 1 AND p < 4.5 AND T > 113 AND T < 134 THEN
    PRINT "pH IS TOO LOW AND TEMPERATURE IS TOO HIGH. CONTROL pH WITH HYDRATED LIMESTONE OR WOOD ASH (0.5 POUNDS OF HYDRATED LIMESTONE EVERY TEN SQUARE FOOT CAN INCREASE pH BY APPROXIMATELY ONE POINT.)"
ELSEIF p >= 1 AND p < 4.5 AND T < 32 THEN
    PRINT "BOTH pH AND TEMPERATURE ARE TOO LOW. CONTROL pH WITH HYDRATED LIMESTONE OR WOOD ASH (0.5 POUNDS OF HYDRATED LIMESTONE EVERY TEN SQUARE FOOT CAN INCREASE pH BY APPROXIMATELY ONE POINT.)"
ELSEIF p > 8.4 AND p <= 14 AND T > 113 AND T <= 134 THEN
    PRINT "BOTH pH AND TEMPERATURE ARE TOO HIGH. CONTROL pH WITH ORGANIC MATTER ( PEAT MOSS), ALUMINIUM SULPHATE, OR SULPHUR (1.2 POUNDS OF ALUMINIUM SULPHATE OR 0.2 POUNDS OF SULPHUR EVERY TEN SQUARE FOOT CAN LOWER pH BY APPROXIMATELY ONE POINT.)"
ELSEIF p > 8.4 AND p < 14 AND T < 32 THEN
    PRINT "pH IS TOO HIGH AND TEMPERATURE IS TOO LOW. CONTROL pH WITH ORAGNIC MATTER LIKE PEAT MOSS, ALUMINIUM SULPHATE, OR SULPHUR (1.2 POUNDS OF ALUMINIUM SULPHATE OR 0.2 POUNDS OF SULPHUR EVRY TEN SQUARE FOOT CAN LOWER pH BY APPROXIMATELY ONE POINT.)"
ELSEIF p >= 4.5 AND p <= 8.4 AND T > 113 AND T < 134 THEN
    PRINT "TEMPERATURE IS TOO HIGH."
ELSEIF p >= 4.5 AND p <= 8.4 AND T < 32 THEN
    PRINT "TEMPERATURE IS TOO LOW."
ELSEIF p <= 14 AND p > 8.4 AND T >= 32 AND T <= 113 THEN
    PRINT "pH IS TOO HIGH. CONTROL IT USING HYDRATED LIMESTONE OR WOOD ASH. (0.5 POUNDS OF HYDRATED LIMESTONE EVERY TEN SQUARE FOOT WILL INCREASE pH BY APPROXIMATELY ONE POINT.)"
ELSEIF p >= 1 AND p < 4.5 AND T >= 32 AND T < 134 THEN
    PRINT "pH IS TOO LOW. CONTROL pH USING HYDRATED LIMETONE OR WOOD ASH (0.5 POUNDS OF HYDRATED LIMESTONE EVERY TEN SQUARE FOOT WILL INCREASE pH BY APPROXIMATELY ONE POINT.)"
ELSEIF p < 1 OR p > 14 AND T > 134 THEN
    PRINT "PLEASE ENTER VALID VALUES."
ELSEIF p >= 1 AND p <= 14 AND T > 134 THEN
    PRINT "ENTER VALID TEMPERATURE VALUE."
ELSEIF p < 1 OR p > 14 AND T <= 134 THEN
    PRINT "ENTER VALID pH VALUE."
ELSEIF T >= 32 AND T <= 50 AND p >= 4.5 AND p <= 5 THEN
    PRINT "PLANTS THAT WILL GROW BEST IN THESE CONDITIONS:"
    PRINT "1.ENGLISH OAK (TREE):"
    PRINT "WATER: SEEDLING:KEEP SOIL WET. YOUNG:1.5 GALLONS A DAY. MATURE:CAN DRAW 50 GALLONS."
    PRINT "FERTILIZER: DON'T USE TILL 2 YEARS OLD. WHEN MATURE, USE 12-6-6 OR 12-4-8 FERTILIZER ANNUALLY (16.6 POUNDS EVERY 1000 SQUARE FEET.)"
    PRINT "DISTANCE: PLANT 25 FEET APART. TEMPERATURE: 32-92 F. pH:4.5-5.0."
    PRINT "SUNLIGHT:HIGH(6-8 HOURS A DAY). MOISTURE PERCENT: MODERATE (21-40%)"
    PRINT
    PRINT "2.PAPER BIRCH (TREE):"
    PRINT "WATER: YOUNG: LET WATER RUN FROM HOSE FOR 30 SEC EVERY 2 WEEKS. MATURE:KEEP SOIL WET 10INCH DEEP."
    PRINT "FERTILIZER: USE 11-22-22 FERTILIZER ANNUALLY AND COVER SOIL WELL. WHEN MATURE, FERTILIZE ONLY WHEN DEFFIECENCY NOTED."
    PRINT "DISTANCE:PLANT 25 FT APART. TEMPERATURE:32-113 F pH:4.5-8.4"
    PRINT "SUNLIGHT: HIGH (6-8 HOURS A DAY). MOISTURE PERCENT: MODERATE (21-40%)"
    PRINT
    PRINT "3.AZALEAS (FLOWERS):"
    PRINT "WATER:4 GALLONS PER SQUARE METRE EVERY 2 WEEKS."
    PRINT "FERTILIZER:USE 10-10-10 FERTILIZER 2-3 TIMES A YEAR."
    PRINT "DISTANCE:PLANT 2 FEET APART. TEMPERATURE:32-76 F. pH:4.5-5.0."
    PRINT "SUNLIGHT: SUNNY TO PARTIAL (HIGH-MED). MOISTURE PERCENT: OPTIMUM 41-60%"
    PRINT
    PRINT "NOTE 1. FERTILIZER FORMULAS STATED SHOW THE PROPORTION OF NITROGEN-PHOSPHORUS-POTASSIUM RESPECTIVELY."
    PRINT "NOTE 2:PLANTS NEED WELL DRAINING AND NOURISHED SOIL AND BEST CO2 AMOUNT FOR THEM IS 1000-1500 PPM (PARTS PER MILLION)"
    PRINT "NOTE 3:INSTEAD OF NPK FERTILIZER YOU CAN USE THESE IN THE PROPORTION YOU REQUIRE:"
    PRINT "COFFEE GROUNDS,BLOOD MEAL, AND COTTON SEED MEAL FOR NITROGEN"
    PRINT "FISH BONE MEAL, STEAMED BONE MEAL, AND ROCK DUST FOR PHOSPHORUS"
    PRINT "KELP MEAL, HARDWOOD ASH, AND GREEN ORGANIC MATERIAL FOR POTASSIUM"

You see, I want to add colours to my program on each line that is printed (each line must have a different background and foreground colour). The colour statements on each line are not working when nested in if-then-else statements., so I want to ask if there is another way of doing this. Also, in some conditions, the amount of best suited plants is quite large, and they all are not fitting on the screen. For that, I need a scroll bar.
Hope you all clearly understand and will do an immense favour by helping me again.
Regards.

9
QB64 Discussion / Re: Scroll Bar
« on: September 17, 2019, 07:09:30 am »
Thank you all so much for the helpful and quick responses,
You all really helped me out. I will try each of the methods you mentioned and see which one works best for me.

10
QB64 Discussion / Scroll Bar
« on: September 16, 2019, 03:28:05 pm »
Respected QB64 team,
I have created a software on QB64 that will analyse temperature and pH of soil and tell which plants can be grown there, along with conditions they need for a national science fair. (I used QB64 as I am a ninth grader and this software is easy to use.) Even though I managed to increase screen size but I need a scroll bar so all my data can fit neatly.
I also want to add colours, for example if I write like this:
English oak:
Water: ABC
Fertiliser:DEF
Distance:GHI  Temperature:XYZ and so on....
For this, I want the heading to be a different colour and each line to be a different colour. How can I do this?
P.S: I am not very advanced in all this but I am deeply interested to know. If any one can help me, I will be infinitely obliged.
Regards.

Pages: [1]