Multipage

Multipage

Anonymous
Not applicable
576 Views
15 Replies
Message 1 of 16

Multipage

Anonymous
Not applicable
Hello,

I have a form that allows users to pick parts of an assembly. After picking the parts I would like a second form to open displaying each part as a individual page of a multipage. The varies configurations are endless so making separate forms is not an option.

Is it possible to create a predefined page for each part that can be loaded to the multipage/form2 after user input?

I hope this makes sense, I am trying to learn and appreciate your help.
0 Likes
577 Views
15 Replies
Replies (15)
Message 2 of 16

Anonymous
Not applicable
"displaying each part as a individual page of a multipage"

Are you displaying data or image?

-J
0 Likes
Message 3 of 16

Anonymous
Not applicable
I would like to display the data. Each page of the multipage would have controls that allow the user to give more information about the part they picked on the previous form.

Thanks,
0 Likes
Message 4 of 16

Anonymous
Not applicable
can you give me an example of the data

Also do you want to use a database or no database?
0 Likes
Message 5 of 16

Anonymous
Not applicable
Sure,

The assembly is the cross section of a roadway, the first user form is to pick the parts from left to right that make up the section (Curb, Pavement, Finished Ground, Sidewalk). The next userform (the multipage) should have the part names as the page title and options to further define the part within the page. Each part would have a separate page within the multipage and should display from left to right as the user picked on form1. Because I do not know what the user will pick I would like to predefine the individual part pages that would be loaded to the multiform base on form1 input.

The problem I am having is that all multipage code seems to go under the form and there does not seem to be code for the individual pages of the multipage, thus no obvoius way to load the pages to a form.

So to sum this all up, I want to create the part pages and then save them so they can be loaded later.

I don't see a database being necessary.

Sorry I got a little long winded ....Any suggestions you might have would be great. I am very new to programming so it could be I've gone in the wrong direction with this?

Thanks for your help!
0 Likes
Message 6 of 16

Anonymous
Not applicable
I am still having a hard time understanding what you are trying to do.

Can you sketch it up so that I can see it graphically?

-J
0 Likes
Message 7 of 16

Anonymous
Not applicable
Personally, for something like this, I would use the TabStrip, instead of the MultiPage control.Each tab of the MuliPage control acts just like an other form, and it will bog down rather quickly when you start getting more than a few parts.

Also, since you will be displaying the same TYPES of data on each "page", using the tabstrip, will alow you to just *change* the data in the textboxes, etc, that you place on the control. You'll only need one set of controls for no matterHOW many parts you have, and the data can be seeded from an array
0 Likes
Message 8 of 16

Anonymous
Not applicable
Yes, that was my first thought as well, but each part page will have different controls on them.

I have done some searching and I think this can be done by creating the form at runtime. I have a lot of learning ahead of me to make this happen but I enjoy a good challenge.

I have found some code examples for placing controls on a userform programmatically, but I can't find any info on how to place them in my desired location on the form/multipage. Is there a coordinate system for forms? Can any one point me in the right direction?

Thanks for helping!
0 Likes
Message 9 of 16

Anonymous
Not applicable
After more research I found that controls can be moved around a form via there "Left" and "Top" properties. Although, this seems like a hit and miss time consuming process.
0 Likes
Message 10 of 16

Anonymous
Not applicable
Ok Jason, I just finished writing something for you. Hope you can take it from here.
If you have any questions feel free to ask.

Just dump everything into your --> c:\
And then run the a_startup inside the DatabaseSample located in c:\test

-J
0 Likes
Message 11 of 16

Anonymous
Not applicable
I think you are psyching yourself out on the complexity (or lack of) in this project. You must start by asking different questions. Not just for the people reading this, but for yourself. You mention myriad ways the user can access the data, but you are wanting them to go in a right-to-left fashion. That is contradictory.

Windows programs may appear to let the user work in any way they want to, but what happens behind the scenes is that you STEER them in the direction you want them to go - by hiding text boxes, disabling or enabling buttons, etc.

A Multipage treats each individual page as a form visually, but all the controls are there at the same time. Its just that the USER cant click a button which is currently hidden. You label each text box individually, and each event will occur.

Draw each individual "form" on its own separate "page", enable/disable/hide/show the tabs.

The trouble is, after several posts on this subject, I still have no idea exactly what you want to do.
0 Likes
Message 12 of 16

Anonymous
Not applicable
I love it, thanks so much for your help!

I am currently tying to create similar on my own. Just got a thumbnail working which I am using instead of the image control.

Thanks for getting me thinking.
0 Likes
Message 13 of 16

Anonymous
Not applicable
I apologize for not being as clear as I would have liked, I took your suggestion and asked my self a lot of questions and worked up a flow diagram for my app. You were also correct that I was not steering the user as I should.

Thanks for your help!
0 Likes
Message 14 of 16

Anonymous
Not applicable
Juno,

I hate to bother you again but I am really confused by the sub you used to populate the partslist. Could you possible explain your arrays and how they relate to the file names/data. I have been looking at it for hours and just don't get it?

I understand if you don't have time and thanks for everything you have already done!

Jason
0 Likes
Message 15 of 16

Anonymous
Not applicable
Sure Jason,

I use the c:\test\index.txt file as my FAT (file allocation table). This gives me the flexibility to name my files anyhow I want, and control which files will be loaded. So if you open the c:\test\index.txt with a notepad you will see the location of each file.

Let’s take a look at the PopulatePartsList() sub

The code below will loop thought each file inside the index, the “Input #1,Line1” will read the data inside the index file one line at a time as a string and assign it to string “Line1”
…Do Until (EOF(1) = True)
…Input #1, Line1

The code below will open the file sting “Line1” , for example the “c:\test\i_pump1.d” and read only first line inside the file. If you open the i_pump1.d with a notepad you will see the tags .
…Open dataloc For Input As #2
…Input #2, Line2

So then “Line1” = “c:\test\i_pump1.d” and “Line2” = “Clean Water Centrifugal Pump” gets dumped into a 2D array.
Later on I redim the arr2 because the original array Arr is wide instead of long. Once the array is in place I just assign the array to the part List on the form (if you change the part list ListBox ColumnWidth property to “190 pt;190 pt” you will see both columns.

Let me know if that was of any help to you.

-J
0 Likes
Message 16 of 16

Anonymous
Not applicable
Yes, it was a big help. I still however did not fully understand the concept of a multidimensional array, but luckily my father is a programmer. I use to think his job was boring and now I think I'm addicted!

Thanks so much for all your help!
0 Likes