Detail Article

Fungsi Mendapatkan Nama Komputer

Public Function GetMyComputerName() As String
   Dim Bufstr$, sComputerName$
   Bufstr = Space$(50)
   If GetComputerName(Bufstr, 50) > 0 Then
       sComputerName = Bufstr
       sComputerName = RTrim(sComputerName)
       sComputerName = StrStripTerminator(sComputerName)
   Else
       sComputerName = ""
   End If
   GetMyComputerName = sComputerName
End Function

Function StrStripTerminator(ByVal AString As String) As String
   Dim intZeroPos As Integer
   intZeroPos = InStr(AString, Chr$(0))
   If intZeroPos > 0 Then
      StrStripTerminator = Left$(AString, intZeroPos - 1)
   Else
      StrStripTerminator = AString
   End If
End Function

Private Sub Form_Load()
   MsgBox GetMyComputerName
End Sub

AbelPutra.com

Perusahaan jasa pembuatan software, pembuatan aplikasi Android, Jasa design website dengan harga bersaing dan After Sales Service terbaik.

Opening Hours:

Mon – Fri : 10AM – 5PM

Sat - Sun : Closed

Get In Touch

Jelambar Selatan XVII-H Blok E No. 2B, Jakarta Barat

+628131485-5566 / +62816-1453-999

[email protected]

© AbelPutra.com 2024, Designed by HTML Codex