Poderias testar com um Timer:
Insira:
1 Timer (TimerPrintForm)
1 ProgressBar para acompanhar o andamento da operação
Deixe o Timer como "stop" no evento "load" do Form em que ele está instalado
No botão que usas coloque o timer para startar
Private
Sub TimerPrintForm_Tick(sender
As
Object, e
As
EventArgs)
Handles TimerPrintForm.Tick
ProgressBar1.Increment(1)
If ProgressBar1.Value = 1
Then
Label1.Text = "Preparando para Imprimir..."
End
If
If ProgressBar1.Value = 10
Then
'aqui coloca o código para imprimir o
"LayoutForm2"
Try
Dim pf
As
New Microsoft.VisualBasic.PowerPacks.Printing.PrintForm
pf.PrintAction = PrintAction.PrintToPrinter
pf.Print(LayoutForm2, Printing.PrintForm.PrintOption.ClientAreaOnly)
Catch ex
As
Exception
MsgBox("Ocorreu um erro ao imprimir!")
End
Try
End
If
If P1.Value = 30
Then
'aqui coloca o código para imprimir o
"LayoutForm3"
Try
Dim pf
As
New Microsoft.VisualBasic.PowerPacks.Printing.PrintForm
pf.PrintAction = PrintAction.PrintToPrinter
pf.Print(LayoutForm3, Printing.PrintForm.PrintOption.ClientAreaOnly)
Catch ex
As
Exception
MsgBox("Ocorreu um erro ao imprimir!")
End
Try
End
If
If P1.Value = 60
Then
End
If
If P1.Value = 90
Then
MsgBox("Operação realizada com sucesso!")
End
If
If P1.Value = 100
Then
ProgressBar1.Value = 1
TimerPrintForm.Stop()
End
If
End
Sub
Nota: O intervalo do Timer você coloca conforme o tempo que você achar melhor para a operação.
Espero ter lhe ajudado!
MS INFORMATICA