PIXNET Logo登入

斷了線的小木偶的部落格

跳到主文

歡迎光臨小木偶的鏍絲起子

部落格全站分類:數位生活

  • 相簿
  • 部落格
  • 留言
  • 名片
  • 8月 30 週二 201121:15
  • 用電腦系統音彈個小蜜蜂(BEEP 函數)

  Dim A As New BEEPDOREMI
        Console.Beep(A.DD("D"), 300)
        Console.Beep(A.DD("D"), 300)
        Console.Beep(A.DD("S"), 300)
        Console.Beep(A.DD("S"), 300)
        Console.Beep(A.DD("L"), 300)
        Console.Beep(A.DD("L"), 300)
        Console.Beep(A.DD("S"), 600)
        Console.Beep(A.DD("F"), 300)
        Console.Beep(A.DD("F"), 300)
        Console.Beep(A.DD("M"), 300)
        Console.Beep(A.DD("M"), 300)
        Console.Beep(A.DD("R"), 300)
        Console.Beep(A.DD("R"), 300)
        Console.Beep(A.DD("D"), 600)
        Console.Beep(A.DD("S"), 300)
        Console.Beep(A.DD("S"), 300)
        Console.Beep(A.DD("F"), 300)
        Console.Beep(A.DD("F"), 300)
        Console.Beep(A.DD("M"), 300)
        Console.Beep(A.DD("M"), 300)
        Console.Beep(A.DD("R"), 600)
        Console.Beep(A.DD("D"), 300)
        Console.Beep(A.DD("D"), 300)
        Console.Beep(A.DD("S"), 300)
        Console.Beep(A.DD("S"), 300)
        Console.Beep(A.DD("L"), 300)
        Console.Beep(A.DD("L"), 300)
        Console.Beep(A.DD("S"), 600)
        Console.Beep(A.DD("F"), 300)
        Console.Beep(A.DD("F"), 300)
        Console.Beep(A.DD("M"), 300)
        Console.Beep(A.DD("M"), 300)
        Console.Beep(A.DD("R"), 300)
        Console.Beep(A.DD("R"), 300)
        Console.Beep(A.DD("D"), 600)
Public Class BEEPDOREMI
    Public Function DD(ByVal MUSICBE As String) As Integer
        Dim DA As Integer
        Select Case MUSICBE
            Case "D"
                DA = 523
            Case "R"
                DA = 587
            Case "M"
                DA = 659
            Case "F"
                DA = 698
            Case "S"
                DA = 784
            Case "L"
                DA = 880
            Case "T"
                DA = 988
            Case "DD"
                DA = 1046
        End Select
        Return DA
    End Function
End Class
(繼續閱讀...)
文章標籤

斷了線的小木偶 發表在 痞客邦 留言(0) 人氣(235)

  • 個人分類:VB
▲top
  • 8月 30 週二 201121:12
  • windows事件檢事器

先載入兩個system的dll
imports system
Imports System.Diagnostics
    Dim sSource As String = "dotNET Sample App"
        Dim sLog As String = "Application"
        Dim sEvent As String = "Sample Eventgg"
        Try
            If (EventLog.SourceExists(sSource)) Then
                EventLog.CreateEventSource(sSource, sLog)
            End If
        '*此為靜態寫入event log*
            EventLog.WriteEntry(sSource, sEvent)
            EventLog.WriteEntry(sSource, sEvent, EventLogEntryType.Warning, 234)'**234警告標語,1054錯誤標語
        Catch ex As Exception
     msgbox(ex.message)
        End Try
(繼續閱讀...)
文章標籤

斷了線的小木偶 發表在 痞客邦 留言(0) 人氣(34)

  • 個人分類:VB
▲top
  • 8月 30 週二 201121:06
  • iTextSharp

令我有點頭大open source(我又討厭一直看英文。) 結合pdf和pic的作法。
      Dim i As Integer
        Try
            Dim pdfreadera As New PdfReader("D:\dlltesting_process\ttest22\gg.pdf") ''先new一個pdf的物件並將要合併的pdf放入
            Dim anumberofpages As Integer = pdfreadera.NumberOfPages ''計算該pdf的頁數
            Dim psize As Rectangle = pdfreadera.GetPageSize(1) ''先把第一頁抓出來
            Dim pdfwidth As Double = psize.Width ''讀pdf的寬度
            Dim pdfheight As Double = psize.Height ''讀pdf的長度
            Dim aa As Image ''新增一個image
            aa = Image.GetInstance("D:\002.JPG") ''載入圖片
            Dim outputstream As New FileStream("D:\aa.pdf", FileMode.Create) ''先create出一張空白的pdf檔
            Dim pdfstramer As New PdfStamper(pdfreadera, outputstream)  ''輸入、輸出路徑
            Dim watercontent As PdfContentByte  ''轉換pdf的內容
            '  aa.SetAbsolutePosition((250), (200))
            aa.SetAbsolutePosition(100, 300) '定位
            For i = 1 To anumberofpages
                watercontent = pdfstramer.GetUnderContent(i) ' pdfstramer.GetUnderContent(i) ''開始狂貼 under是代表貼在下層,over是貼在上層
                watercontent.AddImage(aa)
            Next
''作完之後要把所有的元件關閉
            pdfstramer.GetPdfLayers()
            pdfreadera.Close()
            pdfstramer.Close()
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try
(繼續閱讀...)
文章標籤

斷了線的小木偶 發表在 痞客邦 留言(0) 人氣(832)

  • 個人分類:VB
▲top
1

個人資訊

斷了線的小木偶
暱稱:
斷了線的小木偶
分類:
數位生活
好友:
累積中
地區:

熱門文章

  • (7,482)C# 透過Byte[] 方式檔案寫入

文章分類

toggle DataBase (1)
  • Mssql2005 (1)
toggle visual studio (2)
  • VB (3)
  • C# (6)
toggle Linux (1)
  • CentOS5 (2)
toggle DesignPattern (3)
  • Behavioral Patterns (1)
  • Creational Patterns (1)
  • structural Patterns (1)
toggle 碎碎念 (1)
  • 碎碎念 (4)
  • 未分類文章 (1)

最新文章

  • states Pattern
  • apsx && jQuery 透過 json 格式
  • 被xcode 4.2還有storyboard欺負了!
  • C# 透過Byte[] 方式檔案寫入
  • VS WCF輸傳限制
  • Reporting Server- WebServices 函數運用 (1)
  • Proxy Pattern
  • 偷懶好久, 最近真的什麼都不想做
  • 文章整理好累..
  • Log4Net - 動態設定儲存路徑

最新留言

    文章精選

    文章搜尋

    參觀人氣

    • 本日人氣:
    • 累積人氣: