Guest User

Untitled

a guest
Dec 16th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. Dim $p[2][2]=[[50,230],[400,21]]
  2.  
  3. $hGUI = GUICreate("Line", 500, 500)
  4. GUISetState()
  5. $dc = GetDC($hGUI)
  6.  
  7. For $x = $p[($p[1][0]<$p[0][0])][0] To $p[($p[1][0]>$p[0][0])][0]
  8. DllCall("gdi32.dll","long","SetPixel","long",$dc,"long",$x,"long",(($p[1][1]-$p[0][1])/($p[1][0]-$p[0][0]))*($x-$p[0][0])+$p[0][1],"long",0)
  9. Next
  10.  
  11. While GUIGetMsg()<>-3 And Sleep(10)
  12. WEnd
  13.  
  14. Func GetDC($handle)
  15. $aRet = DllCall("user32.dll", "int", "GetDC", "hwnd", $handle)
  16. Return $aRet[0]
  17. EndFunc ;==>GetDC
Add Comment
Please, Sign In to add comment