设为首页
加入收藏
网站地图
动力论坛
今天:
维修首页 服务流程 服务项目 服务报价 网上学堂 购机指南 电脑优化 软件下载 技术交流
最新动态

热烈庆祝芯动力在@世界06年
@世界电脑城3周年庆典活动
国庆芯动力电脑连锁机构
国庆芯动力电脑连锁机构
芯动力数据恢复中心升级成
芯动力数据恢复中心升级成
More..

028-85353216 028-66742224
点击这里给我发消息 点击这里给我发消息
就业服务热线:

028-85350886

edu@cdwxw.net

三星COMBO时尚首选
一分钟教你辨别返修硬盘
硬件学堂之---谈超频的概念
内存品质的细微体现
AMD Athlon64处理器实际运
More...

手工彻底清除Backdoor.PWS
宽带时代的防毒措施
11.27预警:监控登陆窗口窃
光华反病毒资讯(11.27-12.
“USB间谍”变种a
更多...

用“替换法”“对照法”处
随机性死机故障分析与排除
全面深入了解电脑死机的原
“蓝屏”的原因及处理方法
黑屏的几个原因
电脑死机原因大全
更多...

当前位置:

首页>>电脑维修>>网络学堂>>软件故障>>其它软件>>正文

把图象文件转换成XML格式文件


来源:不详  作者:未知  点击数:
 
利用.NET 框架下的FromBase64String和ToBase64String方法可以很容易地实现图象文件和XML文件的互换。这样可以轻易解决以XML格式保存图片的问题。代码如下:

Public Class Form1
  Inherits System.Windows.Forms.Form

#Region " Windows 窗体设计器生成的代码 "
Public Sub New()
  MyBase.New()
  InitializeComponent()
  '在 InitializeComponent() 调用之后添加任何初始化
End Sub

'窗体重写处置以清理组件列表。
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
  If disposing Then
   If Not (components Is Nothing) Then
    components.Dispose()
   End If
  End If
  MyBase.Dispose(disposing)
End Sub

'Windows 窗体设计器所必需的
Private components As System.ComponentModel.IContainer
'注意:以下过程是 Windows 窗体设计器所必需的
'可以使用 Windows 窗体设计器修改此过程。
'不要使用代码编辑器修改它。
Friend WithEvents Button1 As System.Windows.Forms.Button
Friend WithEvents Button2 As System.Windows.Forms.Button
Friend WithEvents PictureBox1 As System.Windows.Forms.PictureBox
Friend WithEvents Button3 As System.Windows.Forms.Button
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents Label2 As System.Windows.Forms.Label
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
  Me.Button1 = New System.Windows.Forms.Button()
  Me.Button2 = New System.Windows.Forms.Button()
  Me.PictureBox1 = New System.Windows.Forms.PictureBox()
  Me.Button3 = New System.Windows.Forms.Button()
  Me.Label1 = New System.Windows.Forms.Label()
  Me.Label2 = New System.Windows.Forms.Label()
  Me.SuspendLayout()
  '
  'Button1
  '
  Me.Button1.Location = New System.Drawing.Point(365, 63)
  Me.Button1.Name = "Button1"
  Me.Button1.Size = New System.Drawing.Size(115, 23)
  Me.Button1.TabIndex = 0
  Me.Button1.Text = "将图象保存成XML"
  '
  'Button2
  '
  Me.Button2.Location = New System.Drawing.Point(365, 98)
  Me.Button2.Name = "Button2"
  Me.Button2.Size = New System.Drawing.Size(115, 23)
  Me.Button2.TabIndex = 1
  Me.Button2.Text = "从XML中得到图象"
  '
  'PictureBox1
  '
  Me.PictureBox1.Location = New System.Drawing.Point(18, 6)
  Me.PictureBox1.Name = "PictureBox1"
  Me.PictureBox1.Size = New System.Drawing.Size(320, 460)
  Me.PictureBox1.TabIndex = 2
  Me.PictureBox1.TabStop = False
  '
  'Button3
  '
  Me.Button3.Location = New System.Drawing.Point(365, 28)
  Me.Button3.Name = "Button3"
  Me.Button3.Size = New System.Drawing.Size(115, 23)
  Me.Button3.TabIndex = 3
  Me.Button3.Text = "浏览图片…"
  '
  'Label1
  '
  Me.Label1.Location = New System.Drawing.Point(369, 135)
  Me.Label1.Name = "Label1"
  Me.Label1.Size = New System.Drawing.Size(105, 95)

本新闻共3页,当前在第1页  1  2  3  

  下一篇:Ghost 使用详解

上一篇:简单实现强大的加密功能——CryptoAPI

  相关内容
 
SAM文件基础知识
简单实现强大的加密功能——CryptoAPI
关于我们|版权申明|广告服务网站地图友情链接人才招聘