VB.Net application halted while printing crystal report in client environment - vb.net

I am currently developing a vb.net application in VS 2005, with crystal report XI. I have come across a a problem where my application halted while printing reports. There is no error in my application, it's just that I can't click on any part/menu in the application while printing. The user opens the printing window form from the menu item, the form opens, he clicks on the 'print' button and it will print directly to his printer without preview. After a successful printing session, a text message box will display 'Printing success!'. Only then the user can continue click on other part/menu of the application. It would be troublesome during printing a large number pages of report, because the user have to wait all the pages finished printing only then they can continue to click on other menu of the system. Fro example, when I execute the printing window form (let's say form A), other posting form (Form B) becomes freeze. Below is my code for calling the report and directly printing to their printer.
my code snippet
I have to use simplex and duplex because the users requested the reports to be one-sided pages. My question is how to allow users to click on other menu/doing other posting with the system while printing those large number pages of reports?
Thanks for any help/input.

Turns out what I wanted was a background worker

Related

Make a VBA form appear in windows task bar

I am programming a little application (an overgrown macro really) in Visual Basic for Applications in Office 365. What it does is:
Displays one window that has a few input fields.
Once I fill out those fields with data I can press a button on the form and a summary in a nice graphical form is displayed in a second window (a second form is displayed using UserForm2.show).
The second user form can be updated with new data by typing in updated text in first form and updating the second form by pressing a button on the first form (in the form of UserForm2.TextField1.Text = UserForm1.Label1.Text.
Both forms are modeless so the user can work in Outlook whilst the forms are running.
All works fine except one caveat:
Both forms are not visible on the Windows Taskbar, in the Task Manager, but most importantly they are not visible as separate windows to teleconferencing software we are using. And this is the macro's sole purpose.
Question: Is it possible to make the entire macro (or just UserForm2) run as if it was a separate application, so it appears in the Task Bar as a separate window, and not an internal form running inside Outlook?
The idea is not to run it independently of Outlook (or Excel), but to make them visible to external programs.
I tried a few options available on the Internet, but none of them work, and honestly I do not know where to begin, or how to circumvent it if it is not possible to do directly within the available API. Can you advise?

How to change Report Viewer settings when report changes in vb.net

I have a report viewer that I use to display multiple reports. So the user basically selects a report he wants to see and I display it on the report viewer. While the form that holds the report viewer is open the user can select a different report and I can display it, no problem. The issue arises when the user first chooses a report that is in landscape mode and without closing the report viewer form chooses a report that is in portrait mode. The portrait form report displays in landscape mode because the initial report displayed was in landscape mode and vise versa.
So I guess I need a way to initialize the report viewer each time a new report is being displayed so that it takes the mode of the new report. Or set the display mode of the report viewer to the correct mode of the report depending on the mode of the report being called for display.
Thanks for your help.
Found it...
ReportViewer1.ResetPageSettings()
Thanks

How to hide ribbon or control user action in microsoft word 2010 vb.net

When user clicks on my programmatically written add-in for Microsoft Word 2010 code does series of actions on the content of document. It takes quite a while for the task to be completed if the document is lets say 40 to 50 pages and the UI was freezing and remained in not responding state till the process completed.
To deal with that problem i used a background worker and added a progress bar so user should know work is under process.
Now while the document is being processed UI does not freeze but user is free to click other customized addins, change content of document etc.
I want to hide the ribbon(including home, insert, Addins) All of it after the user presses any of my addin buttons on the ribbon and show it again when the process completes.
please guide how to achieve this functionality.
Show the progress dialog after starting Background Worker. Once background worker is invoked, and the dialog is shown as Modal, it will freeze the Doc.

Display reports with non-modal messagebox

Am writing a VB.Net app written in VS2010. This displays some reports in several forms. (Am using Crystal Reports though this is incidental to the problem). The user needs to be able to check these, then confirm if he wishes to run the update process or abort.
My first idea was to ask the user to reply using a messagebox. But of course this is modal, so the user cannot browse through the reports.
I thought of other options but each seems to have problems:
- export the reports as PDFs, then display report in external Adobe Reader Window using System.Diagnostics.Process.Start("AcroRd32.exe", filename). This seems messy.
- create a non-modal message box or equivalent. This loses any concept of program flow, so am unconvinced by this
What ideas do you have please?
You should already be using a form to display the report(s). Put all the reports on the same form with scroll bars enabled and add a button to that form for the user to 'Update Process'.
You may come up with a better display based on how many reports you want the user to look at - like a drop down at the top with list of reports in it OR a radio button list on the left with reports listed etc.

Display Pop-Up in PDF when Clicked or Typed?

I have a collection of example documents in PDF forms that are viewed by clients, They all include a "Example" watermark prominently displayed but I have had some issues with clients trying to fill in the example forms and submitting as Official forms, normally followed by a support phone call from the client. I am looking for a way to pop up a message in the pdf if the client trys to type or click in the example document, I know how to pop up a message if they click in a form field but some of my documents do not have any form fields so I am looking for a way to show a message if a client trys to type or click anywhere in the actual document. I am using Acrobat X Pro.
Does anyone know of a way to do this?
Thanks in advance for any advice!!
Plop a big invisible button (not hidden, invisible) over the entire page, with a click action that pops up a message dialog with whatever warning you wish.