Advertisement
ASP_Volume2 Coding Standards #29257

Size into pixels

Here is a real simple way to convert the size of vb into pixels.

AI

Yapay Zeka Özeti: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Kaynak Kod
original-source
<b>I found that if you want to convert the vb size into pixels simply do this<br>
(of course change <font color="green">vbsize</font> to how large the control is ex 495)<br>
<font color="blue">Pixels = </font><font color="green">vbsize </font><font color="blue">/ Screen.TwipsPerPixelX</font> or <font color="blue">Y</font><br>
To turn pixels into vb<br>
(Change pixels into how many pixels ex 33)<br>
<font color="blue">VB = </font><font color="green">pixels</font> <font color="blue">* Screen.TwipsPerPixelX</font> or <font color="blue">Y</font><br>
Examples:<br>
<font color="blue">txtPixelHeight.Text = 495 / Screen.TwipsPerPixelX</font> or <font color="blue">Y</font><br>
<font color="blue">Me.Height = 33 * Screen.TwipsPerPixelX</font> or <font color="blue">Y</font><br>
Hope this helps and please vote.<br>You are free to change or modify this code however you want.
Orijinal Yorumlar (3)
Wayback Machine'den kurtarıldı