Butonlara Resim Koymak - Çözüldü
Butonlara Resim Koymak - Çözüldü
Butonlara Resim Koymak istiyorum diyelim facebook amblemini fln koyacam ama olmyor
- BlueLife
- Kilobyte1

- Mesajlar: 292
- Kayıt: 29 Ağu 2014, 20:42
- Teşekkür etti: 45 kez
- Teşekkür edildi: 68 kez
Re: Butonlara Resim Koymak
Butonlara resim degilde icon eklenir genelde. Misal asagıdaki gibi.

Autoit yardım dosyasında ornekle vardı.
Tabi komple bir buton resmi hazırlaıp bunu calısmanda kullanabilirsin. Misal asagıdaki gibi.


Autoit yardım dosyasında ornekle vardı.
Kod: Tümünü seç
#include <GUIConstantsEx.au3>
#include <ButtonConstants.au3>
Example()
Func Example()
Local $msg
GUICreate("My GUI") ; will create a dialog box that when displayed is centered
GUICtrlCreateButton("my picture button", 10, 20, 40, 40, $BS_ICON)
GUICtrlSetImage(-1, "shell32.dll", 22)
GUISetState()
; Run the GUI until the dialog is closed
While 1
$msg = GUIGetMsg()
If $msg = $GUI_EVENT_CLOSE Then ExitLoop
WEnd
EndFunc ;==>Example
Re: Butonlara Resim Koymak
tamamda nasıl kullanacam tasarladıgım resmi shell32.dll yerine resmin konumunumu yazmam gerekli kullanmak icin. ögrenmek istedigim bu
sadece icon ekleniyorsa demek istedigim olmaz tesekkürler Cevap icin
sadece icon ekleniyorsa demek istedigim olmaz tesekkürler Cevap icin
- BlueLife
- Kilobyte1

- Mesajlar: 292
- Kayıt: 29 Ağu 2014, 20:42
- Teşekkür etti: 45 kez
- Teşekkür edildi: 68 kez
Re: Butonlara Resim Koymak
Icon dosyasını derlerken autoit.exe sine ekliyorsun. Iconların sıralamsı olur ona gore harf yazıyoruz. Yukarıdakine ek yapayım biraz incele.
Tabi exeye cevirip bak...
Tabi exeye cevirip bak...
Kod: Tümünü seç
#include <GUIConstantsEx.au3>
#include <ButtonConstants.au3>
Example()
Func Example()
Local $msg
Local $IconFile = @AutoItExe
GUICreate("My GUI") ; will create a dialog box that when displayed is centered
Local $btn1 = GUICtrlCreateButton("my picture button", 10, 20, 40, 40, $BS_ICON)
GUICtrlSetImage($btn1, $IconFile, -1)
Local $btn2 = GUICtrlCreateButton("my picture button", 10, 65, 40, 40, $BS_ICON)
GUICtrlSetImage($btn2, $IconFile, -2)
Local $btn3 = GUICtrlCreateButton("my picture button", 10, 110, 40, 40, $BS_ICON)
GUICtrlSetImage($btn3, $IconFile, -3)
Local $btn4 = GUICtrlCreateButton("my picture button", 10, 110, 40, 40, $BS_ICON)
GUICtrlSetImage($btn4, $IconFile, -4)
Local $btn1 = GUICtrlCreateButton("my picture button", 10, 220, 100, 40)
GUICtrlSetImage($btn1, $IconFile, -1)
Local $btn2 = GUICtrlCreateButton("my picture button", 10, 265, 100, 40)
GUICtrlSetImage($btn2, $IconFile, -2)
Local $btn3 = GUICtrlCreateButton("my picture button", 10, 310, 100, 40)
GUICtrlSetImage($btn3, $IconFile, -3)
Local $btn4 = GUICtrlCreateButton("my picture button", 10, 310, 100, 40)
GUICtrlSetImage($btn4, $IconFile, -4)
GUISetState()
; Run the GUI until the dialog is closed
While 1
$msg = GUIGetMsg()
If $msg = $GUI_EVENT_CLOSE Then ExitLoop
WEnd
EndFunc ;==>Example
