Private Type Guid
Data1 As Long
Data2 As Integer
Data3 As Integer
Data4(0 To 7) As Byte
End Type
Private Type FONTDESC
cbSizeofstruct As Long
lpstrName As Long
cySize As Currency
sWeight As Integer
sCharset As Integer
fItalic As Long
fUnderline As Long
fStrikethrough As Long
End Type
Private Declare Function OleCreateFontIndirect Lib "olepro32" (pFontDesc As FONTDESC, riid As Guid, ppvObj As StdFont) As Long
Public Font As StdFont
Dim fd As FONTDESC, IID_IDispatch As Guid
With IID_IDispatch
.Data1 = &H20400
.Data4(0) = &HC0
.Data4(7) = &H46
End With
With fd
.cbSizeofstruct = Len(fd)
.lpstrName = StrPtr(mFontName)
.cySize = mFontSize
.sWeight = LF.lfWeight
.sCharset = LF.lfCharSet
.fItalic = LF.lfItalic
.fUnderline = LF.lfUnderline
.fStrikethrough = LF.lfStrikeOut
End With
OleCreateFontIndirect fd, IID_IDispatch, Font
Set Text1.Font = CDlgEx1.Font
Совершенно точно, что нельзя. Там просто нет этой функциональностиDVV писал(а):Огромное спасибо,но мне хотелось бы использовать Common dialog.Если знаешь как здесь делать привязочку напиши пожалуйста!
private CdlgEx1 As New CdlgEx
private sub DIALOG_FOLDER()
dim str1 as string
CdlgEx1.Filter = "bmp|*.bmp|All files|*.*"
CdlgEx1.InitDir = "C:\"
CdlgEx1.ShowOpen
str1 = CdlgEx1.FileName 'str1 содержит выбранный файл
end sub
Сейчас этот форум просматривают: AhrefsBot, Yandex-бот и гости: 8