TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Dozd
NA
65
0
Accessing printPreviewDialog affter closing
Aug 5 2010 12:45 PM
Hi I have one form, with one button, and one printPreviewDialog. The idea is when the button is clicked printPreviewDialog should be shown. When button is clicked first time PrintPreviewDialog appears. But when you click this button another time - second time - this error message appers:"Cannot access a disposed object.Object name:'PrintPreviewDialog'.".
This is the code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace MyProject
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void btnShowPrintPreview_Click(object sender, EventArgs e)
{
printPreviewDialog1.Show();
}
}
}
Reply
Answers (
0
)
datatable values can be changed
manipulate explorer.exe