Dj Demir Posted June 13, 2013 Share Posted June 13, 2013 Merhaba arkadaşlar. Uzun zamandır AutoIT ile çalışma yapmadım. Dolayısıyla gerileme oldu. Şu an bir çalışma yapmaktayım ama Şöyle bir sorunum var. Arka plan resminin üzerine checkbox oluşturuyorum, checkbox resmin arkasında kalıyor. Bunu nasıl halledebilirim acaba? Quote Link to comment Share on other sites More sharing options...
mesale0077 Posted June 13, 2013 Share Posted June 13, 2013 (edited) resim altına GUICtrlSetState($resim , $GUI_DISABLE) eklemen yeterli olacaktır örnek amaçlı dersen $resim = GUICtrlCreatePic("mkmm.jpg",200,200,200,200) GUICtrlSetState($resim , $GUI_DISABLE) şeklinde yapacaksın :) Edited June 13, 2013 by mesale0077 Quote Link to comment Share on other sites More sharing options...
Dj Demir Posted June 14, 2013 Author Share Posted June 14, 2013 Hmm haklısın bir de GUI_DISABLE vardı ya :) Teşekkürler. Yalnız hatırlayamadığım bir şey daha var. Checkbox'u resmin üzerine aldığım zaman çirkin bir görüntü oluşuyor Var mıydı onu da düzeltmenin yolu ? Quote Link to comment Share on other sites More sharing options...
DivaneTR Posted June 14, 2013 Share Posted June 14, 2013 Sanırım checkboxun arkaplan rengini transparent yapman lazım. Öyle hatırlıyorum. Quote Link to comment Share on other sites More sharing options...
Dj Demir Posted June 14, 2013 Author Share Posted June 14, 2013 $GUI_WS_EX_TRANSPARENT ya da $WS_EX_TRANSPARENT ile Transparan yaptım ama nafile. Quote Link to comment Share on other sites More sharing options...
DivaneTR Posted June 14, 2013 Share Posted June 14, 2013 Yok öyle değil, GUICtrlSetBkColor gibi bir kod vardı. Quote Link to comment Share on other sites More sharing options...
SimpsoN_Bart Posted June 14, 2013 Share Posted June 14, 2013 Checkbox arkaplan rengi tam olarak transparan olmuyor, onun için bir kod geliştirdim ama tam etkin değil. Quote Link to comment Share on other sites More sharing options...
mesale0077 Posted June 14, 2013 Share Posted June 14, 2013 (edited) checkbox ile alakalıymış konu yeni hali http://www.tnctr.com/topic/223618-gui-uzerine-item-oluthturmak/?p=1327668 Edited June 14, 2013 by mesale0077 Quote Link to comment Share on other sites More sharing options...
Dj Demir Posted June 14, 2013 Author Share Posted June 14, 2013 (edited) ibocan Teşekkürler. Evet UxTheme.dll çağırdığım zaman oluyor. Ancak ben GUI teması olarak ayrı bir dll dosyası kullanıyorum. O dll dosyası ile beraber yaptığım zaman chechbox yine transparan olmuyor. Edited June 14, 2013 by Dj Demir Quote Link to comment Share on other sites More sharing options...
SimpsoN_Bart Posted June 14, 2013 Share Posted June 14, 2013 http://www.tnctr.com/topic/223666-checkbox-arkaplan-rengini-theffaf-yapma/ Quote Link to comment Share on other sites More sharing options...
Dj Demir Posted June 14, 2013 Author Share Posted June 14, 2013 (edited) #Simpson_Bart Güzel çalışma olmuş ancak demek istediğim şu. Bu komutları Sıradan bir GUI üzerine konulan chechkbox'a uyguladığımız zaman sonuç alabiliyoruz. Ancak ben GUI'yi oluştururken dll dosyası kullanıp GUI'ye tema ekliyorum. Böyle olunca bu komutlar maalesef işe yaramıyor. Örnek #NoTrayIcon #RequireAdmin #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <Constants.au3> #include <String.au3> Global $TemaShe = @ScriptDir & "\BLacK.she" Global $TemaDLL = @ScriptDir & "\BLacK.dll" _BLacK_White_App() Func _BLacK_White_App() $BLacK = GUICreate(" ® BLacK White Application Pack 2013", 1200, 670, -1, 5) GUICtrlCreatePic("files\arka2.jpg", -1, -1, 1230, 700) GUICtrlCreateCheckbox("sdfdgfdhdfhdfhdfhdfhdf",50,50,200,15) GUICtrlSetFont(-1,8.5,800,"","Tahoma",2) _Tema ( $TemaShe) GUISetState ( ) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd EndFunc Func _Tema ( $TemayiUyguLa ) $Dll = DllOpen ($TemaDLL) DllCall ( $Dll, "int", "SkinH_AttachEx", "str", $TemayiUyguLa, "str", "mhgd" ) DllCall ( $Dll, "int", "SkinH_SetAero", "int", 1 ) EndFunc Edited June 14, 2013 by Dj Demir Quote Link to comment Share on other sites More sharing options...
SimpsoN_Bart Posted June 14, 2013 Share Posted June 14, 2013 Anladım fakat ilgili dll yi kullanmadığım için pek bir şey diyemeyeceğim kurcalamak lazım.. Şimdilik çıkmam, lazım kolay gelsin. Quote Link to comment Share on other sites More sharing options...
mesale0077 Posted June 14, 2013 Share Posted June 14, 2013 #Simpson_Bart Güzel çalışma olmuş ancak demek istediğim şu. Bu komutları Sıradan bir GUI üzerine konulan chechkbox'a uyguladığımız zaman sonuç alabiliyoruz. Ancak ben GUI'yi oluştururken dll dosyası kullanıp GUI'ye tema ekliyorum. Böyle olunca bu komutlar maalesef işe yaramıyor. Örnek #NoTrayIcon #RequireAdmin #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <Constants.au3> #include <String.au3> Global $TemaShe = @ScriptDir & "\BLacK.she" Global $TemaDLL = @ScriptDir & "\BLacK.dll" _BLacK_White_App() Func _BLacK_White_App() $BLacK = GUICreate(" ® BLacK White Application Pack 2013", 1200, 670, -1, 5) GUICtrlCreatePic("files\arka2.jpg", -1, -1, 1230, 700) GUICtrlCreateCheckbox("sdfdgfdhdfhdfhdfhdfhdf",50,50,200,15) GUICtrlSetFont(-1,8.5,800,"","Tahoma",2) _Tema ( $TemaShe) GUISetState ( ) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd EndFunc Func _Tema ( $TemayiUyguLa ) $Dll = DllOpen ($TemaDLL) DllCall ( $Dll, "int", "SkinH_AttachEx", "str", $TemayiUyguLa, "str", "mhgd" ) DllCall ( $Dll, "int", "SkinH_SetAero", "int", 1 ) EndFunc dostum sonradan kod vermeniz beni öldürüyor bu arada size verdiğim örnek size faydalı olmadımı birde dll cakışması bazen olabiliyor diyer dosyalarıda verseydinizde deneme şansımız olsaydı :) Quote Link to comment Share on other sites More sharing options...
Dj Demir Posted June 14, 2013 Author Share Posted June 14, 2013 Örnek fayda sağlamadı. Çünkü dediğim gibi sıradan guilerde işe yarıyor. Buyur kullandığım dll ve she dosyası. Aynı anda çalıştıramadım ben. http://www.mediafire.com/?b3fy46l481d1yzb Quote Link to comment Share on other sites More sharing options...
mesale0077 Posted June 14, 2013 Share Posted June 14, 2013 (edited) udfye dönüştürmek lazım ama basit bir yöntem kullandım umarım işine yarar deneyince size uygun olup olmadığını belirtirseniz memnun olurum muhtemelen çalışacaktır :) bu aralar benim pc de problem var güç kaynağında sıkıntı var kapanma yapıyor ,yada miladi doldu galiba :) bunuda arkadaşın pcsinde hazırladım :hadiya: [spoiler]# @mesale0077 tarafından yapıldı. #NoTrayIcon #RequireAdmin #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <GDIPlus.au3> Local $nAngle = 270 Local $nPI = 4 * ATan(1) Opt("GUIOnEventMode", 1) Global $TemaShe = @ScriptDir & "\BLacK.she" Global $TemaDLL = @ScriptDir & "\BLacK.dll" $Dll = DllOpen ($TemaDLL) DllCall ( $Dll, "int", "SkinH_AttachEx", "str",$TemaShe, "str", "mhgd" ) DllCall ( $Dll, "int", "SkinH_SetAero", "int", 1 ) $GUI = GUICreate("GDI mesale0077", 400, 400) GUISetOnEvent(-3, "_Quit") $Pic1 = GUICtrlCreatePic(StringLeft(@AutoItExe, StringInStr(@AutoItExe, "\", 0, -1)) & "Examples\GUI\msoobe.jpg", 0, 0, 400, 400, 0) GUICtrlSetState( $Pic1 , $GUI_disable) _GDIPlus_Startup() $GDI = _GDIPlus_GraphicsCreateFromHWND($GUI) $hMatrix = _GDIPlus_MatrixCreate() _GDIPlus_MatrixRotate($hMatrix, $nAngle, False) _GDIPlus_GraphicsSetTransform($GDI, $hMatrix) $check= GUICtrlCreateCheckbox("",50,50,15,15 ) GUISetState ( ) While 1 Vstring("mesale0077", 70,70, 12, $nAngle) Sleep(250) WEnd Func VString($txt, $nx, $ny, $size, $nAngle) $nXt = $nx * Cos($nAngle * $nPI / 180) + $ny * Sin($nAngle * $nPI / 180) $nYt = -$nx * Sin($nAngle * $nPI / 180) + $ny * Cos($nAngle * $nPI / 180) _GDIPlus_GraphicsDrawString($GDI, $txt, $nXt, $nYt, "Arial", $size, 0x0002) EndFunc Func _Quit() _GDIPlus_GraphicsDispose($GDI) _GDIPlus_MatrixDispose($hMatrix) _GDIPlus_Shutdown() Exit EndFunc [/spoiler] Edited June 14, 2013 by mesale0077 Quote Link to comment Share on other sites More sharing options...
Dj Demir Posted June 15, 2013 Author Share Posted June 15, 2013 Gerçekten harika :) Teşekkürler "Havaya Kod Yaz Adam" :) Quote Link to comment Share on other sites More sharing options...
Dj Demir Posted June 15, 2013 Author Share Posted June 15, 2013 #mesale0077 yalnız yazının rengini kendimce bir kaç yöntem denememe rağmen değiştiremedim. Quote Link to comment Share on other sites More sharing options...
mesale0077 Posted June 15, 2013 Share Posted June 15, 2013 (edited) buyrun işte kodlar bu nasıl olmuş [spoiler] #NoTrayIcon #RequireAdmin #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <GDIPlus.au3> Global $TemaShe = @ScriptDir & "\BLacK.she" Global $TemaDLL = @ScriptDir & "\BLacK.dll" $Dll = DllOpen ($TemaDLL) DllCall ( $Dll, "int", "SkinH_AttachEx", "str",$TemaShe, "str", "mhgd" ) DllCall ( $Dll, "int", "SkinH_SetAero", "int", 1 ) $GUI = GUICreate("GDI @mesale0077", 400, 400) $Pic1 = GUICtrlCreatePic(StringLeft(@AutoItExe, StringInStr(@AutoItExe, "\", 0, -1)) & "Examples\GUI\msoobe.jpg", 0, 0, 400, 400, 0) GUICtrlSetState( $Pic1 , $GUI_disable) _GDIPlus_Startup() $hGraphics = _GDIPlus_GraphicsCreateFromHWND($GUI ) $check= GUICtrlCreateCheckbox("",50,50,15,15 ) GUISetState ( ) While 1 _GDIPlus_GraphicsDrawStringColor($hGraphics, "@mesale0077", 68, 48, "Arial", 12, 0, 0xFFFF1400) $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE _GDIPlus_Shutdown() Exit EndSwitch WEnd Func _GDIPlus_GraphicsDrawStringColor($hGraphics, $sString, $nX, $nY, $sFont = "Arial", $nSize = 10, $iFormat = 0, $iBrush = 0xFF000000) Local $hBrush, $iError, $hFamily, $hFont, $hFormat, $aInfo, $tLayout, $bResult $hBrush = _GDIPlus_BrushCreateSolid($iBrush) $hFormat = _GDIPlus_StringFormatCreate($iFormat) $hFamily = _GDIPlus_FontFamilyCreate($sFont) $hFont = _GDIPlus_FontCreate($hFamily, $nSize) $tLayout = _GDIPlus_RectFCreate($nX, $nY, 0, 0) $aInfo = _GDIPlus_GraphicsMeasureString($hGraphics, $sString, $hFont, $tLayout, $hFormat) $bResult = _GDIPlus_GraphicsDrawStringEx($hGraphics, $sString, $hFont, $aInfo[0], $hFormat, $hBrush) $iError = @error _GDIPlus_FontDispose($hFont) _GDIPlus_FontFamilyDispose($hFamily) _GDIPlus_StringFormatDispose($hFormat) _GDIPlus_BrushDispose($hBrush) Return SetError($iError, 0, $bResult) EndFunc [/spoiler] Edited June 15, 2013 by mesale0077 Quote Link to comment Share on other sites More sharing options...
Dj Demir Posted June 16, 2013 Author Share Posted June 16, 2013 Tam olmuş teşekkürler. Ben de Brush kullanmayı denedim ama _GDIPlus'tan tam anlamıyorum beceremedim. Quote Link to comment Share on other sites More sharing options...
mesale0077 Posted June 16, 2013 Share Posted June 16, 2013 (edited) normalde dll skin kullanırken bu yöntemden başka çare yok mantığınıda anlamışsındır ,autoit bilginizde iyi ,yapılamayacak bir şey yok bence :) sadece hayal gücü işte :) Edited June 16, 2013 by mesale0077 Quote Link to comment Share on other sites More sharing options...
Dj Demir Posted June 19, 2013 Author Share Posted June 19, 2013 Pek iyi diyemiyorum kendime :) Ufak tefek yapıyoruz , uğraşıyoruz işte. Yardımların için tekrar teşekkürlerimi sunmak istiyorum. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.