公告版位

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

 


最近發現C有個寫法很怪

明明

int *a;
文章標籤

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

Q1:預處理器 (Preprocessor),用預處理指令 #define 宣告一個常數,用以表示 1 年中有多少秒 (忽略閏年問題)。


ANS:#define SECONDS_PER_YEAR (60 * 60 * 24 * 365)UL

文章標籤

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

以程式設計方式放置控制項

Button1.Location = New Point(100, 100)

 

文章標籤

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

PictureBox1.SizeMode = PictureBoxSizeMode.StretchImage

範例

Dim PictureBox1 As New PictureBox()
Dim WithEvents Button1 As New Button

<STAThread()> _
Public Shared Sub Main()
    Application.EnableVisualStyles()
    Application.Run(New Form1())
End Sub

Private Sub InitializePictureBoxAndButton()

    Me.Controls.Add(PictureBox1)
    Me.Controls.Add(Button1)
    Button1.Location = New Point(175, 20)
    Button1.Text = "Stretch"

    ' Set the size of the PictureBox control.
    Me.PictureBox1.Size = New System.Drawing.Size(140, 140)

    'Set the SizeMode to center the image.
    Me.PictureBox1.SizeMode = PictureBoxSizeMode.CenterImage

    ' Set the border style to a three-dimensional border.
    Me.PictureBox1.BorderStyle = BorderStyle.Fixed3D

    ' Set the image property.
    Me.PictureBox1.Image = New Bitmap(GetType(Button), "Button.bmp")
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, _
    ByVal e As System.EventArgs) Handles Button1.Click
    ' Set the SizeMode property to the StretchImage value.  This
    ' will enlarge the image as needed to fit into
    ' the PictureBox.
    PictureBox1.SizeMode = PictureBoxSizeMode.StretchImage
End Sub
文章標籤

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

VB語法  Try...Catch...Finally 範例

Try
    Process.Start("http://www.microsoft.com")
Catch ex As Exception
    MsgBox("Can't load Web page" & vbCrLf & ex.Message)
End Try

 

文章標籤

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

VB  Select...Case語法範例   https://docs.microsoft.com/zh-tw/dotnet/visual-basic/language-reference/statements/select-case-statement

Dim number As Integer = 8
Select Case number
    Case 1 To 5
        Debug.WriteLine("Between 1 and 5, inclusive")
        ' The following is the only Case clause that evaluates to True.
    Case 6, 7, 8
        Debug.WriteLine("Between 6 and 8, inclusive")
    Case 9 To 10
        Debug.WriteLine("Equal to 9 or 10")
    Case Else
        Debug.WriteLine("Not between 1 and 10, inclusive")
End Select

文章標籤

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

最近,在做SPI 燒寫,為了要確認,是否燒錄正確,需要工具幫我們檢視

因為我的Flash是2Mbit大小,這隻程式很佛心所有的大小都有 如下

文章標籤

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

如果常常在比對bin檔,我覺得這套軟體很好用,叫做 Compare It! 4.2

這軟體的優點是,會把Address的位址對應很整齊,我嘗試過其他的compare軟體,位址兩邊都不相同而且會亂跑,

下載網頁  https://www.grigsoft.com/files.htm

文章標籤

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

今天在搜尋visual studio序號價錢時 ,看到這篇文章介紹,目前,有個團隊研發「SharpDevelop」的開源程式,介面大概跟Visual Studio 有著87%像阿!!

目前已經用這麼做了一專案,目前上沒有任何相容性的問題,額外的參考檔也是妥妥的可以加入,如果要省去序號價錢的朋友可以考慮這款...

官方網站  http://www.icsharpcode.net/OpenSource/SD/Default.aspx  真心覺得開發出這個軟體的人真的超屌,還開源程式碼給你

文章標籤

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

1.下載檔案的時候被Chrome瀏覽器封鎖!顯示:「可能會影響您的瀏覽品質,因此 Chromium 已經予以封鎖。」按「關閉」繼續

 

文章標籤

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

今天要說明的是,在C語言中,2個byte如果要轉十進制 如何做?

2個byte分別為high byte 和 low byte,可以組合成一個0-65535大小的十進制 ,

在C語言可以這樣寫:

文章標籤

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

printf之變數參數

轉 換 字 元

以何種形式列印對應的引數

文章標籤

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

VB十六進制轉ASCII方法

    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
End Class

文章標籤

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

今天想要每次開啟資料夾時,讓他另外開啟新的視窗,怎麼做呢?

第1.使用任何一個資料夾尋找最上面的"檢視"

2.上面那排的"選項"

文章標籤

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

寫這麼久VB,竟然不知道工具項中的名稱就叫做控制項 ,真的很蝦,今天就來弄清楚,

在VB中,可以拉取的UI介面就叫做"控制項"


文章標籤

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

VB - 找出所有panel內的lable名稱

如果有panel9控制項,我要取得之中所有label控制項的name,那我該怎麼做?

文章標籤

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

VB -Textbox換行和不換行的方法

控制項右上角有個箭頭指過去

會出現multline的框框打勾後,就可以換行了

文章標籤

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

如標題 如何把中日英文變成URL編碼

在IE上 如果輸入中文 或許還可以搜尋 ,但遇上日文字就問號亂碼給你看,但其他瀏覽器事不會發生

因此要避免這問題,先把中日英文字轉成"URL"編碼,就不會這問題囉

文章標籤

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

專案環境VS2017

1.開頭加入

Imports System.Web

文章標籤

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

Keil 編譯成功後會在 Build Output 事窗出現一條訊息:
Program Size: Code=5124 RO-data=696 RW-data=92 ZI-data=22316 
這條訊息可以計算出所使用的 Code Size 。

文章標籤

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