我如何解决system.outofmemoryexception [英] How do I resolve system.outofmemoryexception

查看:364
本文介绍了我如何解决system.outofmemoryexception的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序有几个按钮,可以打开从资源到AxAcroPDF1的PDF。

这是我的代码



私人Sub Button50_Click(发送者为对象,e为EventArgs)处理Button50。点击

Panel4.Visible = False

如果Label51.Text =我的pdfbooks那么

Panel5.Visible = True

Panel5.Width = 1024

Panel5.Height = 598

Dim tempfile As String = IO。 Path.Combine(IO.Path.GetTempPath,pdfs.pdf)

My.Computer.FileSystem.WriteAllBytes(tempfile,My.Resources.my_pdfbooks,False)

AxAcroPDF1.src = tempfile

结束如果



我尝试过:



我试过通过不同的来源阅读,但他们在谈论数据库,但我的应用程序根本没有数据库。我需要帮助。

我也尝试删除if else语句的数量并且它有效。

解决方案

购买更多内存并安装它

Hi, My application has several buttons that is suppose to open PDF from resources into AxAcroPDF1.
Here are my codes

Private Sub Button50_Click(sender As Object, e As EventArgs) Handles Button50.Click
Panel4.Visible = False
If Label51.Text = "my pdfbooks" Then
Panel5.Visible = True
Panel5.Width = 1024
Panel5.Height = 598
Dim tempfile As String = IO.Path.Combine(IO.Path.GetTempPath, "pdfs.pdf")
My.Computer.FileSystem.WriteAllBytes(tempfile, My.Resources.my_pdfbooks, False)
AxAcroPDF1.src = tempfile
End If

What I have tried:

I have tried reading through different sources but they were talking about database but my application has no database at all. Please i need help.
I have also tried removing the amount of if else statement and it worked.

解决方案

Buy more memory and install it.


这篇关于我如何解决system.outofmemoryexception的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆