Hi, I have vb.net application.
In the form I have print button and when I do print, after printing the form is closed. so I have to reopen the form.
I tried much, but I am not able solve the problem.
Please help me.
I put following code in print click event

Private Sub btnPrint_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrint.Click
        PrintDocument1.Print()
    End Sub

Maybe you close it in your printform or somewhere else. Definetly not in your button click.

it worked perfectly few days ago,,, but suddenly it got this problem.
Actually the matter is that when i press print button... the form is hidden and appeared in the taskbar of PC.

So i have to reopen the page from there.

After i reopen the page and I again press the print button, this event is not happening.

The event happens only when I restart the project.

This probelm is occuring in everyforms where the print event is.

I have't set any form close event in my any of the code.

If you can see the form in the taskbar it is not hidden but minimized. So check all of your code for the word minimized using quick find from your edit menu.

I tried ur method.. but there couldn't found anything as minimized in the code.
furthermore this problem is not happening everytime.
Even for trial i buld new project with print command and the same problem is coming .

I applied the same code as PrintDocument1.Print()
I also went through above method in last thread.
But I think there might me a problem in my visual studio 2008.
The same problem is persistent.

Why don't you close all other open programs and than try? It might be the same problem as described in the thread.

Hi,.
It has no relation with any open programe.
Its ocuuring even when application only is running.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.