Version

SetWidthInPixels Method

Assigns a value to the Width property that is equals to the specified number of pixels at the specified resolution.
Syntax
'Declaration
 
Public Sub SetWidthInPixels( _
   ByVal value As Integer, _
   ByVal dpi As Single _
) 
public void SetWidthInPixels( 
   int value,
   float dpi
)

Parameters

value
The border's width, expressed as an integral number of pixels.
dpi
The pixel resolution, expressed as the number of pixels required to span one inch.
Remarks

Values less than zero are not permitted for either parameter; an exception is thrown when a negative value is assigned. Values that would exceed the minimum or maximum allowable value are rounded to the min/max as required.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also