VB

フォントハンドル

VB

VBでフォントのハンドルを取得するのは案外面倒。hFontは使い終わったらDeleteObjectすること。nSizeはポイント数ではなく高さであることに注意。単位はピクセル。 Public Declare Function CreateFont Lib "gdi32" Alias "CreateFontA" (ByVal H As Long, B…

vb

唐突だけどコンボボックスの補完処理。 Private Sub abbrevCombo(ByRef cbo As ComboBox) Dim i As Long Dim nLen As String Dim sItem As String Dim nCount As Long With cbo nLen = Len(.Text) nCount = .ListCount - 1 For i = 0 To nCount sItem = .Lis…