На главную Наши проекты:
Журнал   ·   Discuz!ML   ·   Wiki   ·   DRKB   ·   Помощь проекту
ПРАВИЛА FAQ Помощь Участники Календарь Избранное RSS
msm.ru
Модераторы: SCINER, B.V.
  
    > Как узнать какие шрифты использует , компьютер большие или маленькие
      ExpandedWrap disabled
        Private Declare Function GetDesktopWindow Lib "user32" () As Long
        Private Declare Function GetDC Lib "user32" (ByVal hwnd As Long) As Long
        Private Declare Function GetTextMetrics Lib "gdi32" Alias "GetTextMetricsA" (ByVal hdc As Long, lpMetrics As TTextMetric) As Long
        Private Declare Function SetMapMode Lib "gdi32" (ByVal hdc As Long, ByVal nMapMode As Long) As Long
        Private Declare Function ReleaseDC Lib "user32" (ByVal hwnd As Long, ByVal hdc As Long) As Long
        Private Const MM_TEXT = 1
        Private Type TTextMetric
           tmHeight As Integer
           tmAscent As Integer
           tmDescent As Integer
           tmInternalLeading As Integer
           tmExternalLeading As Integer
           tmAveCharWidth As Integer
           tmMaxCharWidth As Integer
           tmWeight As Integer
           tmItalic As String * 1
           tmUnderlined As String * 1
           tmStruckOut As String * 1
           tmFirstChar As String * 1
           tmLastChar As String * 1
           tmDefaultChar As String * 1
           tmBreakChar As String * 1
           tmPitchAndFamily As String * 1
           tmCharSet As String * 1
           tmOverhang As Integer
           tmDigitizedAspectX As Integer
           tmDigitizedAspectY As Integer
        End Type
         
        Public Function SmallFonts() As Boolean
           Dim PrevMapMode As Long, tm As TTextMetric
           PrevMapMode = SetMapMode(GetDC(0), MM_TEXT)
           GetTextMetrics GetDC(0), tm
           PrevMapMode = SetMapMode(GetDC(0), PrevMapMode)
           If tm.tmHeight > 16 Then SmallFonts = False Else SmallFonts = True
        End Function
      Сообщение отредактировано: Andrey_Kun -
      1 пользователей читают эту тему (1 гостей и 0 скрытых пользователей)
      0 пользователей:


      Рейтинг@Mail.ru
      [ Script execution time: 0,0128 ]   [ 15 queries used ]   [ Generated: 20.05.24, 17:00 GMT ]