Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Equivalent of (IntPtr)1 in VBNET?

I've taken a piece of code from a @Hans Passant code from here: Bold text in MessageBox

this is the C# code:

SendMessage(hText, WM_SETFONT, mFont.ToHfont(), (IntPtr)1)

Which would be the translation into vb.net?

This will not work (cant be compiled):

SendMessage(hText, WM_SETFONT, mFont.ToHfont(), DirectCast(1, IntPtr))
like image 636
ElektroStudios Avatar asked Oct 09 '13 21:10

ElektroStudios


1 Answers

Try this:

SendMessage(hText, WM_SETFONT, mFont.ToHfont(), New IntPtr(1))
like image 175
Douglas Barbin Avatar answered Sep 21 '22 08:09

Douglas Barbin