Dim pfc As New PrivateFontCollection()
Sub InstallFont(FontFileName)
Dim sTEMPpath As String = Environment.GetEnvironmentVariable("TEMP")
Try
My.Computer.FileSystem.WriteAllBytes(sTEMPpath & "\moolatoo.font.ttf", FontFileName, False)
pfc.AddFontFile(sTEMPpath & "\moolatoo.font.ttf")
Catch
End Try
End Sub
Instantiate the Font
InstallFont(My.Resources.DroidSansMono)
Use the Font
lstEntries.Font = New Font(pfc.Families(0), 11, FontStyle.Regular)
.
Private Sub MyForm_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown
If (e.KeyCode = Keys.F And e.Control) Then
Debug.Print("^F Pressed")
e.SuppressKeyPress = True
Dim sSearch As String = InputBox("Enter keywords")
funSearch(sSearch)
ElseIf e.KeyCode = Keys.F5 Then
btnRefresh.PerformClick()
End If
End Sub