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

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

vb.net讀取版本號(hào) VB的版本

vb做的軟件如何獲得自己的版本號(hào)?

如果你用的是vb6,而且指的是你在編譯程序的時(shí)候?qū)懙陌姹咎?hào),比如1.0.1可以用app的屬性得到

創(chuàng)新互聯(lián)從2013年創(chuàng)立,先為烏蘭察布等服務(wù)建站,烏蘭察布等地企業(yè),進(jìn)行企業(yè)商務(wù)咨詢服務(wù)。為烏蘭察布企業(yè)網(wǎng)站制作PC+手機(jī)+微官網(wǎng)三網(wǎng)同步一站式服務(wù)解決您的所有建站問題。

MsgBox App.Major "." App.Minor "." App.Revision

其中major是主版本,minor是次版本,revision是修正

在.net中會(huì)比較麻煩點(diǎn),參考下面

Type FileInfo

wLength As Integer

wValueLength As Integer

szKey As String * 16

dwSignature As Long

dwStrucVersion As Long

dwFileVersionMS As Long

dwFileVersionLS As Long

End Type

' NOTE: The following Declare statements are case sensitive.

Declare Function GetFileVersionInfo Lib "Version" _

Alias "GetFileVersionInfoA" (ByVal FileName$, _

ByVal dwHandle, ByVal cbBuff, ByVal lpvData$)

Declare Function GetFileVersionInfoSize Lib "Version" Alias _

"GetFileVersionInfoSizeA" (ByVal FileName$, dwHandle)

Declare Sub hmemcpy Lib "Kernel32" Alias "RtlMoveMemory" _

(hpvDest As Any, hpvSource As Any, ByVal cbBytes)

Function LOWORD(x As Long) As Integer

LOWORD = x And HFFFF

' Low 16 bits contain Minor revision number.

End Function

Function HIWORD(x As Long) As Integer

HIWORD = x \ HFFFF

' High 16 bits contain Major revision number.

End Function

'----------------------------------------

'以下為執(zhí)行模塊,在 VBE 界面按 F5 執(zhí)行

'----------------------------------------

Function displayVersion()

Dim x As FileInfo

Dim FileVer As String

Dim FileName As String

Dim dwHandle, BufSize, lpvData$, R

'*** Get Version Information If Available ****

FileVer = ""

'FileName = 路徑

FileName = Environ("windir") "\system32\msjet40.dll"

BufSize = GetFileVersionInfoSize(FileName, dwHandle)

If BufSize = 0 Then

MsgBox "Invalid File Name or no Version information available"

Exit Function

End If

lpvData$ = Space$(BufSize)

R = GetFileVersionInfo(FileName, dwHandle, BufSize, lpvData$)

hmemcpy x, ByVal lpvData$, Len(x)

'**** Parse File Version Number ****

FileVer = Trim$(Str$(HIWORD(x.dwFileVersionMS))) + "."

FileVer = FileVer + Trim$(Str$(LOWORD(x.dwFileVersionMS))) + "."

FileVer = FileVer + Trim$(Str$(HIWORD(x.dwFileVersionLS))) + "."

FileVer = FileVer + Trim$(Str$(LOWORD(x.dwFileVersionLS)))

MsgBox FileVer, 64, "Version of " FileName

End Function

本文來自CSDN博客,轉(zhuǎn)載請(qǐng)標(biāo)明出處:

VB.NET 注冊(cè)表讀取

VB.NET主要是利用RegistryKey類封裝的方法、屬性等來進(jìn)行與注冊(cè)表相關(guān)的各種操作。

請(qǐng)參閱RegistryKey類

Imports Microsoft.Win32

Public Class Form1

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Dim a As String = Registry.CurrentUser.GetSubKeyNames("")

End Sub

End Class

需要 Microsoft.Win32命名空間。

vb.net 應(yīng)用程序怎么獲取自己的版本號(hào)

Try

Me.Text = "版本V" Deployment.Application.ApplicationDeployment.CurrentDeployment.CurrentVersion.ToString()

Catch ex As Exception

Me.Text = "未知版本"

End Try

vb獲取硬件信息的代碼

tmpstr=""

set fso=createObject("scripting.filesystemObject")

Set dc = fso.Drives

for each d in dc

If d.isReady Then

tmpstr=tmpstr "磁盤" d.DriveLetter ":" vbcrlf _

"可用空間:" (d.AvailableSpace/1024/1024/1024) " GB" vbcrlf _

"空余空間:" (d.FreeSpace/1024/1024/1024) " GB" ?vbcrlf _

"總空間大?。? (d.TotalSize/1024/1024/1024) " GB" ?vbcrlf _

"文件系統(tǒng):" d.FileSystem vbcrlf _

"驅(qū)動(dòng)器類型:" d.DriveType vbcrlf _

"是否就緒:" d.IsReady vbcrlf _

"路徑:" d.Path vbcrlf _

"根目錄:" d.RootFolder vbcrlf _

"序列號(hào):" d.SerialNumber vbcrlf _

"共享名:" d.ShareName vbcrlf _

"卷名:" d.VolumeName vbcrlf vbcrlf

End If

Next

msgbox tmpstr

vb.net 顯示版本

這個(gè)你把1.0.2.3這個(gè)字符串處理下就可以了。

這個(gè)屬于字符串的處理


名稱欄目:vb.net讀取版本號(hào) VB的版本
當(dāng)前地址:http://weahome.cn/article/hpeooh.html

其他資訊

在線咨詢

微信咨詢

電話咨詢

028-86922220(工作日)

18980820575(7×24)

提交需求

返回頂部