'Declaration Public Overloads Shared Function GetPreferredSize( _ ByVal g As Graphics, _ ByVal size As Size, _ ByVal font As Font, _ ByVal text As String, _ ByVal textDown As String, _ ByVal nAlign As ButtonTextAlign, _ ByVal wordWrap As Boolean, _ ByVal shadowSize As Integer, _ ByVal pictUp As Image, _ ByVal pictDown As Image _ ) As Size
'Usage Dim g As Graphics Dim size As Size Dim font As Font Dim text As String Dim textDown As String Dim nAlign As ButtonTextAlign Dim wordWrap As Boolean Dim shadowSize As Integer Dim pictUp As Image Dim pictDown As Image Dim value As Size value = FpButton.GetPreferredSize(g, size, font, text, textDown, nAlign, wordWrap, shadowSize, pictUp, pictDown)
Parameters
- g
- GDI+ graphics surface
- size
- Size
- font
- Font
- text
- Text of button when not pressed
- textDown
- Text of button when pressed
- nAlign
- Alignment of text
- wordWrap
- Whether text wraps to multiple lines
- shadowSize
- Size of shadow around button
- pictUp
- Picture (image) when button is not pressed
- pictDown
- Picture (image) when button is pressed
Return Value
Size object containing the size of the control