Jump to content

Progressbar'a Resim Atama...?


selamdostum
 Share

Recommended Posts

Progressbar'a renk vermeyi buldum fakat resim yani desenli bir resim yapıcam msla yada gif yada en güzeli png atamak nasıl yapabilirim bunu bilen varsa yardımcı olabilirmi kardeşlerim?
[img]http://www.karanliksehir.com/programlar/X-VirusPanel.jpg[/img]
şu üsttekilere şekil vermem gerekte
Link to comment
Share on other sites

Grapic'lerle ufakbir örnek yaptım. Boş vaktim olduğunda resimli de yapabilirim. Eğer biraz uğraşırsan sen de resimlisini yapabilirsin.

[code]#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

#region ### START Koda GUI section ### Form=
$Form1 = GUICreate("ProgressBar...", 615, 438, 192, 124)
$Progress= _ProgressBarCreate(16,100,200,15,0xFFBBDD,0xFF0000)
$pp = _ProgressBarCreate(16,200,355,25)
$button1 = GUICtrlCreateButton("Başlat", 17, 50, 250, 25)
GUISetState(@SW_SHOW)
#endregion ### END Koda GUI section ###
_ProgressBarData($Form1, $pp, 50)
While 1

$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $button1
For $i = 1 To 100
Sleep(10)
_ProgressBarData($Form1, $Progress, $i)

Next
For $i = 100 To 1 Step -1
Sleep(10)
_ProgressBarData($Form1, $Progress, $i)
Next
EndSwitch
WEnd

Func _ProgressBarCreate($Left, $Top, $W, $H, $BG_Color = 0x000080, $Color = 0xFF0000)

Local $ProgresCreate = GUICtrlCreateGraphic($Left - 3, $Top - 3, $W+6, $H + 6)
GUICtrlSetColor(-1, $Color)
Local $ProgresCreate2 = GUICtrlCreateGraphic($Left, $Top, 1, $H)
GUICtrlSetBkColor(-1, $BG_Color)
Return $ProgresCreate & "-" & $ProgresCreate2

EndFunc ;==>_ProgressBarCreate

Func _ProgressBarData($HwndForm, $ControlID, $i)

$Pos = ControlGetPos($HwndForm, "", Number(StringTrimRight(StringLeft($ControlID, StringInStr($ControlID, "-", 0, -1)), 1)))
$i = $Pos[2] * $i / 100 -6
GUICtrlSetPos(Number(StringTrimLeft(StringRight($ControlID, StringInStr($ControlID, "-", 0, -1)), 1)), Default, Default, $i, Default)

EndFunc ;==>_ProgressBarData[/code]]

Edited by asmazh
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...