Click here to Skip to main content
15,918,108 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:

I have an Windows forms based application which is developed in VB.Net. In which I am trying to export data into excel file from the database. On Export button click event, After getting the data from the database, code using Save File Dialog box for saving the file.

Fetching data from the database will take few minutes and if i switch between my application and other opened applications, the Save file dialog box is going hidden and is not visible when i am returning to my application but is showing in the task manager window.

How can I get the focus on Save File dialog box after returning to my application programmatically?

Thanks in advance for your support.

1 solution

I have done this like as soon as preparing the excel and before showing the save as daialog box, I am activaitng the current form in my application by using

method and it returns to the application and save as dialog box is showing on the top of the screen. This solved my issue somehow.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900