UEZ

[GAME] AUTOITEROIDS v1.019 Build 2016-01-14 Final

55 posts in this topic

#1 ·  Posted (edited)

Here my 1st game ever.

 

A try to remake of the arcade classical 2D game Asteroids® by Atari (1979). :D

 

More information about Asteroids® here or here!

 

Play online here :idea:

 

 

Please don't link to file below directly from other websites!

 

Downloads (2263 previously):  AUTOITEROIDS v1.019 Build 2016-01-14.7z (use e.g. 7-Zip to extract archive)

 

Only compiled version incl. needed files here: <4shared.com> or <MediaFire.com>

 

 

post-29844-1242504010_thumb.png

 

 

 

LEGAL NOTICE:

 

This game is an unoffical clone of the original Asteroids®

game and is not endorsed by the registered trademark

and copyright owners Atari Interactive, Inc.

 

 

 

Short description:

 

AUTOITEROIDS is a remake of the video arcade game released in 1979 by Atari, Inc.

It was one of the most popular and influential games of the Golden Age of Arcade Games.

The player controls a spaceship in an asteroid field which is periodically traversed by flying saucers.

The object of the game is to shoot and destroy asteroids and saucers while not colliding with either,

or being hit by the saucers' counter-fire.

 

 

Keys:

 

ctrl - shoot,

up - thrust,

left - turn left,

right - turn right,

space - hyper jump

 

 

Game details:

 

game is starting with 3 asteroids

every 10.000 points increase of level (among other things amount of asteroids + 1)

every 30.000 points extra live

biggest asteroid = 20 points

medium asteroid = 50 points

smallest asteroid = 100 points

big alien spaceship = 200 points

small alien spaceship = 1000 point

 

 

Credits:

 

Main code: UEZ

Bass UDF: BrettF

Bass DLL: www.un4seen.com

GDI+ font loader code: Yashied

Menu item code: rasim

Sound + sound code modifications: Spiff59

Font: ck! [Freaky Fonts]

GetKeyboardState code: eukalyptus

Atari for the original game concept

AutoIt forum for all the help and the source of knowledge :P

 

Have fun :party:

UEZ

:D

 

 

Change log:

2009-05-16 release of the game AUTOITEROIDS

2009-05-17 thanks to Spiff59 for modification of the sound part -> now the sound is much smoother

2009-05-18 adjusted collision parameters -> now much better collision detection

2009-05-24 added highscore feature and fixed several bugs (RC1)

2009-05-31 pre final version released (only credit intro left)

2009-06-09 some bugs fixed and made some game setting modifications -> game play now smoother; also collision detection adjusted again; credit intro still in building phase :-(

2009-06-11 fixed some wrong game settings and change highscore file format -> now encrypted to avoid highscore manipulation ;-). Old score will be overwritten!

2009-06-13 display of level in GUI title menu was not working properly -> fixed

2009-06-14 released final version but without a credit part (will come later, if I find more time)

2009-06-16 minor: forgot to calculate font size when you change the window resolution (720x480 is optimized for collision detection - other window resolutions may not working properly for collision detection)

2009-06-17 minor: still overlooked font size parameteres and alien spaceship shoot parameters when windows sizes <> 720x480

2009-06-18 minor: some game settings added (will wait a few seconds after all asteroids have been destroyed) and added shadow at Asteroids label in About window

2009-07-01 minor: last update of the game code -> explosion of human spaceship fixed (copy/paste bug), change routine for copy bmp to GUI and added fps display counter

2009-12-21 minor: fixed some small bugs, replaced IsPressed() with WinAPI_GetKeyboardState function (thanks Eukalyptus), added latest Bass.dll, made game play specific modifications and changed code to be compatible with AutoIt v3.3.2.0!

2009-12-29 minor: forgot to undo silly modifications and added faster GDI+ backbuffer technique (thanks to AndyG for the idea)!

2011-04-12 minor: made small modifications, tried some optimizations (it is very hard to remember what I did in the code after a very long time of absence) :)

2011-04-29 minor: GUIRegisterMsg($WM_ERASEBKGND, "WM_ERASEBKGND") caused About window to look awful and added check for aero to place game graphic window to GUI more precise using _WinAPI_BitBlt()

2011-05-13 minor: cleaned up WinAPI display settings and forgot to undo About window settings.

2011-05-31 minor: speeded up game play by adding bitmaps instead of using one _WinAPI_CreateCompatibleBitmap(). I don't know why this is faster :P

2011-06-09 minor: changed FPS code because old code displayed too high FPS values

2012-07-30 minor: changed drawline function from integer to float to avoid wobbling of asteroids and spaceship

2016-01-14 minor: fixed code to run on AutoIt v3.3.14.2 when no highscore exists and changed GDI+ variable

Edited by UEZ
3 people like this

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

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

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

REALLY GOOD UEZ!!!

It's just like the real game... movement, sounds, feel-of-control, visuals.

I can even fly through the screen. I used to line up 2 rows of space ships on the pay-to-play game.

I do miss the ability to shoot 4 times in a row though. I used to lay-out a blanket of bullets for the ships.

Can this be added?

Thanks

8)

Edited by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites

REALLY GOOD UEZ!!!

It's just like the real game.

I can even fly through the screen. I used to line up 2 rows of space ships on the pay-to-play game.

I do miss the ability to shoot 4 times in a row though. Can this be added?

Thanks

8)

Thanks Valuater.

Yes, you are right - the code is not working properly ($amount_of_shoots_max = 4 is already set) :)

I put it also to my to do list :party:

UEZ


Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

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

Share this post


Link to post
Share on other sites

Well Done UEZ!!, very nice game, I like the realistic movements

Share this post


Link to post
Share on other sites

Well Done UEZ!!, very nice game, I like the realistic movements

Thanks, the human ship movement was a lot easier than the other parts.

UEZ


Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

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

Share this post


Link to post
Share on other sites

Amazing! 100% Amazing

Thank you so much lots of great work very much to be learned from the source. An amazing demonstration!


AutoIt changed my life.

Share this post


Link to post
Share on other sites

UEZ, good job!

Posted Image

Thanks.

Amazing! 100% Amazing

Thank you so much lots of great work very much to be learned from the source. An amazing demonstration!

Thanks for the feedback - currently I lost the overview over my code :)

UEZ


Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

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

Share this post


Link to post
Share on other sites

you should remove bullet limit to make it more authentic


0x616e2069646561206973206c696b652061206d616e20776974686f7574206120626f64792c20746f206669676874206f6e6520697320746f206e657665722077696e2e2e2e2e

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

you should remove bullet limit to make it more authentic

I wanted to make it 1:1 as much as possible - keep it simple with all its limitations!

I forgot to implement the explosion of the human space which is not an explosion of 10 pixel but breaks in several parts!

I will implement it in the next release.

UEZ

Edited by UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

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

Share this post


Link to post
Share on other sites

#11 ·  Posted

This is absolutely fantastic!

Kudos, UEZ.

I wonder if this would speed collision detection?

;check space ship for border collision
                $z = $border_limes * $object_scale
                If $x < -$z Then $x = $width + $z
                If $x > $width + $z Then $x = -$z
                If $y < -$z Then $y = $height + $z
                If $y > $height + $z Then $y = -$z

Share this post


Link to post
Share on other sites

#12 ·  Posted (edited)

This is absolutely fantastic!

Kudos, UEZ.

I wonder if this would speed collision detection?

;check space ship for border collision
                    $z = $border_limes * $object_scale
                    If $x < -$z Then $x = $width + $z
                    If $x > $width + $z Then $x = -$z
                    If $y < -$z Then $y = $height + $z
                    If $y > $height + $z Then $y = -$z
Thanks for feedback.

Btw, the check of the border is not the real problem but your are right :)

UEZ

Edited by UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

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

Share this post


Link to post
Share on other sites

#13 ·  Posted

Thanks for feedback.

Btw, the check of the border is not the real problem but your are right :)

UEZ

Yes, I noticed that's not the "collision" that I'd like to see happening more often :party:

That area just jumped out at me. I'm good at cleanup, but all this GDI+stuff is greek to me.

How long ago did you start this?

I just have to say, again, I'm flabberghasted. Extremely impressed.

Share this post


Link to post
Share on other sites

#14 ·  Posted (edited)

Yes, I noticed that's not the "collision" that I'd like to see happening more often :)

That area just jumped out at me. I'm good at cleanup, but all this GDI+stuff is greek to me.

How long ago did you start this?

I just have to say, again, I'm flabberghasted. Extremely impressed.

I started it approx. 2 weeks ago but I had this in mind a long time ago (just dreamt of it).

Btw, how can I set up the music speed using bass.udf (_BASS_ChannelSetAttribute?)? Because the sound of the alien starship is too slow...

Thanks,

UEZ

Edited by UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

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

Share this post


Link to post
Share on other sites

#15 ·  Posted

UEZ this is just totally awesome. Kudos to you my friend. Here comes 5* :)

WBD

Share this post


Link to post
Share on other sites

#16 ·  Posted

UEZ this is just totally awesome. Kudos to you my friend. Here comes 5* :party:

WBD

Posted my 5 stars too! :)

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

#18 ·  Posted

Way Cool UEZ! Jumpy for me but looks just like the orig....

Share this post


Link to post
Share on other sites

#19 ·  Posted (edited)

The smaller files attached below seem to behave better...

Edit: I also tinkered with the definitions for the alien ship sounds to make them looping, then moved the Play() to the random statement that brings the ship out, so it's only called once. Then I put a ChannelStop in your alien_ship_reset routine. So it only starts the sound once when the ship appears and lets it loop until the ship is gone. Seems to sound real smooth with no pauses. I was playing with the control logic for the thump/thump game sounds too, so better make sure I didn;t screw it up. Anyway, it was easier to attach the changes in the whole file than paste them into this post. (Hope you don't mind me playing with your baby, I think it's pretty cool , and I guess I'm bored).

Edit: Deleted attachments to free up some disk space.

Edited by Spiff59

Share this post


Link to post
Share on other sites

#20 ·  Posted (edited)

The smaller files attached below seem to behave better...

Edit: I also tinkered with the definitions for the alien ship sounds to make them looping, then moved the Play() to the random statement that brings the ship out, so it's only called once. Then I put a ChannelStop in your alien_ship_reset routine. So it only starts the sound once when the ship appears and lets it loop until the ship is gone. Seems to sound real smooth with no pauses. I was playing with the control logic for the thump/thump game sounds too, so better make sure I didn;t screw it up. Anyway, it was easier to attach the changes in the whole file than paste them into this post. (Hope you don't mind me playing with your baby, I think it's pretty cool , and I guess I'm bored).

Thanks Spiff59, the sound is really much smoother. I updated it (1st post)!

UEZ

Edited by UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

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

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Similar Content

    • topten
      GDI+ animation on gui
      By topten
      Hello. I am trying to create preloader animation on gui.
      I take one png transparent image, add another etc- supposed to be animation. The problem I am facing: What is the best way of deleting previous image created with gdi plus?
      ;;;;; In the main code I create a picture: Global $preloader = GUICtrlCreatePic("", 50, 180,0,0) ;;;;; Later on using the function of changing images func preloader() if ($load == 1) then $png ="\1.png" if ($load == 2) then $png ="2.png" if ($load == 3) then $png ="3.png" if ($load == 4) then $png ="4.png" $hImage = _GDIPlus_ImageLoadFromFile($png) $Bmp = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImage) _WinAPI_DeleteObject(GUICtrlSendMsg($preloader, $STM_SETIMAGE, $IMAGE_BITMAP, $Bmp)) $load = $load+1 if $load>4 then $load=1 endfunc  
    • UEZ
      Some Graphical Examples using GDI+ Vol. II build 2016-05-07
      By UEZ
      Some Graphical Examples using GDI+ Vol. II build 2016-05-07 (33 examples)
       
      This is the continuation of "Some Graphical Examples using GDI+ Vol. I" with currently 33 examples in "snippet style".
       
      For downloads and screenshots just visit the download section.
       
      All examples should properly run on Win7+ operating systems / tested on AutoIt v3.3.14.2!
       
      More examples will follow from time to time.
       
      Thanks to Eukalyptus!
       
      Please report any issues / feel free to post any comment.
       
      Have fun.
    • UEZ
      Some Graphical Examples using GDI+ Vol. II
      By UEZ
      Some Graphical Examples using GDI+ Vol. II (33 examples)
       
      This is the continuation of "Some Graphical Examples using GDI+ Vol. I".
       
      Have fun.
    • ViciousXUSMC
      Convert Multi-Page TIFF to Single Page
      By ViciousXUSMC
      So a little project I am working on.
      I sort of have this working via Irfanview using cmd scripting, but curious if it can be done in AutoIT maybe with GDI+ or any other native tool.
      I have an ancient microfilm scanner, and currently the only way it will scan is to take a full screen scan of 11x14 and make it a 2 page 8.5x11 Tiff Image.
      So this is cutting the image in half down the middle.
      What I need to do is have the 2nd page append to the first page on the right side, and then save the image as a single flat new image (Do not care about format very much)
      Any of the GDI wizards think this can be done? 
       
      Here is my starting point, I can open the image, convert the format to .jpg and flatten it (lose the 2nd page of the TIF)
      I have not quite figured out how to grab that 2nd page or do the append (panorama
       
       
      #Include <GDIPlus.au3> Local $hImage, $sCLSID _GDIPlus_Startup() $hImage = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\Test3.tif") $sCLSID = _GDIPlus_EncodersGetCLSID("TIF") $sCLSID2 = _GDIPlus_EncodersGetCLSID("JPG") _GDIPlus_ImageSaveToFileEx($hImage, @ScriptDir & "\GDIPlus_Image2.jpg", $sCLSID2) _GDIPlus_ImageDispose($hImage) _GDIPlus_Shutdown()  
      Edit: got a lead on the multipage stuff: 
       
      And my code has grown into something where I am trying to draw an image ontop of the first image but it looks like it wont expand the canvas, but ultimately I was thinking just draw the 2nd page next to the 1st page once I figure out how to capture the 2nd page.
      #Include <GDIPlus.au3> Local $hImage, $sCLSID _GDIPlus_Startup() $hImage = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\Test3.tif") $sCLSID = _GDIPlus_EncodersGetCLSID("TIF") $sCLSID2 = _GDIPlus_EncodersGetCLSID("JPG") $iWidth = _GDIPlus_ImageGetWidth($hImage) $iHeight = _GDIPlus_ImageGetHeight($hImage) ; Draw one image in another $hGraphics = _GDIPlus_ImageGetGraphicsContext($hImage) _GDIPlus_GraphicsDrawImage($hGraphics, $hImage, $iWidth, $iHeight) _GDIPlus_ImageSaveToFileEx($hImage, @ScriptDir & "\GDIPlus_Image2.jpg", $sCLSID2) _GDIPlus_ImageDispose($hImage) _GDIPlus_Shutdown()  
    • InunoTaishou
      Redraw your desktop with GDI+
      By InunoTaishou
      Take a screenshot of your desktop (works even if the desktop is hidden), then redraws it row by row. Makes a neat little effect. An effect I remember seeing at the photo booth at Chuck E' Cheese.
      I mostly just wanted to mess with LockBits and PrintWindow and thought this was a decent way to figure it out, but I liked the outcome and thought I'd share lol
      #include <GDIPlus.au3> #include <WinApi.au3> #include <WindowsConstants.au3> _GDIPlus_Startup() Global $tDesktopMetrics = GetDesktopMetrics() Global $hHBitmapDesktop = CaptureWindow("", -1, -1, -1, -1, "Program Manager") Global $hBitmapDesktop = _GDIPlus_BitmapCreateFromHBITMAP($hHBitmapDesktop) _WinAPI_DeleteObject($hHBitmapDesktop) Global $iW = _GDIPlus_ImageGetWidth($hBitmapDesktop) Global $iH = _GDIPlus_ImageGetHeight($hBitmapDesktop) Global $tBitmapData = _GDIPlus_BitmapLockBits($hBitmapDesktop, 0, 0, $iW, $iH, $GDIP_ILMREAD, $GDIP_PXF32PARGB) Global $tPixelMap = DllStructCreate("int[" & $iW * $iH & "];", DllStructGetData($tBitmapData, "Scan0")) Global $hGui = GUICreate("Redraw", $iW, $iH, $tDesktopMetrics.x, $tDesktopMetrics.y, $WS_POPUP) Global $hGraphics = _GDIPlus_GraphicsCreateFromHWND($hGui) Global $hBitmap = _GDIPlus_BitmapCreateFromGraphics($iW, $iH, $hGraphics) Global $tBitmapData2 = _GDIPlus_BitmapLockBits($hBitmap, 0, 0, $iW, $iH, $GDIP_ILMWRITE, $GDIP_PXF32PARGB) Global $tPixelMap2 = DllStructCreate("int[" & $iW * $iH & "];", DllStructGetData($tBitmapData2, "Scan0")) GUISetState(@SW_SHOW, $hGui) _GDIPlus_GraphicsClear($hGraphics) For $iY = 0 To $iH - 1 Local $iRowOffset = $iY * $iW + 1 For $iX = 0 To $iW - 1 ;get each pixel in each line and row DllStructSetData($tPixelMap2, 1, DllStructGetData($tPixelMap, 1, $iRowOffset + $iX), $iRowOffset + $iX) Next If (Not Mod($iY, 5)) Then ; Every 5 rows draw the bitmap _GDIPlus_BitmapUnlockBits($hBitmap, $tBitmapData2) _GDIPlus_GraphicsDrawImage($hGraphics, $hBitmap, 0, 0) $tBitmapData2 = _GDIPlus_BitmapLockBits($hBitmap, 0, 0, $iW, $iH, $GDIP_ILMWRITE, $GDIP_PXF32PARGB) $tPixelMap2 = DllStructCreate("int[" & $iW * $iH & "];", DllStructGetData($tBitmapData2, "Scan0")) EndIf Next If (Mod($iY, 5)) Then ; Didn't end on an even row, clean up _GDIPlus_BitmapUnlockBits($hBitmap, $tBitmapData2) _GDIPlus_GraphicsDrawImage($hGraphics, $hBitmap, 0, 0) $tPixelMap2 = 0 $tBitmapData2 = 0 EndIf _GDIPlus_BitmapUnlockBits($hBitmapDesktop, $tBitmapData) _GDIPlus_BitmapDispose($hBitmapDesktop) _GDIPlus_BitmapDispose($hBitmap) _GDIPlus_GraphicsDispose($hGraphics) _GDIPlus_Shutdown() GUIDelete($hGui) Exit 0 Func GetDesktopMetrics() Return _GDIPlus_RectFCreate(_WinAPI_GetSystemMetrics($SM_XVIRTUALSCREEN), _WinAPI_GetSystemMetrics($SM_YVIRTUALSCREEN), _ _WinAPI_GetSystemMetrics($SM_CXVIRTUALSCREEN), _WinAPI_GetSystemMetrics($SM_CYFULLSCREEN)) EndFunc ;==>GetDesktopMetrics Func GetDialogMetrics() Local $tStruct = DllStructCreate("struct;long caption;long xBorder;long yBorder;long xDlgFrame;long yDlgFrame;endstruct") For $iSysMetric = $SM_CYCAPTION To $SM_CYDLGFRAME DllStructSetData($tStruct, $iSysMetric - $SM_CYCAPTION + 1, _WinAPI_GetSystemMetrics($iSysMetric)) Next Return $tStruct EndFunc ;==>GetDialogMetrics Func CaptureWindow($sFileName = "", $iLeft = -1, $iTop = -1, $iWidth = -1, $iHeight = -1, $hWnd = WinGetHandle("[Active]")) If (Not IsHWnd($hWnd)) Then $hWnd = WinGetHandle($hWnd) If (@error) Then Return SetError(1, 0, 0) Local $tDesktop = GetDesktopMetrics() Local $tRectFWindow = _WinAPI_GetWindowRect($hWnd) If ($iLeft = -1 Or $iLeft = Default) Then $iLeft = DllStructGetData($tDesktop, 1) If ($iTop = -1 Or $iLeft = Default) Then $iLeft = DllStructGetData($tDesktop, 2) If ($iWidth = -1 Or $iWidth = 0 Or $iWidth = Default) Then If ($hWnd = _WinAPI_GetDesktopWindow()) Then $iWidth = DllStructGetData($tDesktop, 3) Else $iWidth = DllStructGetData($tRectFWindow, 3) - DllStructGetData($tRectFWindow, 1) EndIf EndIf If ($iHeight = -1 Or $iHeight = 0 Or $iHeight = Default) Then If ($hWnd = _WinAPI_GetDesktopWindow()) Then $iHeight = DllStructGetData($tDesktop, 4) Else $iHeight = DllStructGetData($tRectFWindow, 4) - DllStructGetData($tRectFWindow, 2) EndIf EndIf Local $iWidth2 = $iWidth Local $iHeight2 = $iHeight If ($iLeft) Then $iWidth = Abs($iWidth - $iLeft) If ($iTop) Then $iHeight = Abs($iHeight - $iTop) Local $hDC = _WinAPI_GetWindowDC($hWnd) Local $hDestDC = _WinAPI_CreateCompatibleDC($hDC) Local $hDestBitmap = _WinAPI_CreateCompatibleBitmap($hDC, $iWidth, $iHeight) Local $hDestSv = _WinAPI_SelectObject($hDestDC, $hDestBitmap) Local $hSrcDC = _WinAPI_CreateCompatibleDC($hDC) Local $hBmp = _WinAPI_CreateCompatibleBitmap($hDC, $iWidth2, $iHeight2) Local $hSrcSv = _WinAPI_SelectObject($hSrcDC, $hBmp) Local $tPoint = _WinAPI_CreatePoint($iLeft, $iTop) _WinAPI_PrintWindow($hWnd, $hSrcDC, True) _WinAPI_ScreenToClient($hWnd, $tPoint) _WinAPI_BitBlt($hDestDC, 0, 0, $iWidth, $iHeight, $hSrcDC, $iLeft, $iTop, $MERGECOPY) _WinAPI_SelectObject($hDestDC, $hDestSv) _WinAPI_SelectObject($hSrcDC, $hSrcSv) _WinAPI_ReleaseDC($hWnd, $hDC) _WinAPI_DeleteDC($hDestDC) _WinAPI_DeleteDC($hSrcDC) _WinAPI_DeleteObject($hBmp) $tPoint = 0 $tRectFWindow = 0 $tDesktop = 0 If ($sFileName = "") Then Return $hDestBitmap _GDIPlus_Startup() Local $hBitmap = _GDIPlus_BitmapCreateFromHBITMAP($hDestBitmap) _WinAPI_DeleteObject($hDestBitmap) _GDIPlus_ImageSaveToFile($hBitmap, $sFileName) _GDIPlus_BitmapDispose($hBitmap) _GDIPlus_Shutdown() Return True EndFunc ;==>CaptureWindow