Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

Elastic images with a happy valentine's example ;)


  • Please log in to reply
22 replies to this topic

#1 yehia

yehia

    Universalist

  • Active Members
  • PipPipPipPipPip
  • 275 posts

Posted 13 February 2009 - 06:03 AM

hi all this is my first example in autoit forum so please comment
after seeing andybiochem's topic about the elastic radio buttons following the mouse pointer i decided to create something for my GF using this func for valentine's day

HAPPY VALENTINE DAY


ok now to test this u will have to save the script then save the PNGs to a folder named "Set" in the script directory

and it should look like this :

Posted Image


AutoIt         
;====== Elastic Trail script ====== ; Original Javascript by Philip Winston - pwinston@yahoo.com ; Adapted for AutoIT by AndyBiochem ; Used with GDI+ for PNG's by yehia #include <WindowsConstants.au3> #include <GuiConstantsEx.au3> #include <GDIPlus.au3> ;----- Variables ----- Global $iDots = 7      ;..... Number of PNGs Global $aDots[$iDots][5]      ;..... PNGs array Global $iXpos = 0 Global $iYpos = 0 Global $iDeltaT = 0.01 Global $iSegLen = 10 Global $iSpringK = 10 Global $iMass = 1 Global $iXGravity = 0 Global $iYGravity = 50 Global $iRes = 10 Global $iStopVel = 0.1 Global $iStopAcc = 0.1 Global $iDotSize = 25 Global $iBounce = 0.75 Global Const $AC_SRC_ALPHA      = 1 Global $iHeight = @DesktopHeight Global $iWidth = @DesktopWidth ;----- 'PNGs' ----- Myname() ; just my name on the back :P For $i = 1 To ($iDots - 1)     $iDotSize-=2     $aDots[$i][0] = GUICreate("", $iDotSize, $iDotSize, 144, 160, $WS_POPUP , $WS_EX_LAYERED + $WS_EX_TOOLWINDOW+$WS_EX_TOPMOST)     _GDIPlus_Startup()     $hImage = _GDIPlus_ImageLoadFromFile(@ScriptDir &"\Set\" &$i& ".png")     SetBitMap($aDots[$i][0] , $hImage, 255)     GUISetState(@SW_SHOW) Next ;############### LOOP ############### While 1     Sleep(10)     $m = MouseGetPos()     $iXpos = $m[0]     $iYpos = $m[1]     _Animate() WEnd ;#################################### Func _Animate()     $aDots[0][1] = $iXpos     $aDots[0][2] = $iYpos     For $i = 1 To ($iDots - 1)         Local $spring[3]         $spring[1] = 0         $spring[2] = 0         _Spring_Force($i - 1, $i, $spring)         If $i < ($iDots - 1) Then _Spring_Force($i + 1, $i, $spring)         Local $resist[3]         $resist[1] = -$aDots[$i][3] * $iRes         $resist[2] = -$aDots[$i][4] * $iRes         Local $accel[3]         $accel[1] = ($spring[1] + $resist[1]) / $iMass + $iXGravity         $accel[2] = ($spring[2] + $resist[2]) / $iMass + $iYGravity         $aDots[$i][3] += ($iDeltaT * $accel[1])         $aDots[$i][4] += ($iDeltaT * $accel[2])         If Abs($aDots[$i][3]) < $iStopVel And Abs($aDots[$i][4]) < $iStopVel And Abs($accel[1]) < $iStopAcc And Abs($accel[2]) < $iStopAcc Then             $aDots[$i][3] = 0             $aDots[$i][4] = 0         EndIf         $aDots[$i][1] += $aDots[$i][3]         $aDots[$i][2] += $aDots[$i][4]         If ($aDots[$i][2] < 0) Then             If ($aDots[$i][4] < 0) Then $aDots[$i][4] = $iBounce * - $aDots[$i][4]             $aDots[$i][2] = 0         EndIf         If ($aDots[$i][2] >= $iHeight - $iDotSize - 1) Then             If ($aDots[$i][4] > 0) Then $aDots[$i][4] = $iBounce * - $aDots[$i][4]             $aDots[$i][2] = $iHeight - $iDotSize - 1         EndIf         If ($aDots[$i][1] >= $iWidth - $iDotSize) Then             If ($aDots[$i][3] > 0) Then $aDots[$i][3] = $iBounce * - $aDots[$i][3]             $aDots[$i][1] = $iWidth - $iDotSize - 1         EndIf         If ($aDots[$i][1] < 0) Then             If ($aDots[$i][3] < 0) Then $aDots[$i][3] = $iBounce * - $aDots[$i][3]             $aDots[$i][1] = 0         EndIf         WinMove($aDots[$i][0], "", $aDots[$i][1], $aDots[$i][2])     Next EndFunc  ;==>_Animate Func _Spring_Force($i, $j, ByRef $spring)     Local $springF     $dx = $aDots[$i][1] - $aDots[$j][1]     $dy = $aDots[$i][2] - $aDots[$j][2]     $len = Sqrt($dx ^ 2 + $dy ^ 2)     If Not ($len > $iSegLen) Then Return     $springF = $iSpringK * ($len - $iSegLen)     $spring[1] += ($dx / $len) * $springF     $spring[2] += ($dy / $len) * $springF EndFunc  ;==>_Spring_Force Func SetBitmap($hGUI, $hImage, $iOpacity)   Local $hScrDC, $hMemDC, $hBitmap, $hOld, $pSize, $tSize, $pSource, $tSource, $pBlend, $tBlend   $hScrDC  = _WinAPI_GetDC(0)   $hMemDC  = _WinAPI_CreateCompatibleDC($hScrDC)   $hBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImage)   $hOld    = _WinAPI_SelectObject($hMemDC, $hBitmap)   $tSize   = DllStructCreate($tagSIZE)   $pSize   = DllStructGetPtr($tSize  )   DllStructSetData($tSize, "X", _GDIPlus_ImageGetWidth ($hImage))   DllStructSetData($tSize, "Y", _GDIPlus_ImageGetHeight($hImage))   $tSource = DllStructCreate($tagPOINT)   $pSource = DllStructGetPtr($tSource)   $tBlend  = DllStructCreate($tagBLENDFUNCTION)   $pBlend  = DllStructGetPtr($tBlend)   DllStructSetData($tBlend, "Alpha" , $iOpacity    )   DllStructSetData($tBlend, "Format", $AC_SRC_ALPHA)   _WinAPI_UpdateLayeredWindow($hGUI, $hScrDC, 0, $pSize, $hMemDC, $pSource, 0, $pBlend, $ULW_ALPHA)   _WinAPI_ReleaseDC   (0, $hScrDC)   _WinAPI_SelectObject($hMemDC, $hOld)   _WinAPI_DeleteObject($hBitmap)   _WinAPI_DeleteDC    ($hMemDC) EndFunc  ;==>SetBitmap Func Myname()     $yGUI = GUICreate("", 200, 120, (@DesktopWidth/2)-100, (@DesktopHeight/2)-60, $WS_POPUP , $WS_EX_LAYERED + $WS_EX_TOOLWINDOW+$WS_EX_TOPMOST)     _GDIPlus_Startup()     $yImage = _GDIPlus_ImageLoadFromFile(@ScriptDir &"\Set\y.png")     SetBitMap($yGUI , $yImage, 255)     GUISetState(@SW_SHOW) EndFunc  ;==>Myname


NOW the PNGs, download this rar file attached put it in the script directory and bam u got it

HAPPY VALENTINE again

credit goes to andybiochem first then me, i just created the GDI part

Edit : spelling

Attached Files

  • Attached File  Set.rar   51.54KB   711 downloads

Edited by yehia, 20 February 2009 - 08:21 AM.

  • wakillon likes this







#2 Andreik

Andreik

    Bishop

  • Active Members
  • PipPipPipPipPipPip
  • 2,592 posts

Posted 13 February 2009 - 07:47 PM

Very nice. How can I create a PNG like your PNG with your name to modify with Vantentine's Day.
When the words fail... music speaks

#3 JRowe

JRowe

    Chasing the white rabbits

  • Active Members
  • PipPipPipPipPipPip
  • 1,765 posts

Posted 13 February 2009 - 08:03 PM

Very cool. I like the effect, kudos to both you and Andybiochem.

#4 UEZ

UEZ

    Never say never

  • MVPs
  • 4,969 posts

Posted 13 February 2009 - 09:22 PM

Very, very nice :)

When you change line 36 to For $i = ($iDots - 1) To 1 Step -1 the hearts will be drawn from back to front.


Thanks,
UEZ

 
The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯


#5 yehia

yehia

    Universalist

  • Active Members
  • PipPipPipPipPip
  • 275 posts

Posted 13 February 2009 - 09:31 PM

thanks all i really lost the hope that someone will replay my topic :)
btw o used PNGs cause u can use them layered for the shadow effects and u can used photoshop to create them

@Andreik u can get a portable version like 50 mb or something

@JRowe thanks man

@UEZ and u have the vars u can change $iSegLen value and u will just get them away from each other :)

#6 UEZ

UEZ

    Never say never

  • MVPs
  • 4,969 posts

Posted 13 February 2009 - 09:38 PM

If you add HotKeySet("{ESC}", "_Close") you can exit by pressing ESC :)

 
The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯


#7 yehia

yehia

    Universalist

  • Active Members
  • PipPipPipPipPip
  • 275 posts

Posted 13 February 2009 - 10:07 PM

lol thats a part of the exit function that andybiochem had in his script xD
will remove it

btw in my main script i made for my GF i used it thats y u see it here but whats inside it is a bit gay something like what any girl would like to hear :)

Edited by yehia, 13 February 2009 - 10:10 PM.


#8 UEZ

UEZ

    Never say never

  • MVPs
  • 4,969 posts

Posted 13 February 2009 - 10:15 PM

I don't like that f... day :)

UEZ

Edited by UEZ, 13 February 2009 - 10:15 PM.

 
The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯


#9 yehia

yehia

    Universalist

  • Active Members
  • PipPipPipPipPip
  • 275 posts

Posted 15 February 2009 - 10:30 AM

ok removed the useless part
@UEZ it aint that bad with a GF :)

#10 andybiochem

andybiochem

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 308 posts

Posted 15 February 2009 - 12:16 PM

HA! and everyone said this had no use! I feel happy in the fact I may have got you laid.

Good job yehia.
- Table UDF - create simple data tables - Line Graph UDF GDI+ - quickly create simple line graphs with x and y axes (uses GDI+ with double buffer) - Line Graph UDF - quickly create simple line graphs with x and y axes (uses AI native graphic control) - Barcode Generator Code 128 B C - Create the 1/0 code for barcodes. - WebCam as BarCode Reader - use your webcam to read barcodes - Stereograms!!! - make your own stereograms in AutoIT - Ziggurat Gaussian Distribution RNG - generate random numbers based on normal/gaussian distribution - Box-Muller Gaussian Distribution RNG - generate random numbers based on normal/gaussian distribution - Elastic Radio Buttons - faux-gravity effects in AutoIT (from javascript)- Morse Code Generator - Generate morse code by tapping your spacebar!

#11 UEZ

UEZ

    Never say never

  • MVPs
  • 4,969 posts

Posted 15 February 2009 - 01:43 PM

ok removed the useless part
@UEZ it aint that bad with a GF :)


I don't want to discuss here the sense or nonsenses of Valentine's day even though I've a gf, be married or anything else. :)

I just wanted to say my opinion about VD - probably it was off topic...


UEZ

 
The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯


#12 yehia

yehia

    Universalist

  • Active Members
  • PipPipPipPipPip
  • 275 posts

Posted 16 February 2009 - 01:31 PM

HA! and everyone said this had no use! I feel happy in the fact I may have got you laid.

Good job yehia.


@andybiochem hahahaha well not laid xD

I don't want to discuss here the sense or nonsenses of Valentine's day even though I've a gf, be married or anything else. :)

I just wanted to say my opinion about VD - probably it was off topic...
UEZ

@UEZ ok

and please if anyone have any changes to apply on this to make it look better just show the codes and thanks all for your nice comments :)

#13 yehia

yehia

    Universalist

  • Active Members
  • PipPipPipPipPip
  • 275 posts

Posted 19 February 2009 - 11:59 AM

since i noticed that the above example just gives PNGs number - 1
so i created this
to get the exact number of PNGs :

AutoIt         
;====== Elastic Trail script ====== ; Original Javascript by Philip Winston - pwinston@yahoo.com ; Adapted for AutoIT by AndyBiochem ; Used with GDI+ for PNG's by yehia #include <WindowsConstants.au3> #include <GuiConstantsEx.au3> #include <GDIPlus.au3> ;----- Variables ----- Global $iDots = 7;Number of BNGs Global $aDots[$iDots + 1][5]     ;to get exact no of BNGs Global $iXpos = 0 Global $iYpos = 0 Global $iDeltaT = 0.01 Global $iSegLen = 10 Global $iSpringK = 10 Global $iMass = 1 Global $iXGravity = 0 Global $iYGravity = 50 Global $iRes = 10 Global $iStopVel = 0.1 Global $iStopAcc = 0.1 Global $iDotSize = 25 Global $iBounce = 0.75 Global Const $AC_SRC_ALPHA      = 1 Global $iHeight = @DesktopHeight Global $iWidth = @DesktopWidth ;----- 'Dots' ----- For $i = 1 To $iDots       ;to get exact no of dots     $iDotSize-=2     $aDots[$i][0] = GUICreate("", $iDotSize, $iDotSize, 144, 160, $WS_POPUP , $WS_EX_LAYERED + $WS_EX_TOOLWINDOW+$WS_EX_TOPMOST)     _GDIPlus_Startup()     $hImage = _GDIPlus_ImageLoadFromFile(@ScriptDir &"\Set\" &$i& ".png");"\untitled.png")     SetBitMap($aDots[$i][0] , $hImage, 255)     GUISetState(@SW_SHOW) Next ;############### LOOP ############### While 1     Sleep(10)     $m = MouseGetPos()     $iXpos = $m[0]     $iYpos = $m[1]     _Animate() WEnd ;#################################### Func _Animate()     $aDots[0][1] = $iXpos     $aDots[0][2] = $iYpos     For $i = 1 To $iDots    ; to get exact number of dots         Local $spring[3]         $spring[1] = 0         $spring[2] = 0         _Spring_Force($i - 1, $i, $spring)         If $i < ($iDots - 1) Then _Spring_Force($i + 1, $i, $spring)         Local $resist[3]         $resist[1] = -$aDots[$i][3] * $iRes         $resist[2] = -$aDots[$i][4] * $iRes         Local $accel[3]         $accel[1] = ($spring[1] + $resist[1]) / $iMass + $iXGravity         $accel[2] = ($spring[2] + $resist[2]) / $iMass + $iYGravity         $aDots[$i][3] += ($iDeltaT * $accel[1])         $aDots[$i][4] += ($iDeltaT * $accel[2])         If Abs($aDots[$i][3]) < $iStopVel And Abs($aDots[$i][4]) < $iStopVel And Abs($accel[1]) < $iStopAcc And Abs($accel[2]) < $iStopAcc Then             $aDots[$i][3] = 0             $aDots[$i][4] = 0         EndIf         $aDots[$i][1] += $aDots[$i][3]         $aDots[$i][2] += $aDots[$i][4]         If ($aDots[$i][2] < 0) Then             If ($aDots[$i][4] < 0) Then $aDots[$i][4] = $iBounce * - $aDots[$i][4]             $aDots[$i][2] = 0         EndIf         If ($aDots[$i][2] >= $iHeight - $iDotSize - 1) Then             If ($aDots[$i][4] > 0) Then $aDots[$i][4] = $iBounce * - $aDots[$i][4]             $aDots[$i][2] = $iHeight - $iDotSize - 1         EndIf         If ($aDots[$i][1] >= $iWidth - $iDotSize) Then             If ($aDots[$i][3] > 0) Then $aDots[$i][3] = $iBounce * - $aDots[$i][3]             $aDots[$i][1] = $iWidth - $iDotSize - 1         EndIf         If ($aDots[$i][1] < 0) Then             If ($aDots[$i][3] < 0) Then $aDots[$i][3] = $iBounce * - $aDots[$i][3]             $aDots[$i][1] = 0         EndIf                 $aDots[$i][1] = $aDots[$i][1] + .24*$i   ;for centering PNGs under mouse         WinMove($aDots[$i][0], "", $aDots[$i][1] , $aDots[$i][2])     Next EndFunc  ;==>_Animate Func _Spring_Force($i, $j, ByRef $spring)     Local $springF     $dx = $aDots[$i][1] - $aDots[$j][1]     $dy = $aDots[$i][2] - $aDots[$j][2]     $len = Sqrt($dx ^ 2 + $dy ^ 2)     If Not ($len > $iSegLen) Then Return     $springF = $iSpringK * ($len - $iSegLen)     $spring[1] += ($dx / $len) * $springF     $spring[2] += ($dy / $len) * $springF EndFunc  ;==>_Spring_Force Func SetBitmap($hGUI, $hImage, $iOpacity)   Local $hScrDC, $hMemDC, $hBitmap, $hOld, $pSize, $tSize, $pSource, $tSource, $pBlend, $tBlend   $hScrDC  = _WinAPI_GetDC(0)   $hMemDC  = _WinAPI_CreateCompatibleDC($hScrDC)   $hBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImage)   $hOld    = _WinAPI_SelectObject($hMemDC, $hBitmap)   $tSize   = DllStructCreate($tagSIZE)   $pSize   = DllStructGetPtr($tSize  )   DllStructSetData($tSize, "X", _GDIPlus_ImageGetWidth ($hImage))   DllStructSetData($tSize, "Y", _GDIPlus_ImageGetHeight($hImage))   $tSource = DllStructCreate($tagPOINT)   $pSource = DllStructGetPtr($tSource)   $tBlend  = DllStructCreate($tagBLENDFUNCTION)   $pBlend  = DllStructGetPtr($tBlend)   DllStructSetData($tBlend, "Alpha" , $iOpacity    )   DllStructSetData($tBlend, "Format", $AC_SRC_ALPHA)   _WinAPI_UpdateLayeredWindow($hGUI, $hScrDC, 0, $pSize, $hMemDC, $pSource, 0, $pBlend, $ULW_ALPHA)   _WinAPI_ReleaseDC   (0, $hScrDC)   _WinAPI_SelectObject($hMemDC, $hOld)   _WinAPI_DeleteObject($hBitmap)   _WinAPI_DeleteDC    ($hMemDC) EndFunc


comment please
thanks

Edited by yehia, 24 February 2009 - 05:50 PM.


#14 ukmazy

ukmazy

    Seeker

  • Active Members
  • 12 posts

Posted 22 February 2009 - 04:03 PM

wow what a nice effect you have here, too bad its late to give my GF that :)
i tested the second script you provided too but didnt notice the difference until i did a count for the hearts :)

good work man

#15 yehia

yehia

    Universalist

  • Active Members
  • PipPipPipPipPip
  • 275 posts

Posted 24 February 2009 - 05:49 PM

thanks a lot that's supportive and btw its never too late :)
and about the difference between the first and the second script; the first always misses the last BNG (the smallest one)

thanks for your replay

and thats the script to draw the BNGs from the end

AutoIt         
;====== Elastic Trail script ====== ; Original Javascript by Philip Winston - pwinston@yahoo.com ; Adapted for AutoIT by AndyBiochem ; Used with GDI+ for PNG's by yehia #include <WindowsConstants.au3> #include <GuiConstantsEx.au3> #include <GDIPlus.au3> ;----- Variables ----- Global $iDots = 7      ;..... Number of PNGs Global $aDots[$iDots][5]      ;..... PNGs array Global $iXpos = 0 Global $iYpos = 0 Global $iDeltaT = 0.01 Global $iSegLen = 10 Global $iSpringK = 10 Global $iMass = 1 Global $iXGravity = 0 Global $iYGravity = 50 Global $iRes = 10 Global $iStopVel = 0.1 Global $iStopAcc = 0.1 Global $iDotSize = 25 Global $iBounce = 0.75 Global Const $AC_SRC_ALPHA      = 1 Global $iHeight = @DesktopHeight Global $iWidth = @DesktopWidth ;----- 'PNGs' ----- Myname() ; just my name on the back :P For $i = ($iDots - 1) To 1 Step -1     $iDotSize-=2     $aDots[$i][0] = GUICreate("", $iDotSize, $iDotSize, 144, 160, $WS_POPUP , $WS_EX_LAYERED + $WS_EX_TOOLWINDOW+$WS_EX_TOPMOST)     _GDIPlus_Startup()     $hImage = _GDIPlus_ImageLoadFromFile(@ScriptDir &"\Set\" &$i& ".png")     SetBitMap($aDots[$i][0] , $hImage, 255)     GUISetState(@SW_SHOW) Next ;############### LOOP ############### While 1     Sleep(10)     $m = MouseGetPos()     $iXpos = $m[0]     $iYpos = $m[1]     _Animate() WEnd ;#################################### Func _Animate()     $aDots[0][1] = $iXpos     $aDots[0][2] = $iYpos     For $i = 1 To ($iDots - 1)         Local $spring[3]         $spring[1] = 0         $spring[2] = 0         _Spring_Force($i - 1, $i, $spring)         If $i < ($iDots - 1) Then _Spring_Force($i + 1, $i, $spring)         Local $resist[3]         $resist[1] = -$aDots[$i][3] * $iRes         $resist[2] = -$aDots[$i][4] * $iRes         Local $accel[3]         $accel[1] = ($spring[1] + $resist[1]) / $iMass + $iXGravity         $accel[2] = ($spring[2] + $resist[2]) / $iMass + $iYGravity         $aDots[$i][3] += ($iDeltaT * $accel[1])         $aDots[$i][4] += ($iDeltaT * $accel[2])         If Abs($aDots[$i][3]) < $iStopVel And Abs($aDots[$i][4]) < $iStopVel And Abs($accel[1]) < $iStopAcc And Abs($accel[2]) < $iStopAcc Then             $aDots[$i][3] = 0             $aDots[$i][4] = 0         EndIf         $aDots[$i][1] += $aDots[$i][3]         $aDots[$i][2] += $aDots[$i][4]         If ($aDots[$i][2] < 0) Then             If ($aDots[$i][4] < 0) Then $aDots[$i][4] = $iBounce * - $aDots[$i][4]             $aDots[$i][2] = 0         EndIf         If ($aDots[$i][2] >= $iHeight - $iDotSize - 1) Then             If ($aDots[$i][4] > 0) Then $aDots[$i][4] = $iBounce * - $aDots[$i][4]             $aDots[$i][2] = $iHeight - $iDotSize - 1         EndIf         If ($aDots[$i][1] >= $iWidth - $iDotSize) Then             If ($aDots[$i][3] > 0) Then $aDots[$i][3] = $iBounce * - $aDots[$i][3]             $aDots[$i][1] = $iWidth - $iDotSize - 1         EndIf         If ($aDots[$i][1] < 0) Then             If ($aDots[$i][3] < 0) Then $aDots[$i][3] = $iBounce * - $aDots[$i][3]             $aDots[$i][1] = 0         EndIf         WinMove($aDots[$i][0], "", $aDots[$i][1], $aDots[$i][2])     Next EndFunc  ;==>_Animate Func _Spring_Force($i, $j, ByRef $spring)     Local $springF     $dx = $aDots[$i][1] - $aDots[$j][1]     $dy = $aDots[$i][2] - $aDots[$j][2]     $len = Sqrt($dx ^ 2 + $dy ^ 2)     If Not ($len > $iSegLen) Then Return     $springF = $iSpringK * ($len - $iSegLen)     $spring[1] += ($dx / $len) * $springF     $spring[2] += ($dy / $len) * $springF EndFunc  ;==>_Spring_Force Func _Close()     Exit EndFunc  ;==>_Close Func SetBitmap($hGUI, $hImage, $iOpacity)   Local $hScrDC, $hMemDC, $hBitmap, $hOld, $pSize, $tSize, $pSource, $tSource, $pBlend, $tBlend   $hScrDC  = _WinAPI_GetDC(0)   $hMemDC  = _WinAPI_CreateCompatibleDC($hScrDC)   $hBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImage)   $hOld    = _WinAPI_SelectObject($hMemDC, $hBitmap)   $tSize   = DllStructCreate($tagSIZE)   $pSize   = DllStructGetPtr($tSize  )   DllStructSetData($tSize, "X", _GDIPlus_ImageGetWidth ($hImage))   DllStructSetData($tSize, "Y", _GDIPlus_ImageGetHeight($hImage))   $tSource = DllStructCreate($tagPOINT)   $pSource = DllStructGetPtr($tSource)   $tBlend  = DllStructCreate($tagBLENDFUNCTION)   $pBlend  = DllStructGetPtr($tBlend)   DllStructSetData($tBlend, "Alpha" , $iOpacity    )   DllStructSetData($tBlend, "Format", $AC_SRC_ALPHA)   _WinAPI_UpdateLayeredWindow($hGUI, $hScrDC, 0, $pSize, $hMemDC, $pSource, 0, $pBlend, $ULW_ALPHA)   _WinAPI_ReleaseDC   (0, $hScrDC)   _WinAPI_SelectObject($hMemDC, $hOld)   _WinAPI_DeleteObject($hBitmap)   _WinAPI_DeleteDC    ($hMemDC) EndFunc  ;==>SetBitmap Func Myname()     $yGUI = GUICreate("", 200, 120, (@DesktopWidth/2)-100, (@DesktopHeight/2)-60, $WS_POPUP , $WS_EX_LAYERED + $WS_EX_TOOLWINDOW+$WS_EX_TOPMOST)     _GDIPlus_Startup()     $yImage = _GDIPlus_ImageLoadFromFile(@ScriptDir &"\Set\y.png")     SetBitMap($yGUI , $yImage, 255)     GUISetState(@SW_SHOW) EndFunc


#16 Yashied

Yashied

    Happy in Moscow

  • MVPs
  • 2,574 posts

Posted 05 April 2009 - 11:56 PM

Beautiful!

:D :o :D

#17 yehia

yehia

    Universalist

  • Active Members
  • PipPipPipPipPip
  • 275 posts

Posted 07 April 2009 - 04:27 PM

thanks a lot :o
im just thinking what more can this example do ...
something like a mouse key chain :D

#18 trancexx

trancexx

    Queen F. Elizabeth MCXI

  • Active Members
  • PipPipPipPipPipPip
  • 6,244 posts

Posted 08 April 2009 - 07:46 PM

thanks a lot :o
im just thinking what more can this example do ...
something like a mouse key chain :D

Easter Bunnies hanging/shagging arround would be... something.

          ......       ......
        .:oOOOOo:.   .:oOOOOo:.
      .:oOO:'':Oo:. .:oO:'':OOo:.
     .:oO:      'Oo:oO'      :Oo:.
     :oO:         'o'   
      :Oo:
     :oO:                     :Oo:
     ':oO:     OT9AO0IEDrk   :Oo:'
      ':oO:                 :Oo:'
        ':oO.             .Oo:'
          ':oO
.         .Oo:'
            ':oO.     .Oo:'
              ':oO. .Oo:'
                'oO:Oo'
                  'o' :kiss:



 

.
eMyvnE


#19 yehia

yehia

    Universalist

  • Active Members
  • PipPipPipPipPip
  • 275 posts

Posted 12 April 2009 - 03:01 PM

hahaha thanks for the hint :D

#20 mesale0077

mesale0077

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 477 posts

Posted 12 April 2009 - 10:43 PM

very nice..




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users