Creates a standard OLE Font object.
VB6
![]() |
---|
Public Function CreateFont( _ |
C++
![]() |
---|
public: |
A font object.
The standard OLE Font class implementation is not marked as safe for scripting. So, depending on its security settings, Internet Explorer might display a warning message when creating an "stdfont" COM object from script, or it might refuse creating the font and return null/Nothing as the result of the VBScript CreateObject method or the JavaScript "new ActiveXObject". The CreateFont method lets you create an OLE Font object without any security restrictions.
The following code sets the text and font of a box.
VB6
![]() |
---|
aBox.Text = "Arial, 12, Italic" |