Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

windowlist and form's borderstyle problem..

Status
Not open for further replies.

keeyean

MIS
Sep 29, 2001
32
US
1.)how do i create a windowlist that can display the path name of the most recently opened forms??

eg.) if i have opened Form1, Form2 and Form3.. then the list will have these 3 forms.... when i select Form1 (from the list).. Form1 will be show..

what i want to create is a menu that excatly the same with the "window" in visual basic menu...

2.) i have 6 forms and 1 mdiform..all were in 2-sizable setting... but when i changed the 6 forms into 1-fixed-single... the forms didn't display in the MDIform... am i missing something??

thanz you.
 
Dear keeyean
1.)how do i create a windowlist that can display the path name of the most recently opened forms??

Ensure all forms are saved to same folder and then you can refer to App.path in your code to return the path name.

To create an eqiv windowlist menu showing pathnames you will have to create a control array of sub-menus. In this way you can use the Load and Unload statements to add and remove sub-menus dynamically.


2.) i have 6 forms and 1 mdiform..all were in 2-sizable setting... but when i changed the 6 forms into 1-fixed-single... the forms didn't display in the MDIform... am i missing something??

Check that the 6 forms all have the MDIchild property set to TRUE.

Kate
 
1.) how do i create a control array sub menus? coz in the menu i have a "mnuView" and windowlist is selected in the menu editor ..but everytime will only have 1 form name display on the list...

2.) i have already set all the 6 forms MDIchild property to True.. it's work fine if i changed all the 6 forms back to 2-sizable setting... do i need to set the 6 form sizes and the position??
 
Dear keeyean

1.) how do i create a control array sub menus? coz in the menu i have a "mnuView" and windowlist is selected in the menu editor ..but everytime will only have 1 form name display on the list...

windowlist is under the control of Vb - you don't add items to this, any entries (Form1, Form2 etc) that are created are created automatically. In your original post, you refer to the "path name" of the form. In order to do this in a menu similiar to the windowlist menu you will need to create this menu from scratch, there is no easy way (even with API calls) to add the path name onto the existing text displayed in the windowlist menu. Create a new menu (don't tick the windowlist box) called mnuPaths and add one sub-menu called, for example mnuItem. Set the index property of mnuItem to 0. Now when you run the form you can add or delete extra mnuItems by using Load mnuItem(x). If you know you have no items (child forms) you can hide the entire menu by

MDIForm1.mnuPaths.visible = false

Creating your own windowlist is not easy - you'll have to monitor the opening and closing of child forms and amend the menu accordingly. I still don't understand why you need to dispaly the paths of forms - aren't all your forms stored in the same place?

A much easier solution would be to use the in-built windowlist and display the path in the caption of each form. In this way, you're saved the hassle of writing a new windowlist and your users can still see where the forms are stored. You're not doing C&G VB3 are you?



2.) i have already set all the 6 forms MDIchild property to True.. it's work fine if i changed all the 6 forms back to 2-sizable setting... do i need to set the 6 form sizes and the position??

I've just tried this an it works for me with either border setting. if you're using childform1.show try replacing it with
load childform1

kate
 
1.) i think i didn't make clear in the first question,... sorry..:)
what i'm trying to do is use the in-built windowlist and display the path in the caption of each form. but i'm not very sure how to create a menu can grow at run time.. can you show me an example??

2.) hmm.. i've tried a different file.. it works too... but doesn't work in my program...
is okay... i think i remain to use 2-sizable setting..:)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top