Zedna Posted May 13, 2006 Posted May 13, 2006 (edited) Here is it: I'm also thinking about to make it moving ... expandcollapse popup#include <Color.au3> #include <GUIConstants.au3> $gui = GUICreate("Rainbow",@DesktopWidth, @DesktopHeight, 0, 0, $WS_POPUP) $size = WinGetClientSize($gui) $step = $size[0] / 6 _GUICtrlCreateGradient(0xFF0000, 0xFFFF00, 0*$step, 0, $step, $size[1]) _GUICtrlCreateGradient(0xFFFF00, 0x00FF00, 1*$step, 0, $step, $size[1]) _GUICtrlCreateGradient(0x00FF00, 0x00FFFF, 2*$step, 0, $step, $size[1]) _GUICtrlCreateGradient(0x00FFFF, 0x0000FF, 3*$step, 0, $step, $size[1]) _GUICtrlCreateGradient(0x0000FF, 0xFF00FF, 4*$step, 0, $step, $size[1]) _GUICtrlCreateGradient(0xFF00FF, 0xFF0000, 5*$step, 0, $step, $size[1]) GUISetCursor(16,1) GUISetState() While 1 $msg = GUIGetMsg() If $msg = -3 Then Exit Wend Func _GUICtrlCreateGradient($nStartColor, $nEndColor, $nX, $nY, $nWidth, $nHeight) Local $color1R = _ColorGetRed($nStartColor) Local $color1G = _ColorGetGreen($nStartColor) Local $color1B = _ColorGetBlue($nStartColor) Local $nStepR = (_ColorGetRed($nEndColor) - $color1R) / $step Local $nStepG = (_ColorGetGreen($nEndColor) - $color1G) / $step Local $nStepB = (_ColorGetBlue($nEndColor) - $color1B) / $step GuiCtrlCreateGraphic($nX, $nY, $nWidth, $nHeight) For $i = 0 To $nWidth $sColor = "0x" & StringFormat("%02X%02X%02X", $color1R+$nStepR*$i, $color1G+$nStepG*$i, $color1B+$nStepB*$i) GUICtrlSetGraphic(-1, $GUI_GR_COLOR, $sColor, 0xffffff) GUICtrlSetGraphic(-1, $GUI_GR_MOVE, $i, 0) GUICtrlSetGraphic(-1, $GUI_GR_LINE, $i, $nHeight) Next EndFunc EDIT: code box --> autoit box Edited July 20, 2009 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now