真实的国产乱ⅩXXX66竹夫人,五月香六月婷婷激情综合,亚洲日本VA一区二区三区,亚洲精品一区二区三区麻豆

成都創(chuàng)新互聯(lián)網(wǎng)站制作重慶分公司

vb.net中選擇文件 vba選擇文件對(duì)話框

vb.net 怎么計(jì)算選擇的文件md5值,寫(xiě)在textbox中?

Public Function md5(ByVal a As String) As String

創(chuàng)新互聯(lián)專(zhuān)注于萊蕪網(wǎng)站建設(shè)服務(wù)及定制,我們擁有豐富的企業(yè)做網(wǎng)站經(jīng)驗(yàn)。 熱誠(chéng)為您提供萊蕪營(yíng)銷(xiāo)型網(wǎng)站建設(shè),萊蕪網(wǎng)站制作、萊蕪網(wǎng)頁(yè)設(shè)計(jì)、萊蕪網(wǎng)站官網(wǎng)定制、小程序設(shè)計(jì)服務(wù),打造萊蕪網(wǎng)絡(luò)公司原創(chuàng)品牌,更為您提供萊蕪網(wǎng)站排名全網(wǎng)營(yíng)銷(xiāo)落地服務(wù)。

Dim tempmd5 As System.Security.Cryptography.MD5 = New System.Security.Cryptography.MD5CryptoServiceProvider()

Dim bytResult() As Byte = tempmd5.ComputeHash(System.Text.Encoding.Default.GetBytes(a))

Dim strResult As String = BitConverter.ToString(bytResult)

strResult = strResult.Replace("-", "")

Return strResult

End Function

如果要計(jì)算文件的就把參數(shù)改成字節(jié)數(shù)組就可以了,然后獲取文件GetBytes()傳進(jìn)去就可以了。

Vb.net 操作Excel如何選擇sheet

具體操作如下:

首先,須在項(xiàng)目里引用: 添加引用-Com-Microsoft Excel 9.0 Object Library (這是EXCEL2000)

1 打開(kāi)Excel: dim myexcel as new Excel.Application() myexcel.visible=true

2 添加新的工作簿: myexcel.Workbooks.add()

3 設(shè)定第二個(gè)工作表為活動(dòng)工作表: myexcel.worksheets(2).Acivate()

4 打開(kāi)指定的Excel文件: myexcel.workbooks.open("c:\my.xls")

5 顯示Excel窗口: myexcel.visible=true

6 更改Excel的標(biāo)題欄: myexcel.caption="歡迎,歡迎!"

7 為Excel的單元格賦值: myexcel.cells(1,4).value=100 此語(yǔ)句使Excel當(dāng)前工作表的第一行第四列,即D1單元格等于100, 也可以這樣寫(xiě): myexcel.Range("D1").value=100

8 設(shè)置指定列的寬度(單位:字符個(gè)數(shù)): myexcel.ActiveSheet.colums(1).columnwidth=20 設(shè)定當(dāng)前工作表第1列的寬度為20

9 設(shè)置指定行的高度(單位:磅): myexcel.ActiveSheet.rows(1).rowHeight=1/0.035 1磅 =0.035厘米 設(shè)置第1行的高度為1CM

10 插入分頁(yè)符: myexcel.Activesheet.rows(20).pagebreak=1 在第20行前插入分頁(yè)符

11 刪除分頁(yè)符: myexcel.Activesheet.columns(20).pagebreak=0 在第20列前刪除分頁(yè)符

12 指定邊框線的寬度: myexcel.Activesheet.range("B3:D3").borders(1).weight=3 其中borders參數(shù)指定單元格邊框的位置: 1:左 2:右 3:頂 4:底 5:斜\ 6:斜/

13 指定邊框線條的類(lèi)型: myexcel.Activesheet.range("B1:D3").borders(2).linestyle=1 此語(yǔ)句將當(dāng)前工作表的B1:D3單元格的右邊框設(shè)置為實(shí)線 linestyle參數(shù): 1:細(xì)實(shí)線 2:細(xì)虛線 3:點(diǎn)虛線 4:雙細(xì)實(shí)線

14 設(shè)置頁(yè)腳: myexcel.activesheet.pagesetup.centerfooter="第p頁(yè)" 注意:設(shè)置頁(yè)眉頁(yè)腳時(shí)要保證計(jì)算機(jī)上裝有打印機(jī),否則出錯(cuò)!

15 設(shè)置頁(yè)眉: myexcel.activesheet.pagesetup.centerfooter="第p頁(yè)"

16 設(shè)置頁(yè)眉到頂斷距離為2cm: myexcel.Activesheet.pagesetup.Headermargin=2/0.035

17 設(shè)置頁(yè)腳到底端距離為2cm: myexcel.Activesheet.pagesetup.Footermargin=2/0.035

18 設(shè)置頂邊邊距為2cm: myexcel.Activesheet.pagesetup.topmargin=2/0.035

19 設(shè)置底邊邊距為2cm: myexcel.Activesheet.pagesetup.Bottommargin=2/0.035

20 設(shè)置左邊邊距為2cm: myexcel.Activesheet.pagesetup.Leftmargin=2/0.035

21 設(shè)置右邊邊距為2cm: myexcel.Activesheet.pagesetup.Rightmargin=2/0.035

22 設(shè)置頁(yè)面水平居中: myexcel.activesheet.pagesetup.CenterHorizontally=true

23 設(shè)置頁(yè)面垂直居中: myexcel.activesheet.pagesetup.Centervertically=true

24 設(shè)置頁(yè)面紙張大小 (1,窄行 8.5*11 ;39 ,寬行 14*11): myexcel.activesheet.pagesetup.papersize=1

25 打印單元格網(wǎng)格線: myexcel.activesheet.pagesetup.PrintGridlines=true

26 復(fù)制整個(gè)工作表 : myexcel.activesheet.Usedrange.Copy

27 復(fù)制指定區(qū)域 : myexcel.activesheet.range("a1:b5").Copy

28 粘貼: myexcel.worksheets("sheet2").range("A1").PasteSpecial

29 在第2行前插入一行 : myexcel.activesheet.rows(2).Insert

30 在第2列前插入一列 : myexcel.Activesheet.Columns(2).Insert

31 合并 C4:D4 單元格: myexcel.Activesheet.Range("C4:D4").Merge()

32 自動(dòng)調(diào)整第2列列寬: myexcel.activesheet.Columns(2).AutoFit

33 設(shè)置字體: myexcel.Activesheet.cells(2,1).font.name="黑體"

34 設(shè)置字體大?。?myexcel.Activesheet.cells(2,1).font.size=25

35 設(shè)置字體為斜體: myexcel.Activesheet.cells(2,1).font.Italic=true

36 設(shè)置字體為粗體: myexcel.Activesheet.cells(2,1).font.Bold=true

37 清除單元格內(nèi)容: myexcel.activesheet.cells(2,1).ClearContents

38 打印預(yù)覽工作表: myexcel.Activesheet.PrintPreview

39 打印工作表: myexcel.Activesheet.Printout

40 工作表另存為: myexcel.ActiveWorkbook.saveas("C:\book2.xls")

41 放棄存盤(pán): myexcel.ActiveWorkbook.saved=false

42 關(guān)閉工作簿: myexcel.Workbooks.close

43 退出 Excel: myexcel.quit

清楚了這些命令,操作excel不就變的很輕松了。

VB.net遍歷某個(gè)文件夾,并讀取子目錄中的指定文件

vb.net:

Dim

path

=

System.IO.Directory.GetFiles("D:\Log\abc",

"*.txt",

SearchOption.AllDirectories):搜索該路徑下的所有txt類(lèi)型的目錄及子目錄

path.AddRange(path)

Dim

_RecordInfo

As

String

Dim

_Reader

As

StreamReader

_Reader

=

New

StreamReader(file,

System.Text.Encoding.Default):'以Default編碼的形式讀取file文件(文件寫(xiě)入的編碼要與讀取的編碼一致)


網(wǎng)頁(yè)標(biāo)題:vb.net中選擇文件 vba選擇文件對(duì)話框
URL鏈接:http://weahome.cn/article/dosscgs.html

其他資訊

在線咨詢(xún)

微信咨詢(xún)

電話咨詢(xún)

028-86922220(工作日)

18980820575(7×24)

提交需求

返回頂部