![]() |
Viết bởi: haquocquan 18-11-10, 01:07 AM Chuyên mục: Thư viện thủ thuật - Bài trả lời (1) |
Option Compare Database
'Khai bao cac hang
Const SPI_GETNONCLIENTMETRICS = 41
Const SPI_SETNONCLIENTMETRICS = 42
Const SPI_GETICONTITLELOGFONT = 31
Const SPI_SETICONTITLELOGFONT = 34
Const LF_FACESIZE = 32
'Khai bao cac kieu
Private Type LOGFONT
lfHeight As Long
lfWidth As Long
lfEscapement As Long
lfOrientation As Long
lfWeight As Long
lfItalic As Byte
lfUnderline As Byte
lfStrikeOut As Byte
lfCharSet As Byte
lfOutPrecision As Byte
lfClipPrecision As Byte
lfQuality As Byte
lfPitchAndFamily As Byte
lfFaceName As String * 32
End Type
Private Type NONCLIENTMETRICS
cbSize As Long
iBorderWidth As Long
iScrollWidth As Long
iScrollHeight As Long
iCaptionWidth As Long
iCaptionHeight As Long
lfCaptionFont As LOGFONT
iSMCaptionWidth As Long
iSMCaptionHeight As Long
lfSMCaptionFont As LOGFONT
iMenuWidth As Long
iMenuHeight As Long
lfMenuFont As LOGFONT
lfStatusFont As LOGFONT
lfMessageFont As LOGFONT
End Type
'Khai bao cac bieb thuoc kieu tren
Dim m_nonClientMetrics As NONCLIENTMETRICS
Dim m_logFont As LOGFONT
'Khai bao cac bien chua so do font
Dim m_fontCaption As String * 32
Dim m_fontSmCaption As String * 32
Dim m_fontMenu As String * 32
Dim m_fontMessage As String * 32
Dim m_fontStatus As String * 32
Dim m_fontIcon As String * 32
Dim m_fontHeight As Long, m_fontWeight As Long
'Khai bao ham API can dung
Private Declare Function SystemParametersInfo _
Lib "user32" Alias "SystemParametersInfoA" _
(ByVal uAction As Long, _
ByVal uParam As Long, _
ByRef lpvParam As Any, _
ByVal fuWinIni As Long) As Long
'Thu tuc thiet lap so do font he thong
Public Function SetSysFont(fontName As String)
Dim result As Long
'*****************************
'Truy xuat so do font hien tai
m_nonClientMetrics.cbSize = Len(m_nonClientMetrics)
result = SystemParametersInfo(SPI_GETNONCLIENTMETRICS, _
Len(m_nonClientMetrics), _
m_nonClientMetrics, 0)
result = SystemParametersInfo(SPI_GETICONTITLELOGFONT, _
Len(m_logFont), _
m_logFont, 0)
'**********************************
'Luu lai cac font he thong hien tai
'Luu lai font hien thi Caption
m_fontCaption = m_nonClientMetrics.lfCaptionFont.lfFaceName
m_fontHeight = m_nonClientMetrics.lfCaptionFont.lfHeight
m_fontWeight = m_nonClientMetrics.lfCaptionFont.lfWeight
'Luu lai font hien thi Caption nho
m_fontSmCaption = m_nonClientMetrics.lfSMCaptionFont.lfFaceName
'Luu lai font hien thi hop thoai thong bao
m_fontMessage = m_nonClientMetrics.lfMessageFont.lfFaceName
'Luu lai font Menu
m_fontMenu = m_nonClientMetrics.lfMenuFont.lfFaceName
'************************************
'Thay doi font
'font hien thi Caption
m_nonClientMetrics.lfCaptionFont.lfFaceName = fontName & vbNullChar
m_nonClientMetrics.lfCaptionFont.lfWeight = 700
m_nonClientMetrics.lfCaptionFont.lfHeight = -12
'font hien thi Caption nho
m_nonClientMetrics.lfSMCaptionFont.lfFaceName = fontName & vbNullChar
m_nonClientMetrics.lfSMCaptionFont.lfHeight = -12
'font hien thi hop thoai thong bao
m_nonClientMetrics.lfMessageFont.lfFaceName = fontName & vbNullChar
m_nonClientMetrics.lfMessageFont.lfHeight = -12
'font hien thi menu
m_nonClientMetrics.lfMenuFont.lfFaceName = fontName & vbNullChar
m_nonClientMetrics.lfMenuFont.lfHeight = -12
'thuc hien thay doi
result = SystemParametersInfo(SPI_SETNONCLIENTMETRICS, _
Len(m_nonClientMetrics), _
m_nonClientMetrics, 0)
result = SystemParametersInfo(SPI_SETICONTITLELOGFONT, _
Len(m_logFont), _
m_logFont, 0)
End Function
'Thu tuc thiet lap lai so do font cu
Public Sub restoreSysFont()
'font hien thi Caption
m_nonClientMetrics.lfCaptionFont.lfFaceName = m_fontCaption
m_nonClientMetrics.lfCaptionFont.lfHeight = m_fontHeight
m_nonClientMetrics.lfCaptionFont.lfWeight = m_fontWeight
'font hien thi Caption nho
m_nonClientMetrics.lfSMCaptionFont.lfFaceName = m_fontSmCaption
m_nonClientMetrics.lfSMCaptionFont.lfHeight = m_fontHeight
'font hien thi hop thoai thong bao
m_nonClientMetrics.lfMessageFont.lfFaceName = m_fontMessage
m_nonClientMetrics.lfMessageFont.lfHeight = m_fontHeight
'font hien thi menu
m_nonClientMetrics.lfMenuFont.lfFaceName = m_fontMenu
m_nonClientMetrics.lfMenuFont.lfHeight = m_fontHeight
'thuc hien thay doi
result = SystemParametersInfo(SPI_SETNONCLIENTMETRICS, _
Len(m_nonClientMetrics), _
m_nonClientMetrics, 0)
result = SystemParametersInfo(SPI_SETICONTITLELOGFONT, _
Len(m_logFont), _
m_logFont, 0)
End Sub
SetSysFont ("Tahoma")
restoreSysFont()
![]() |
Viết bởi: Noname 16-11-10, 09:46 PM Chuyên mục: Query - Không có hồi đáp |
ALTER TABLE table {ADD {COLUMN field type[(size)] [NOT NULL] [CONSTRAINT index] |
ALTER COLUMN field type[(size)] |
CONSTRAINT multifieldindex} |
DROP {COLUMN field I CONSTRAINT indexname} }
ALTER TABLE Employees ADD COLUMN Notes TEXT(25)
ALTER TABLE Employees ALTER COLUMN ZipCode TEXT(10)
![]() |
Viết bởi: Noname 15-11-10, 09:32 AM Chuyên mục: Quán cóc - Bài trả lời (1) |
![]() |
Viết bởi: Noname 14-11-10, 11:34 PM Chuyên mục: Quán cóc - Bài trả lời (3) |
![]() |
Viết bởi: DoquangLam 14-11-10, 09:59 PM Chuyên mục: Thư Viện Ứng Dụng - Bài trả lời (73) |
Chủ đề Mới nhất |
CoinMinutes Việt Nam Tri ... -Chuyên mục: Chuyện bốn phương-Đăng bởi lần cuối: davidsmithmq-3 Giờ trước- » Bài trả lời: 0- » Lượt xem: 4 |
Entente EE88 -Chuyên mục: Ms PowerPoint-Đăng bởi lần cuối: ee88grado-7 Giờ trước- » Bài trả lời: 0- » Lượt xem: 1 |
Best Child Porn -Chuyên mục: Ms PowerPoint-Đăng bởi lần cuối: dmjproahf-10 Giờ trước- » Bài trả lời: 0- » Lượt xem: 3 |
Treaty EE88 -Chuyên mục: Ms PowerPoint-Đăng bởi lần cuối: ee88grado-Hôm nay, 07:11 AM- » Bài trả lời: 0- » Lượt xem: 2 |
Giup minh voi -Chuyên mục: Query-Đăng bởi lần cuối: GeorgeGab-Hôm nay, 06:23 AM- » Bài trả lời: 6- » Lượt xem: 852 |
Introduction to EE88 -Chuyên mục: Ms PowerPoint-Đăng bởi lần cuối: ee88slert-Hôm nay, 01:33 AM- » Bài trả lời: 0- » Lượt xem: 2 |
offtopic -Chuyên mục: Thảo Luận Access-Đăng bởi lần cuối: nalarsonre-Hôm nay, 01:24 AM- » Bài trả lời: 0- » Lượt xem: 3 |
Quản lý kho bằng Accesss -Chuyên mục: Thảo Luận Access-Đăng bởi lần cuối: thaominhtam-11-09-25, 11:47 AM- » Bài trả lời: 69- » Lượt xem: 5,496 |
Quản Lý Phòng Khám Tư Nhâ... -Chuyên mục: Thư Viện Ứng Dụng-Đăng bởi lần cuối: tt1212-09-09-25, 05:03 PM- » Bài trả lời: 32- » Lượt xem: 7,119 |
Thử nghiệm upload hình -Chuyên mục: Phòng thử nghiệm-Đăng bởi lần cuối: Noname-29-08-25, 09:44 AM- » Bài trả lời: 2- » Lượt xem: 693 |
Diễn đàn Thống kê |
» Thành viên: 6,453 » Thành viên mới nhất: HyeRoof775 » Các chủ đề diễn đàn: 9,904 » Các bài viết diễn: 48,832 Thống kê đầy đủ |