J
J.P.
I've developed a custom form that it is triggered from a button click
where the button is tied to a custom macro. The form is being loaded
from the macro code. With that said, I'm getting unexpected/
unacceptable behavior from the form.
1. Even though the dialog is a modal dialog, the outlook window is
still active when the dialog is being shown. The window still remains
on top of the outlook window even if focus is shifted to the main
outlook window. This is a problem because the actions the macro
performs are dependent on the items selected in outlook at the time
the button was clicked so I do not want the selections to be changed
'by accident' due to the user clicking around.
2. I have the form set to start at the center of the parent but it
does not. I am working on a dual monitor system and the dialog always
opens on the second monitor even if I have the main outlook window on
the primary display.
I think the problem is that I am not setting the form's parent
properly (actually, I'm not setting it all because I'm having trouble
finding out how to do this properly through code period). Here's some
sample code of what I'm doing (from within a class module method):
Dim frmTest as New FormTest
' set some form properties before display
frmTest.Foo = "bar"
frmTest.Baz = "foo"
frmTest.Show vbModal
TIA,
J.P.
where the button is tied to a custom macro. The form is being loaded
from the macro code. With that said, I'm getting unexpected/
unacceptable behavior from the form.
1. Even though the dialog is a modal dialog, the outlook window is
still active when the dialog is being shown. The window still remains
on top of the outlook window even if focus is shifted to the main
outlook window. This is a problem because the actions the macro
performs are dependent on the items selected in outlook at the time
the button was clicked so I do not want the selections to be changed
'by accident' due to the user clicking around.
2. I have the form set to start at the center of the parent but it
does not. I am working on a dual monitor system and the dialog always
opens on the second monitor even if I have the main outlook window on
the primary display.
I think the problem is that I am not setting the form's parent
properly (actually, I'm not setting it all because I'm having trouble
finding out how to do this properly through code period). Here's some
sample code of what I'm doing (from within a class module method):
Dim frmTest as New FormTest
' set some form properties before display
frmTest.Foo = "bar"
frmTest.Baz = "foo"
frmTest.Show vbModal
TIA,
J.P.