![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
I am trying to create a splash screen for Outlook which basically asks the end user if
they agree to the Email Security Policy or Not. Its a VBA UserForm that is set to show on Application_Startup. ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Private Sub Application_Startup() UserForm1.Show End Sub ~~~~~~~~~~~~~~~~~~~~~~~~~~~ The ShowModal property of the form is set to True. This works fine on Outlook 2000. The end user cannot proceed to do anything with the Outlook Application until they click the "I Agree" button on the splach screen. If they choose not to agree then the splash screen quits out of the application. On Outlook 2003 the ShowModal property of the form seems to be implemented very differently. The splash opens up no problem, but the ShowModal = True seems to only apply to the Tool bar and Menu Bar buttons. The Close X button on the top right of the Outlook Application is active and when clicked it closes the splash screen. Browsing the Explorer folders and opening emails is also possible plus when the email is open Tool Bar and Menu Bar buttons also become active on that email. All this while the "Modal ??? Form" stays on top of the Application. When I run the project from within VB environment it works very well. In true Modal Fashion. The behaviour described above only happens when the application is starting up. To me this seems like one hell of a BUG..! Or, should I say Design Feature of OL 2003 or am I missing something? Has anyone come accross this before. Any idea how to get around it? Any help is greatly appricated. Rgds Dave O'Shea |
Ads |
#2
|
|||
|
|||
![]()
Looks like it's a bit of a bug in MSForms 2.0.
Instead I used Win API to get the handle of the form an set to the front, which as a matter of fact makes it modal. Private Declare Function SetForegroundWindow Lib "user32" (ByVal hWnd As Long) As Long Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" _ (ByVal lpClassName As String, ByVal lpWindowName As String) As Long Private Sub UserForm_Initialize() Dim hWnd As Long hWnd = FindWindow("ThunderDFrame", Me.Caption) SetForegroundWindow hWnd End Sub "David OShea" wrote in message ... I am trying to create a splash screen for Outlook which basically asks the end user if they agree to the Email Security Policy or Not. Its a VBA UserForm that is set to show on Application_Startup. ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Private Sub Application_Startup() UserForm1.Show End Sub ~~~~~~~~~~~~~~~~~~~~~~~~~~~ The ShowModal property of the form is set to True. This works fine on Outlook 2000. The end user cannot proceed to do anything with the Outlook Application until they click the "I Agree" button on the splach screen. If they choose not to agree then the splash screen quits out of the application. On Outlook 2003 the ShowModal property of the form seems to be implemented very differently. The splash opens up no problem, but the ShowModal = True seems to only apply to the Tool bar and Menu Bar buttons. The Close X button on the top right of the Outlook Application is active and when clicked it closes the splash screen. Browsing the Explorer folders and opening emails is also possible plus when the email is open Tool Bar and Menu Bar buttons also become active on that email. All this while the "Modal ??? Form" stays on top of the Application. When I run the project from within VB environment it works very well. In true Modal Fashion. The behaviour described above only happens when the application is starting up. To me this seems like one hell of a BUG..! Or, should I say Design Feature of OL 2003 or am I missing something? Has anyone come accross this before. Any idea how to get around it? Any help is greatly appricated. Rgds Dave O'Shea |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Strange copying of messages | Auguri | Outlook Express | 13 | February 10th 06 08:20 PM |
strange encryption behavior | Larry | Outlook - General Queries | 0 | January 24th 06 10:26 PM |
Strange Files | Newsgroups | Outlook - General Queries | 0 | January 22nd 06 03:12 PM |
"Design This Form" strange behaviour and not displaying as it should | James Cassidy | Outlook - Using Forms | 0 | January 21st 06 04:01 PM |
Collating sequence seems strange | Jim K | Outlook - Using Contacts | 2 | January 17th 06 09:44 PM |