新人求助,窗口显示PDF文件无法显示,程序出错!!!!!!!!

wpw401160 2016-05-21 10:22:55
工具箱---右键---选择项--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";
}
}
}

求解释哪儿出错了?????????????
...全文
134 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
wpw401160 2016-05-22
  • 打赏
  • 举报
回复
求????????、?
wpw401160 2016-05-22
  • 打赏
  • 举报
回复
求大神,求帮助???????????????
wpw401160 2016-05-22
  • 打赏
  • 举报
回复
???????????
VisualTeam 2016-05-21
  • 打赏
  • 举报
回复
应该出错在 File.WriteAllBytes这一行。记得PDF不能这样。要用他的COM控件去

110,535

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧