Jump to content

Updating an image on a GUI... :)


Recommended Posts

While 1

InetGet("image")

GUICtrlDelete($Pic1)

$Pic1 = GUICtrlCreatePic(@TempDir & "\ServerCapture.jpg", 0, 0, @DesktopWidth, @DesktopHeight, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))

WEnd

What I'm trying to do is as simple as pie... but it's being difficult.

I was trying to find a better way that doesn't involve the seizure causing flicker... :D

I'll take C++ examples as well... :o

Yes, this IS what it looks like... My friend over at HideAwayCyber.com wants a tool that just 'works'... VNC requires firewall exceptions, which takes forever to walk most clients through, TeamViewer is "for NON-COMMERCIAL use only..." <--- Yes, they write it in all caps... etc...etc...

I got the client and server working, and I'll share the code once it's good enough over in the examples section... I know "Radical 2" is already released, but it has a C# server, and doesn't have the 1 thing I want... "Point and click" :P

I'm trying to learn C++, so if you guys have any good TCP examples... Throw them my way...

Just for the record... I'm not asking for a hand-out... Just the name of a UDF or better idea will suffice... Which I guess is sort of a hand out... But you get my drift... :D

SIGNATURE_0X800007D NOT FOUND

Link to comment
Share on other sites

GDI+ maybe?

#include <GUIConstants.au3>
#include <GDIplus.au3>

Global Const $width=600
Global Const $height=400
GLobal $title="GDI+"

; Build your GUI here
Opt("GUIOnEventMode",1)
$hwnd=GUICreate($title,$width,$height)
GUISetOnEvent($GUI_EVENT_CLOSE,"close")
GUISetState()

; Load your GDI+ resources here:
_GDIPlus_Startup()
$graphics=_GDIPlus_GraphicsCreateFromHWND($hwnd)
$bitmap=_GDIPlus_BitmapCreateFromGraphics($width,$height,$graphics)
$backbuffer=_GDIPlus_ImageGetGraphicsContext($bitmap)



Do
    _GDIPlus_GraphicsClear($backbuffer)
    
;InetGet("somewhere.jpg","capture.jpg")
    $image=_GDIPlus_ImageLoadFromFile("capture.jpg")
    _GDIPlus_GraphicsDrawImageRect($backbuffer,$image,0,0,300,200)
    _GDIPlus_ImageDispose($image)
    
    
    _GDIPlus_GraphicsDrawImageRect($graphics,$bitmap,0,0,$width,$height)
    Sleep(10)
Until False

Broken link? PM me and I'll send you the file!

Link to comment
Share on other sites

GUICtrlSetImage ( controlID, filename [, iconname [, icontype]] ) ???

or you want to constantly check if its been changed

Link to comment
Share on other sites

Hmm... Something is locking the script up for about 3 seconds, and then releases for just a split second... I think it's the Inetget() it's the only thing that could be holding that long I think.

nvm... I got it... :D

InetGet("captureSS35.jpg",@TempDir & "\ServerCapture.jpg",1,1)
While @InetGetActive
    Sleep(500)
WEnd

@CodyBarrett

Once I'm done, the screen is going to be split into 5 or 10 chunks, and each part of the screen will be updated if an updated checksum fails...

Once I'm done with this... It should be pretty cool... :o

Edited by BinaryBrother

SIGNATURE_0X800007D NOT FOUND

Link to comment
Share on other sites

hmmm sounds interesting :D

Link to comment
Share on other sites

i dont know anything about GDI+ so i can't very well compare them :S i just said first thing that poped into ma head

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...