|
-
Oct 7th, 2002, 06:27 AM
#1
Thread Starter
New Member
-
Oct 7th, 2002, 06:46 AM
#2
Frenzied Member
Use the Form_GotFocus routine
-
Oct 7th, 2002, 07:11 AM
#3
Thread Starter
New Member
-
Oct 7th, 2002, 07:15 AM
#4
Put what you need to reinitialize in a Sub Routine. Call it when the form loads, and call it again when you need to redo stuff. Make sure the Sub is Public so it can be called from a different form.
-
Oct 7th, 2002, 07:16 AM
#5
I think the MDI parent will get the activate event.
-
Oct 7th, 2002, 07:33 AM
#6
PowerPoster
This is all you need to do:
VB Code:
'Form2 - non MDI child
Private Sub Form_Unload(Cancel As Integer)
Form1.SetFocus 'set focus back to MDI child form
End Sub
'Form1 - MDI child
Private Sub Form_Activate()
Debug.Print "Form1.Activate"
End Sub
-
Oct 7th, 2002, 08:01 AM
#7
Don't use MDI forms...They suck like small squirrels riding tandom on a used turnip...
-
Oct 7th, 2002, 08:09 AM
#8
PowerPoster
Don't use MDI forms...They suck ...
It's not about what we like but what business needs.
-
Oct 7th, 2002, 08:29 AM
#9
Business does not know what it needs...The majority of the time, the user hasn't got a clue what they want, or what is on offer. 90% of the time a customer has asked for something and I have offered an alternative, which they have agreed is a better way than theirs...
MDI forms, Multi Document Interfaces, and designed exactally for that tpye of project. A project that has many of the same type of document open, ie word 97...One MDI form can control loads of word documents. In this situation MDI forms are great. But when trying to write an app that has many types of forms and displays, MDI forms are just plain crap, and should not be used for these types of applications.
I have no idea why people use MDI forms for non MDI applications. It just makes no sense! 
To be a good programmer you have to know what is the right control, code, references for the job...for some strange and bizzare reason, people continually use MDI forms...and then run into trouble. Menu's are a cracking example, and the reason being is that an MDI document shouldn't have menus All the tools/function or any other menu should be on the MDI form and Not in the child document...
Woka
-
Oct 7th, 2002, 08:41 AM
#10
PowerPoster
You are totally wrong on this: serious applications (not to mention interfaces) are design by architects and often according to a very serious analisys done by a group of analysts. Developer may dissagree on some issues wich may or may not be taken into considerations but it all depends on the entire picture wich isn't necessary of our (developres) business.
-
Oct 7th, 2002, 09:13 AM
#11
I disagree...serious applications? What do you class as a serious application? One that controls the state and production of a million pounds worth of GaAs wafers, for military and satalite communications, as it goes through different processes? If so, then the apps I write are very serious. I make a mistaken then oooops, I've just cost the company one hundred thousand quid...
-
Oct 7th, 2002, 09:16 AM
#12
PowerPoster
Woka,
you have your opinion wich (unfortunately for you) I can't change it. So let's stop this chit-chat.
-
Oct 7th, 2002, 09:35 AM
#13
Wasn't having a go or anything, was just trying to put my point across, which, if you haven't guessed already, I am sticking too 
No offence meant 
If MDI forms had more features, or if they were easier to use, or didn't restrict your coding in anyway then I would use them more often as they do have some benefits, just not for SDI applications...
me
-
Oct 7th, 2002, 10:36 AM
#14
Thread Starter
New Member
Originally posted by Hack
Put what you need to reinitialize in a Sub Routine. Call it when the form loads, and call it again when you need to redo stuff. Make sure the Sub is Public so it can be called from a different form.
hi hack...thank u...
-
Oct 7th, 2002, 10:37 AM
#15
Thread Starter
New Member
Originally posted by IROY55
This is all you need to do:
VB Code:
'Form2 - non MDI child
Private Sub Form_Unload(Cancel As Integer)
Form1.SetFocus 'set focus back to MDI child form
End Sub
'Form1 - MDI child
Private Sub Form_Activate()
Debug.Print "Form1.Activate"
End Sub
hey roy..ill try this... ..thanks
-
Oct 7th, 2002, 10:51 AM
#16
Thread Starter
New Member
Originally posted by Wokawidget
Business does not know what it needs...The majority of the time, the user hasn't got a clue what they want, or what is on offer. 90% of the time a customer has asked for something and I have offered an alternative, which they have agreed is a better way than theirs...
MDI forms, Multi Document Interfaces, and designed exactally for that tpye of project. A project that has many of the same type of document open, ie word 97...One MDI form can control loads of word documents. In this situation MDI forms are great. But when trying to write an app that has many types of forms and displays, MDI forms are just plain crap, and should not be used for these types of applications.
I have no idea why people use MDI forms for non MDI applications. It just makes no sense! 
To be a good programmer you have to know what is the right control, code, references for the job...for some strange and bizzare reason, people continually use MDI forms...and then run into trouble. Menu's are a cracking example, and the reason being is that an MDI document shouldn't have menus All the tools/function or any other menu should be on the MDI form and Not in the child document...
Woka
hey there.. ..
well..i think i really need to use mdichild..coz my users want some modules .. like 2-3 modules open simultaneously...they just use minimized..maximed to switch from one module to another which i cannot do when my form is in vbmodal(they want to eliminate the extra trip on menu)...but then i need other forms to be in vbmodal so to save necessary information before returning to main/calling form...
i guess if ill be the one to decide..ill make it simple as much as possible..who wants to run into trouble anyway...but i have my users...and i guess its my job to do what they think would be easier for them...thats whats automation is all about...i think..
...thanks for ur opinion anyway..ill keep it in mind...
-
Oct 7th, 2002, 11:00 AM
#17
No probs 
MDI forms are just a pet hate of mine...a HUGE pet hate 
Hope it works ok..
Woka
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|