Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Make a form vbModal and form below still work... 1

Status
Not open for further replies.

ToshTrent

Technical User
Joined
Jul 27, 2003
Messages
209
Hi,

I need to have a vbModal for prompt up whilst my database is printing, but when i prompt a vbmodal form the processes are stopped, is there away that I can prompt a form which doesn't allow the user to conduct any tasks, but some processes to still continue...

e.g

Form1

Open Database
Form2.Show vbModal <--- I need this to show and the process below to run...
Print Database



[red]
Thankyou[/red]
Matt
 
why not simply show a standard form, with a prompt, and lock all the other forms, or force this form to the front, so the user has to complete this prompt before continuing. As it is only a standard form, showing this will not stop any further actions from running.

BB
 
Drop this into a public module:

Option Explicit
Private Declare Function MessageBox Lib &quot;user32&quot; Alias &quot;MessageBoxA&quot; (ByVal hwnd As Long, ByVal lpText As String, ByVal lpCaption As String, ByVal wType As Long) As Long

Call it like this:

MessageBox MyForm.hWnd, &quot;Hi&quot;, &quot;Caption&quot; , vbInformation Or vbOKOnly

The wType constants you can take from the VB MsgBox
 
Thank you CCLINT, can I apply this to a normal form aposed to a MsgBox?
 
Try showing your form like this...

Form2.Show , Form1
 
But of course you will have to disable any controls you dont want the user to play with
 
Tried it that way, it was a b*gger to do, i had to disable all menu items, outlook bar items, etc.

[red]
Thankyou[/red]
Matt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top