Home > Software engineering >  VB form structure problem
VB form structure problem

Time:09-26

Tools: VB6.0 by use SP6
Environment: Windows 7 64 x

Question: the form of set-top, parent form, child form, menus, RMS,

Description:

1: establish FORM1, establish FORM2, establish FORM3,
2: FROM1 placed a button or other means, bring up the FORM2, method is: FORM2. Show 1
3: with right-click menu in FROM2, can display properly,
4: using callout FROM2 FORM3, the method is: FORM3. SHOW 1
5: a menu is placed in FROM3, however can't bring up the right-click menu, right-click the invalid,

Note: SHOW the methods of 1, effectively suppressed the form fluctuation problem, is above form SHOW always SHOW in the form, effectively prevent the press ALT + TAB in the operating system and cause the form order,

SHOW1 method is also effective control of the controllability for the bottom of the form, is a not operation form,

But only SHOW1 method cannot use right-click menu, lead to the third floor SHOW the form is not human,

Question: why use SHOW 1?
A: first of all to control the form because the switch and out-of-order, followed by the lower forms of control, and effectively prevent the upper extracted form the lower form data accuracy,

Can request a great god: in multiple forms, like SHOW1 method, prevent changes and operating below Form (Form can be used. Enabled=False, but will cause switching program in VB program Form out-of-order,), and can use the right click menu in multilayer Form?

The question for many times, but without a satisfactory answer, there are a lot of great god said right-click menu, set up by using the API function but not using, API menu function is not quite understand, the experiment many times, the third form is still use SHOW1 invalid right-click,

Thanks again for great god to solve!

CodePudding user response:

Tools: VB6.0 by use SP6
Environment: WIN2003 32 x
Test, only when the pop-up menu is pop up at the next higher level, the next layer of window will pop out
On the MSDN documentation is
Every time can only display a pop-up menu, as a result, if you have already shows a pop-up menu, or open a drop-down menu, the method of other calls will be ignored,
I doubt whether you pop-up menu, but not cancelled, led to the subsequent menu cannot be pop-up
Modal window when the pop-up window layer might on the menu layer, block off the pop-up menu display

CodePudding user response:

reference 1st floor bakw response:
tools: VB6.0 by use SP6
Environment: WIN2003 32 x
Test, only when the pop-up menu is pop up at the next higher level, the next layer of window will pop out
On the MSDN documentation is
Every time can only display a pop-up menu, as a result, if you have already shows a pop-up menu, or open a drop-down menu, the method of other calls will be ignored,
I doubt whether you pop-up menu, but not cancelled, led to the subsequent menu cannot be pop-up
Modal window when the pop-up window layer might on the menu layer, block off the pop-up menu display



Indeed, such as: right-click to choose a person, view your personal information, playing out a form, the second,
For example, in the right-click to check his personal information (attendance, salary, orientation, and so on a particular project), then pop up a, the third couldn't right-click, this should be how to solve?

Right-click menu after the pop-up window, close the menu, please? How close?

CodePudding user response:

Just test, managed way 1: create a button, button is xx. Show 1
Direct response right-click menu button, but XX is still invalid, right-click menu

Managed way 2: establish a TIME, in the TIME value is 0, when the right-click menu response TIME numerical 100
The code is as follows:

 Private Sub pup_Click () 
Timer1. Interval=100
End Sub

Private Sub Timer1_Timer ()
Timer1. Interval=0
Form3. Show 1
End Sub

This code can be effective pop-up FORM3 right-click menu, but that is a bit too complicated and not easy to visual code, write a bit long, all feel puzzling, a great god what tricks?

CodePudding user response:

And, with TIME method also is not very good, right-click menu has several, dozens of, bring up the form there are a lot of, use a lot of TIME is obviously not appropriate, can only be in the same way that a pass code, such as

 Private Sub pup_Click () 
S="personal comprehensive"
Timer1. Interval=100
End Sub

Private Sub Timer1_Timer ()
Timer1. Interval=0
The select case S
Case "personal comprehensive
"Form3. Show 1
Case "other 1
"Other 1. Show 1
Case "other 2"
.
.
End the select
End Sub

Generation of tedious, easy to misunderstand, a great god is there a better way?

CodePudding user response:

Use a form instead of the default menu, also shows how to show one way?

CodePudding user response:

Use pop-up Windows instead of the pop-up menu, feel or this method is feasible

CodePudding user response:

Personal feeling is not difficult to dynamically add menu.
  • Related