公告版位

沒有痛苦 就沒有收穫
若內容對你有幫助,可以留言讓我知道哦~
有問題想要諮詢可以請至這裡連絡我哦 =>不會就放這邊

 


HEX文件和BIN文件格式的區別
1.HEX文件是包括地址信息的,而BIN文件格式只包括了數據本身
在燒寫或下載HEX文件的時候,一般都不需要用戶指定地址,因為HEX文件內部的信息已經包括了地址。而燒寫BIN文件的時候,用戶是一定需要指定地址信息的。

文章標籤

JL8051 發表在 痞客邦 留言(0) 人氣()

情境:假設 我有一個combox1 和一個 Textbox1 , 我選擇Combox1上面選項時要同時更動textbox1上的數值

方法如下:

要做這個功能要用 底下的SelectedIndex 在textbox1上面顯示

文章標籤

JL8051 發表在 痞客邦 留言(0) 人氣()

Hiberfil.sys

開啟CMD 打上 powercfg.exe -h off

關閉睡眠 就不會有這檔案出現囉

文章標籤

JL8051 發表在 痞客邦 留言(0) 人氣()

My.Computer.FileSystem 物件的 DeleteFile 方法可讓您刪除檔案。 提供的選項包括︰是否要將已刪除的檔案傳送至 [資源回收筒]、是否要求使用者確認應該刪除檔案,以及使用者取消該作業時該怎麼辦。 刪除文字檔 使用 DeleteFile 方法來刪除檔案。 下列程式碼示範如何刪除名為 test.txt 的檔案。
My.Computer.FileSystem.DeleteFile("C:\test.txt")
刪除文字檔並要求使用者確認應該刪除檔案 使用 DeleteFile 方法來刪除檔案,並將 showUI 設定為 AllDialogs。 下列程式碼示範如何刪除名為 test.txt 的檔案,並讓使用者確認應該刪除檔案。
              My.Computer.FileSystem.DeleteFile("C:\test.txt",
        Microsoft.VisualBasic.FileIO.UIOption.AllDialogs,
        Microsoft.VisualBasic.FileIO.RecycleOption.DeletePermanently,
        Microsoft.VisualBasic.FileIO.UICancelOption.DoNothing)
刪除文字檔並將它傳送至資源回收筒 使用 DeleteFile 方法來刪除檔案,並指定 recycle 參數的 SendToRecycleBin。 下列程式碼示範如何刪除名為 test.txt 的檔案,並將它傳送至 [資源回收筒]。
My.Computer.FileSystem.DeleteFile("C:\test.txt",
Microsoft.VisualBasic.FileIO.UIOption.AllDialogs,
Microsoft.VisualBasic.FileIO.RecycleOption.SendToRecycleBin)
文章標籤

JL8051 發表在 痞客邦 留言(0) 人氣()

VB - 如何判斷輸入是否為數字
if NOT IsNumeric(TextBox1.Text) Then
   MessageBox.Show ("欄位輸入必須為數值")
   Exit Sub
End If

文章標籤

JL8051 發表在 痞客邦 留言(0) 人氣()

 Public Function AsciiStringToHexString(ByVal asciiString As String) As String
        Dim ascii() As Byte = System.Text.Encoding.Default.GetBytes(asciiString)
        Dim count As Integer = ascii.Length
        Dim hexArray(count - 1) As String
        For idx As Integer = 0 To count - 1
            hexArray(idx) = ascii(idx).ToString("x2")
        Next
        Return String.Join(" ", hexArray)
    End Function


    Public Function HexStringToAsciiString(ByVal hexString As String) As String
        Dim array() As String = hexString.Split(New Char() {" "c}, StringSplitOptions.RemoveEmptyEntries)
        For idx As Integer = 0 To array.Length - 1
            array(idx) = Chr(CInt(String.Format("&h{0}", array(idx))))
        Next
        Return String.Join(String.Empty, array)
    End Function


    Private Sub tbxASCII_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tbxASCII.TextChanged
        If Me.ActiveControl Is sender Then
            tbxHex.Text = AsciiStringToHexString(tbxASCII.Text)
        End If
    End Sub

    Private Sub tbxHex_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tbxHex.TextChanged
        If Me.ActiveControl Is sender Then
            tbxASCII.Text = HexStringToAsciiString(tbxHex.Text)
        End If
    End Sub

文章標籤

JL8051 發表在 痞客邦 留言(0) 人氣()

在 DataGridView 中修改

'設定自動設定欄位高度
AutoSizeRowsMode = DisplayCells

JL8051 發表在 痞客邦 留言(0) 人氣()

他的語法格式是:

Filesystem.rename(a,b)
a代表輸入的檔案,也就是要被改名的檔案

JL8051 發表在 痞客邦 留言(0) 人氣()

如何尋找同一資料夾副檔名相同的檔案?

 

Dim FileName As String
Dim result(100) As String
Dim count As Integer

    FileName = Dir("C:\temp\*.txt", vbNormal)
    count = 0
    Do While FileName <> ""
     Debug.Print FileName
     result(count) = FileName
     FileName = Dir
     count = count + 1
    Loop

JL8051 發表在 痞客邦 留言(0) 人氣()

Dim sample_voltage(5800) As Integer

Array.Clear(sample_voltage, 0, sample_voltage.Length) ' 清除矩陣


文章標籤

JL8051 發表在 痞客邦 留言(0) 人氣()

這函數超好用啊!測試code用的到

Dim RR(5) As Byte
Dim rnd As New Random()
rnd.NextBytes(RR)
Textbox1.text=RR(0)
Textbox1.text=RR(1)

 

文章標籤

JL8051 發表在 痞客邦 留言(0) 人氣()

1.這是送一個指令的方法 

SerialPort2.Write(CMD.Text & Chr(&HD))

說明:0x0D為console的斷句碼

文章標籤

JL8051 發表在 痞客邦 留言(0) 人氣()

一些不錯的VB資源站

 

日文站

文章標籤

JL8051 發表在 痞客邦 留言(0) 人氣()

1.下載HtmlAgilityPack XPath Finder

官網下載 https://archive.codeplex.com/?p=hapxpathfinder

HtmlAgilityPack使用 (1).png

文章標籤

JL8051 發表在 痞客邦 留言(0) 人氣()

1. import

Imports HtmlAgilityPack

2.判斷標籤有幾個

文章標籤

JL8051 發表在 痞客邦 留言(0) 人氣()

Enhanced Serial Peripheral Interface (eSPI)

Embedded Controller (EC)

Baseboard Management Controller (BMC)

文章標籤

JL8051 發表在 痞客邦 留言(0) 人氣()

DataGridView1 add the checkbox

1.點選datagridview1/ 選擇右邊屬性欄/按小按鈕

datagridview1

文章標籤

JL8051 發表在 痞客邦 留言(0) 人氣()

今天要介紹 如何知道DataGridView1有幾筆資料的語法, how many the datagirdview1 data?

GridView1.Rows.Count.ToString 

文章標籤

JL8051 發表在 痞客邦 留言(0) 人氣()

How to do VB random function ,example is

如何產生VB無重複的亂數,程式碼如下

Dim MyValue As Integer
MyValue = Int((6 * Rnd) + 1)    ' Generate random value between 1 and 6.


文章標籤

JL8051 發表在 痞客邦 留言(0) 人氣()

Web 版 Skype

網址:  https://web.skype.com/

想要在網頁上執行skype,可以用用他們提供的網頁版

文章標籤

JL8051 發表在 痞客邦 留言(0) 人氣()