• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 188
  • Last Modified:

Layout and control question

Hello all.

I need some help in the design and/or layout of a program I wish to write.  What I need to do is connect to multiple Oracle databases, from 1 to x.

I then need to run a handful of queries against each db, query 1 to n, compute the returned data and return the values as pass/fail values.

The connection and computations are not a problem. My quandry lies in the fact I am unsure how to properly display the results. A primary goal is flexibility and a good graphical presentation.

I do not want to stack all the data into a grid, but would rather have a seperate form for each databases' results held within an MDI form. Am I heading in the right direction in thinking that building a template form that can be reused x amount of times is acheivable? How would you go about creating this "template" form?

  • 2
1 Solution
I can't understand the purpose of your prog.
but i think what you thought was correct. My opinion is to create a new instance of the same form with different set of parameters for database and query stuff.

so create a form which can display and retrive date from the database.
create a public sub or function inside the form so you can pass database name and the Query set to the form.

in the MDI form use Load method to load a new instance of the form for a particular DB and Query set. so it'll create a forms array.

hope this will be helpfull,

As your results are going to be 1 to x.. and the data presentation is all going to be sililar..using a MDI form is a GREAT choice.. <smile>

The quickest way to get started is to open a NEW project.. and in the New Project window.. select the APPLICATION WIZARD (instead of the Standard Exe you are accustomed to). The first screen will ask you for a custom predefined profile (ie. one of your own creation).. as you probably don't have any yet.. press the Next radio button on the screen.. and there you will get to choose a MDI interface. From there it will ask you what other options would you like and you may pick and choose as you go (for now.. you may want to keep it simple and go with the defaults). At the end of the Wizard.. VB will build you a MDI programming shell.. that you can modify as you like.. <smile>.

The frmDocument that it makes.. is the template that you desire. The frmMain is the MDI container (that is limited to only the controls that are placed there.. a toolbar, menu, and status bar are the only VISIBLE controls allowed on an MDI form). With each NEW frmDocument statement that is executed in the frmMain code.. a new frmDocument will be added to the container.. and each will be indexed. If I may make a suggestion here.. store something unique in each new frmDocument's Tag property.. you will be able to use it as a kinda key if you will be looking for a specific form after everything is loaded. The best way to search for a frmDocument is by using For Each frmVariable in Forms and testing the Tag statement.. for a unique identifier.

In coding your frmDocuments.. you want to make use of the Me keyword. As all the frmDocuments are going to be using the same code the Me. prefix delineates to VB that the code applies to the current child form with focus. If you need to reference the current child form with focus from outside of the frmDocument code.. you can use the Active. prefix to accomplish this.

Another thing you want to look at is the snippet of code used with the Window menu item. In there you will see methodology to tile all the windows at once on the screen symetrically. as you are going to have 1 to x forms.. this little bit of code is a real time saver.

Welp.. datz it for now. If this is all new to you.. I suggest you review your MSDN examples.. or perhaps get a VB book. MDIs are not that hard if you have examples to follow. And the Application wizard will give you just that.. <smile>.
"I can't understand the purpose of your prog.".. How do you call that an answer? You just locked this question down.. making it very difficult for anyone else to help darenjackson!!!

An answer on EE is supposed to be something definitive.. and that there is no other possible solution to the question. Your response hardly qualifies as that.. and for that you are rude.

If you will notice on your screen there are TWO buttons.. one is for COMMENT and the other for answer. By commenting, you let the questioner choose which is the best answer.. and if the questioner picks yours as being most appropriate.. then you will certainly receive the points that you are well deserved of.

If you can in the future, try and behave professionally, and comment on the question, and let the questioner be the judge of the winner.. <smile>
darenjacksonAuthor Commented:
Thanks alot....

I appreciate your help. I only have 130 points remaining or I would have given you more. It sure is hard for a newbie VBer to get points here :P

Thanks again

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now