I'm in the process of a new project & need some advice to help me get started. Hopefully I will explain the idea well enough, if not please let me know.
There will be 14 Rows & 9 Columns. Each row is relative, which I hope to explain further down.
A small diagram is attached (very brief & not full scale!) to give you an idea of what I have in mind.
Bonus - If one is selected it will highlight (amber) that row (Doesn't highlight the last cell. Disabling all the bonus 'optionbuttons'.
Low - If selected it will highlight that cell (not the row or column) in green & add a minus (-) to the end of the number (the number entered was 200, would then be 200-)
High - If selected it will highlight that cell (not the row or column) in green & add a plus (+) to the end of the number (the number entered was 200, would then be 200+)
Each cell in the same row is relative to all cells (apart from the final cell). If R1/C1 is 100 & is selected 'High', then R1/C2 would need to be greater then 100. Alert, if I tried to enter 99 or lower in R1/C2. Alert, If I tried to enter 99 or lower in R1/C7 etc.
The final Column (C9) is relative to the entire row. If a number is entered it will highlight that cell in red (not row or column). If R6/C9 is 800- then all cells in that row (R6) must be lower then 800. Alert, if I try to enter 799 or lower in any of the cells in R6.
Any idea's, suggestions & advice is much appreciated as I simply don't know how best to approach this project. I know some VB6, not much & its been a few months since I used it last.
Before getting into the logic (the processing flow) ...
when you say "14 rows and 9 cols" -- this is a little ambiguous.
I see several options -- rows and cols refer to:
1. an Excel worksheet
2. a MSFlexGrid on your VB6 form
3. something else
Do you know which way you want to go?
Spoo
I think he is saying about the Worksheets in EXCEL.
Also, it's VBA (not VB6). So, I think this thread is more suited in Office Development Section
If my post was helpful to you, then express your gratitude using Rate this Post.
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video) My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet Social Group:VBForums - Developers from India
I hope to create (if possible) this in VB6, but I might have to give into my lack of knowledge & opt for simple Excel formula's & not use VB6 at all.
I considered MSFlexGrid, but that doesn't give me any space to add any optionbuttons for selecting bonus, low & high next to each cell. I thought the best way (probably the wrong way) was to use TextBox's & form a sort of "Row & Cell" layout.
Maybe I need to create the idea in photoshop in more detail & give a little more understanding of how I want it to look & what I want it to do.
This is how (not exactly) I envisaged it looking. I will make it a little more minimalistic (L & H instead of low & high etc...). Hopefully that will give you a better idea of how it would look & how it would hopefully work.
I first enter 14 numbers (0-999) into the first column of each row. When I get a suggestion of low/high, I will then select that option to add a -/+ to the end of the number.
The reason for the -/+ is so the next cell would have to be lower or higher then the previous. Perhaps it doesn't need to add a -/+. If R1/C1 is 100+ then all R1's cells must be greater then 100.
If I locate the bonus I will highlight the entire row's cell (amber). It would also disable all the other bonus option buttons.
The final column is another suggestion. Either lower or higher. It works in the same way, R1/C9 is 200- then all R1's cells must be lower then 200.
I hope that is a little easier to understand. If you need me to explain it in further detail I will.
That image is impressive !
But, again, before we proceed to your logic flow, what is it a screen shot of?
- a VB6 form you created with TextBoxes, OptionButtons, and Labels?
- something else?
Sorry to be hung up on this, but if you've already created this in VB6, that lets
me know we can move directly to your logic flow.
If you are going to use VB6 with a bunch of controls, then creation of Control Arrays will be better.
If my post was helpful to you, then express your gratitude using Rate this Post.
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video) My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet Social Group:VBForums - Developers from India
Excellent.
And akhil's suggestion about control arrays is a good idea.
Now.. one last question before going on to the logic flow...
What is the purpose of this?
- is it a game? (hence, form's layout as shown is to be utilized)
- is it a data entry form? (perhaps some other form layout would be appropriate)
- something else?
Its for a game - F1 game. Its for Practice sessions where I get 8 runs to setup the car. I would input the cars setup (14 settings: front/rear downforce, front/rear height, caster, front/rear rollbar, front/rear tyre pressure, front/rear suspension, gears, brake size & brake balance). Each run I get suggestions (between 1 & 4) on a setting, lower or higher (pitcrew may also give me 1 suggestion on a slider). I need to keep track of how I change the setup, what sliders I had suggestions on.
I will enter all the settings into the program, not attempt to extract it or anything complicated like that. The layout has no relation to the game, its just an idea to help me keep track of changes I make to the car.
The problem I had is lack of knowledge. I didn't want to go ahead with my idea, make what you see above, but then later down the line realise I went the wrong way about it.
- you're only dealing with 1 car
- 14 rows pertain to different settings (front/rear downforce, etc)
- first 8 cols pertain "trial run" set-ups (ie, unique)
- 9th col pertains to final settings
Let's see how well I get it... again, correct me where I'm wrong
Setup-1. You enter the 14 "init" values for Setup-1 "on your own". The pitcrew (PC) gives you some suggestions
Setup-2. You now enter values for Setup-2, based on these suggestions.
There are 2 way we could go here:
-- you enter a new value, or...
-- you enter a delta (the change), and your app calculates the new value (as is shown in diagram above)
Setup-3. Repeat the process.
Questions:
1. Where does the Bonus come into play?
2. What have I left out?
And, thinking ahead as to how to show this on your screen, several options.
1. Use a MSHFlexGrid, freeze col 0, and rows 0,1,2, and use horiz slider. This
way, it doesn't take a hugely wide screen to display; rather, you'd see 2 or
3 adjacent setups at a time. But, at least all of your progressive changes
would be preserved for you to review.
2. Use TextBoxes for entry, but as control array. To achieve a similar
"horizontal slider" feature, you'd place them on a PictureBox-in-a-PictureBox
(I can more fully describe later if you like) so you can use a slider and view
First I would like to say a big thank you for taking the time to help me, so Thank you very much
- you're only dealing with 1 car - Yes
- 14 rows pertain to different settings (front/rear downforce, etc) - Yes
- first 8 cols pertain "trial run" set-ups (ie, unique) - Yes
- 9th col pertains to final settings - No, the 9th Column is the pitcrew suggestions. The other suggestions are from the driver. The 8th column is the final setup.
"The pitcrew (PC) gives you some suggestions" - Sorry I didn't make it clear previously, but the 9th column is entry for the pitcrew suggestions (max of 1 pitcrew suggestion per run (8 runs in total), some times there are none). The other suggestions come directly from the driver (max of 4 suggestions per run).
If I get suggestions on a setting from the driver, lets say 'Gears' 200 & the suggestion is 0-200, I would then enter anything from 0 upto 199 for Gears on the second setup myself. The same apply for any other suggestions.
The bonus gives a bigger improvement in time (that setting effects the car more on that particular tracks). When/if I locate what setting that is I need to remember what setting it is.
I'm open to any suggestion, what you think is ideally suited for this project. FlexGrid seems the right way, but I don't know much about it. TextBoxes look easiest from my perspective, once I can get one row working I can simply duplicate it for the others, Whereas FlexGrid seems more complicated in that respect.
Thanks.. you're wlecome.
OK, given your update, a revised logic diagram:
Code:
Setups
Settings 1 2 3
init D P B new D P B new
============= ============= ====
1 downforce - front o . . . o . . . o
2 downforce - rear o . . . o . . . o
3 height - front o . . . o . . . o
4 height - rear o . . . o - . . o
5 caster o . . . o . . . o
6 rollbar - front o + . . o . . . o
7 rollbar - rear o . . . o . . . o
8 tyre pressure - front o . . . o + . . o
9 tyre pressure - rear o . . . o . . . o
10 suspension - front o . . . o . . . o
11 suspension - rear o . . . o . . . o
12 gears o - . . o . . . o
13 brake size o . . . o + . . o
14 brake balance o - . . o . . . o
Legend:
o = entry you make D = driver
. = feedback P = pitcrew
B = bonus
Logic sequence:
1. You enter "init" settings in Setup-1 col
You then receive feedback from D P B
- D max of 4 suggestions
- P max of 1 suggestion
- B max of 1 -- if flagged as B, then this row stays fixed from here on
2. You enter new settings in Setup-2 col.
You then receive feedback from D P B
- D max of 4 suggestions
- P max of 1 suggestion
- B max of 1 -- if previously flagged as B, no changes this row; else, as above
3-8. repeat -- up to and including Setup-8, which is final.
Closer?
If so, what do you need next?
EDIT: re: your thoughts on FlexGrid vs TextBoxes.. good ones.
Let's table that for the moment.
Everything is perfect, apart from 'Bonus' (B). The bonus isn't any different to a suggestion, it just highlights that setting in amber instead of green (green is a normal suggestion). D max of 4 suggestions (1 suggestion could be the bonus, the bonus setting is the same for all 8 runs, but the setting (number) itself could change) - P max of 1 suggestion.