Private Sub Form_Load() Picture1.Width = 320 * Screen.TwipsPerPixelX Picture1.Height = 240 * Screen.TwipsPerPixelY Picture2.Width = 320 * Screen.TwipsPerPixelX Picture2.Height = 240 * Screen.TwipsPerPixelY Picture1.Picture = LoadPicture("nosignal.bmp") Picture2.Picture = LoadPicture("nosignal.bmp") End Sub Private Function Different(ByVal a As Long, ByVal b As Long) As Boolean 'Checks different of two colors ar = a Mod 256: a = a \ 256 ag = a Mod 256: a = a \ 256 ab = a Mod 256: a = a \ 256 br = b Mod 256: b = b \ 256 bg = b Mod 256: b = b \ 256 bb = b Mod 256: b = b \ 256 sense = 255 - Slider1.Value * 5 Different = (Sqr((ar - br) * (ar - br) + (ag - bg) * (ag - bg) + (ab - bb) * (ab - bb)) > sense) 'formula for counting different End Function
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)