资讯

精准传达 • 有效沟通

从品牌网站建设到网络营销策划,从策略到执行的一站式服务

vb.net另存为,vb另存为程序怎么写

vb.net保存另存

你就不能这样保存么? ↓

西宁网站建设公司成都创新互联公司,西宁网站设计制作,有大型网站制作公司丰富经验。已为西宁上千提供企业网站建设服务。企业网站搭建\外贸营销网站建设要多少钱,请找那个售后服务好的西宁做网站的公司定做!

Static SaveNumber as Integer

SaveNumber += 1

Dim SavePath as String = "C:\ytakqi" SaveNumber ".png"

bit.Save(SavePath)

VB,NET 如何把WORD另存为HTML

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

'定义Word对象

Dim wordApp As New Word.ApplicationClass

'要转换的文件名

Dim fileName As Object = "E:\Test.doc"

'默认值

Dim miss As Object = System.Reflection.Missing.Value

'打开要转换的 DOC 文件

Dim doc As Word.Document = DirectCast(wordApp.Documents.Open(fileName, miss, miss, miss, miss, miss, _

miss, miss, miss, miss, miss, miss, _

miss, miss, miss, miss), Word.Document)

'转换后的文件名

fileName = "E:\testDoc.HTML"

'保存的文件格式

Dim saveFormat As Object = Word.WdSaveFormat.wdFormatHTML

'按文本文件保存

doc.SaveAs(fileName, saveFormat, miss, miss, miss, miss, _

miss, miss, miss, miss, miss, miss, _

miss, miss, miss, miss)

'关闭是否保存文件,这里为不保存

Dim changes As Object = False

'关闭文件

doc.Close(changes, miss, miss)

'退出 Word 应用程序

wordApp.Quit(changes, miss, miss)

End Sub

vb.net中怎么将chart中的图表复制到剪贴板和另存为成图片文件?求大神帮助

private void Save_Click(object sender, System.EventArgs e) { // Create a new save file dialog SaveFileDialog saveFileDialog1 = new SaveFileDialog(); // Sets the current file name filter string, which determines // the choices that appear in the "Save as file type" or // "Files of type" box in the dialog box. saveFileDialog1.Filter = "Bitmap (*.bmp)|*.bmp|JPEG (*.jpg)|*.jpg|EMF (*.emf)|*.emf|PNG (*.png)|*.png|SVG (*.svg)|*.svg|GIF (*.gif)|*.gif|TIFF (*.tif)|*.tif"; saveFileDialog1.FilterIndex = 2 ; saveFileDialog1.RestoreDirectory = true ; // Set image file format if(saveFileDialog1.ShowDialog() == DialogResult.OK) { ChartImageFormat format = ChartImageFormat.Bmp; if( saveFileDialog1.FileName.EndsWith( "bmp" ) ) { format = ChartImageFormat.Bmp; } else if( saveFileDialog1.FileName.EndsWith( "jpg" ) ) { format = ChartImageFormat.Jpeg; } else if( saveFileDialog1.FileName.EndsWith( "emf" ) ) { format = ChartImageFormat.Emf; } else if( saveFileDialog1.FileName.EndsWith( "gif" ) ) { format = ChartImageFormat.Gif; } else if( saveFileDialog1.FileName.EndsWith( "png" ) ) { format = ChartImageFormat.Png; } else if( saveFileDialog1.FileName.EndsWith( "tif" ) ) { format = ChartImageFormat.Tiff; } else if( saveFileDialog1.FileName.EndsWith( "svg" ) ) { format = ChartImageFormat.Svg; } // Save image Chart1.SaveImage( saveFileDialog1.FileName, format ); } }

vb.net 保存excel弹出一个重命名对话框,另存为到其他盘

添加一个SaveFileDialog,在保存excle选择时候添加

SaveFileDialog1.show()

用法跟OpenFileDialog相同

用vb.net编写写字板时怎么实现保存与另存为

可以用SaveFileDialog1对话框加上对文件数据操作的类来实现,,用richtextbox自己的属性方法也能行!我以前做过一个记事本程序就是那样的!

vb.net中datagradview 另存为excel文件的问题

Public Class Cls导入数据

Dim xlApp As New Excel.Application()

Dim xlBook As Excel.Workbook

Dim xlSheet As Excel.Worksheet

Dim A = "A"

Public Function 导出到Excel(ByVal Dt表 As DataTable) As Boolean

Dim rowIndex, colIndex As Integer

rowIndex = 1

colIndex = 0

xlBook = xlApp.Workbooks().Add

xlSheet = xlBook.Worksheets("sheet1")

Dim Table As New DataTable()

Table = CreaTable()

'将所得到的表的列名,赋值给单元格

Dim Col As DataColumn

Dim Row As DataRow

For Each Col In Table.Columns

colIndex = colIndex + 1

xlApp.Cells(1, colIndex) = Col.ColumnName

Next

'得到的表所有行,赋值给单元格

For Each Row In Table.Rows

rowIndex = rowIndex + 1

colIndex = 0

For Each Col In Table.Columns

colIndex = colIndex + 1

xlApp.Cells(rowIndex, colIndex) = Row(Col.ColumnName)

Next

Next

With xlSheet

.Range(.Cells(1, 1), .Cells(1, colIndex)).Font.Name = "黑体"

'设标题为黑体字

.Range(.Cells(1, 1), .Cells(1, colIndex)).Font.Bold = True

'标题字体加粗

.Range(.Cells(1, 1), .Cells(rowIndex, colIndex)).Borders.LineStyle = 1

'设表格边框样式

End With

With xlSheet.PageSetup

.LeftHeader = "" Chr(10) """楷体_GB2312,常规""10公司名称:" ' Gsmc

.CenterHeader = """楷体_GB2312,常规""公司人员情况表""宋体,常规""" Chr(10) """楷体_GB2312,常规""10日 期:"

.RightHeader = "" Chr(10) """楷体_GB2312,常规""10单位:"

.LeftFooter = """楷体_GB2312,常规""10制表人:"

.CenterFooter = """楷体_GB2312,常规""10制表日期:"

.RightFooter = """楷体_GB2312,常规""10第P页 共N页"

End With

xlApp.SaveWorkspace()

MsgBox("保存完毕", MsgBoxStyle.Exclamation, "提示")

KillAllExcels()

'xlApp.Visible = True

End Function

Sub KillAllExcels()

Dim proc As System.Diagnostics.Process

For Each proc In System.Diagnostics.Process.GetProcessesByName("EXCEL")

proc.Kill()

Next

End Sub

end class


文章名称:vb.net另存为,vb另存为程序怎么写
转载来于:http://cdkjz.cn/article/hsojoj.html
多年建站经验

多一份参考,总有益处

联系快上网,免费获得专属《策划方案》及报价

咨询相关问题或预约面谈,可以通过以下方式与我们联系

大客户专线   成都:13518219792   座机:028-86922220