Skip to content

Instantly share code, notes, and snippets.

View Navisho's full-sized avatar

Iván Campos Navisho

View GitHub Profile
@Navisho
Navisho / new_gist_file.vbs
Created October 3, 2013 22:52
Check if font is installed
Public Function IsFontInstalled(ByVal FontName As String) As Boolean
Dim TestFont As Font = New Font(FontName, 10)
Return CBool(String.Compare(FontName, TestFont.Name, StringComparison.InvariantCultureIgnoreCase) = 0)
End Function
@Navisho
Navisho / new_gist_file.vbs
Created October 3, 2013 21:37
Install Font from VB.NET
sRoot = "\\dvdc\ITSoftware\ZebraLabels\CrystalFonts\"
Set shell = CreateObject("Shell.Application")
Set fonts = shell.Namespace(&H14)
Set oFSO = CreateObject("scripting.filesystemobject")
Set oFolder = oFSO.getfolder(sRoot)
For Each oFile In oFolder.files
If oFile.Type = "Font file" Then
fonts.CopyHere oFile.Path
End If
Next
@Navisho
Navisho / new_gist_file.vbs
Created October 3, 2013 21:29
Abrir un archivo con el programa asosiado
Dim proceso As New System.Diagnostics.Process
With proceso
.StartInfo.FileName = "C:\Mis documentos\Libro1.xls
.Start()
End With
@Navisho
Navisho / 0_reuse_code.js
Created October 3, 2013 21:03
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console