A
A
Artem2016-07-10 17:43:13
Programming
Artem, 2016-07-10 17:43:13

How to display and open pdf files from folder in TabControl?

There is a TabControl with buttons. Different tabControl pages have different pdf documents. Maybe there will be word. They are displayed as a list (as in a folder). These pdf documents need to be opened in view mode (so that they cannot be edited). How can I do that?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
Johnny Gat, 2016-07-10
@Deni74

Screen
3ea3b9c3a79e48408bb31fa2c98c19ca.jpg

Remember my yesterday's example?)
On the tabControl page, you throw the "WebBrowser" element (marked in red in the figure). And change the button click handler:
private void button1_Click(object sender, EventArgs e)
{
    tabControl1.SelectTab(1);
    webBrowser1.Navigate("путь_к_pdf_файлу");
}

PS: most likely you will need to have Adobe Reader installed on your PC.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question