求指导惑,窗口显示PDF文件无法显示,程序出错

.Net技术 码拜 8年前 (2016-03-09) 745次浏览
工具箱–右键–选择项–COM组件–Adobe PDF Reader;在Resources中添加了pdf资源文件
程序编码为: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;
using System.IO;
namespace _5_pdf_
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void axAcroPDF1_OnError(object sender, EventArgs e)
{

File.WriteAllBytes(“微生物与行为和精神疾病_梁姗.pdf”, (byte[])Properties.Resources.ResourceManager.GetObject(“微生物与行为和精神疾病_梁姗.pdf”));
axAcroPDF1.src = “微生物与行为和精神疾病_梁姗.pdf”;
}
}
}
求指导释哪儿出错了?

解决方案

5

10

本人之前试过的,可以正常浏览pdf。你上面的代码有点驴头不对马嘴。

30

src属性是什么意思?你只是指定文件名就不对吧

CodeBye 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 , 转载请注明求指导惑,窗口显示PDF文件无法显示,程序出错
喜欢 (0)
[1034331897@qq.com]
分享 (0)