Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Support Forum
Download Visual Studio Add-In

Terms of Use
Privacy Policy

Search Results for "ChooseFont" in [All]

comdlg32

.

[DllImport("comdlg32.dll", CharSet = CharSet.Auto, EntryPoint = "ChooseFont", SetLastError=true)]

.

public extern static bool ChooseFont(IntPtr lpcf);

.

Declare Function ChooseFont Lib "comdlg32.dll" (TODO) As TODO

.

public struct CHOOSEFONT

.

public enum CHOOSEFONTFLAGS

.

CHOOSEFONT choosefont = new CHOOSEFONT();

.

choosefont.lStructSize = Marshal.SizeOf(choosefont);

.

choosefont.nSizeMin = 64;

.

choosefont.nSizeMax = 64;

.

choosefont.Flags = (int)CHOOSEFONTFLAGS.CF_SCREENFONTS

.

     | (int)CHOOSEFONTFLAGS.CF_FORCEFONTEXIST

.

     | (int)CHOOSEFONTFLAGS.CF_INACTIVEFONTS

.

     | (int)CHOOSEFONTFLAGS.CF_INITTOLOGFONTSTRUCT

.

     | (int)CHOOSEFONTFLAGS.CF_SCALABLEONLY

.

     | (int)CHOOSEFONTFLAGS.CF_USESTYLE;

.

choosefont.lpLogFont = pLogfont;

.

IntPtr pChoosefont = Marshal.AllocHGlobal(Marshal.SizeOf(choosefont));

.

Marshal.StructureToPtr(choosefont, pChoosefont, false);

.

bool result = ChooseFont(pChoosefont);

.

Marshal.FreeHGlobal(pChoosefont);

.
Documentation
[ChooseFont] on MSDN

 
Access PInvoke.net directly from VS: