|
-
Aug 17th, 2000, 10:34 PM
#1
Thread Starter
Member
I'm new to VB, and I am stumped on this class assignment! Please help me!
I am attempting to add a “Tip of the day” to a small text editor. My problem involves two forms: “frmMDI” and “frmTip.” What I want is for “frmMDI” to load and “frmTip” to THEN load in the FRONT of and in the CENTER of “frmMDI.”
I first placed “frmTip.Show” as the last line in “Private Sub frmMDI_Load().” Both forms loaded, but “frmTip” loaded BEHIND “frmMDI” and could not be seen.
I then changed “frmTip.Show” to “frmTip.Show vbmodal.” “frmTip” then loaded first and “frmMDI” waited until “frmTip” was closed before it finished loading.
I then changed “frmTip.Show vbModal” back to “frmTip.Show” And made “frmTip” a MDI Child. “FrmMDI” now loads first and “frmTip” loads in the center as I want it to, but it quickly “snaps” to the upper left corner of “frmMDI.”
QUESTION: How can I get “frmTip” to load and STAY in the front and center of “frmMDI?”
Please Help!
Wendy
-
Aug 17th, 2000, 10:48 PM
#2
Guru
You ALMOST got it right when you did this:
frmTip.Show vbModal
The problem is, the form frmMDI isn't shown yet (because the Load event isn't complete).
So you have to show it manually:
Show
frmTip.Show vbModal
Also, on frmTip set the StartUpPosition property to 1 - CenterOwner for it to show up in the middle.
-
Aug 17th, 2000, 11:31 PM
#3
Thread Starter
Member
Excellent!
Thanks, Yonatan! It works perfect. I guess I learned a lot trying to figure this out for myself, but you sure made it easy and I won't forget how it's done. I owe you one.
Thanks again!
Wendy
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
|