Jump to content

Tooltipte Resim Görüntüleme


mesale0077
 Share

Recommended Posts

tooltip konumu ayarlama yapabilrsin

ben mesala  ,300,100, şeklinde yaptım

yanlız sizin dediğiniz traytip ,traytip ile alakası yoktur

eğer isterseniz traytip udfsini siz yapabilrsiniz bu kodlardan yola çıkarak

sadeliğe gelince kafamda bir düşünce geçti sizlerle paylaştım

geliştirmek sizlerin elinde artık :)

Edited by mesale0077
Link to comment
Share on other sites

hareketli resim ve diğer resim formatları görüntüleme özelliği eklendi

gif ,png vs

yanlız burdaki udfyi indirmeyi unutmayın

http://www.autoitscript.com/forum/topic/96132-gif-animation/

3 ,  avatar12034_5.gif en yukarıdaki resim

#include <GUIConstantsEx.au3>
#include <WinAPI.au3>
#include <WindowsConstants.au3>
#include "GIFAnimation.au3"
$sFile="avatar12034_5.gif"
#mesale0077
Global Enum $__hGUIDisableHWnd, $__hGUIDisableHWndPrevious, $__iGUIDisableMax
Global $__aGUIDisable[$__iGUIDisableMax]

$s = "@mesale0077"
ToolTip($s, 500, 100, "İnfo",0,3)
$H_TOOLTIP1 = WinGetHandle($s)
     Local $aWinGetPos =WinGetPos($H_TOOLTIP1)
    Local $hGUIDisable = _GUIDisable($H_TOOLTIP1, 1, 25)
    If @error = 0 Then
        WinMove($hGUIDisable, '', $aWinGetPos[0]+10 , $aWinGetPos[1]-40)
    EndIf
    $Pic1 = GUICtrlCreatePic("",0 ,0,  $aWinGetPos[2], $aWinGetPos[3])
    _GUICtrlSetGIF($Pic1 , $sFile)
    Sleep(3000)
GUICtrlDelete($Pic1 )
ToolTip("")
    Func _GUIDisable($hWnd, $iAnimate = Default, $iBrightness = Default, $bColor = 0x000000)
    Local Const $AW_SLIDE_IN_TOP = 0x00040004, $AW_SLIDE_OUT_TOP = 0x00050008
    If IsHWnd($__aGUIDisable[$__hGUIDisableHWnd]) Then
    
        GUIDelete($__aGUIDisable[$__hGUIDisableHWnd])
        GUISwitch($__aGUIDisable[$__hGUIDisableHWndPrevious])
        $__aGUIDisable[$__hGUIDisableHWnd] = 0
        $__aGUIDisable[$__hGUIDisableHWndPrevious] = 0
    Else
        $__aGUIDisable[$__hGUIDisableHWndPrevious] = $hWnd

        Local $iLeft = 0, $iTop = 0
        Local $sCurrentTheme = RegRead('HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Themes', 'CurrentTheme')
        Local $iIsClassicTheme = Number(StringInStr($sCurrentTheme, 'Basic.theme', 2) = 0 And StringInStr($sCurrentTheme, 'Ease of Access Themes', 2) > 0)

        Local $aStyle = GUIGetStyle($__aGUIDisable[$__hGUIDisableHWndPrevious])
        If UBound($aStyle) Then
            If BitAND($aStyle[0], $WS_SIZEBOX) Then
                If RegRead('HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\', 'CurrentVersion') >= 6.0 Then ; Windows Vista+.
                    If $iIsClassicTheme Then
                        $iLeft -= 1
                        $iTop -= 1
                    Else
                        $iLeft -= 5
                        $iTop -= 5
                    EndIf
                Else
                    $iLeft -= 1
                    $iTop -= 1
                EndIf
            EndIf
        EndIf

        Local $aWinGetPos = WinGetClientSize($__aGUIDisable[$__hGUIDisableHWndPrevious])
        $__aGUIDisable[$__hGUIDisableHWnd] = GUICreate('', $aWinGetPos[0], $aWinGetPos[1], $iLeft, $iTop, $WS_POPUP, $WS_EX_MDICHILD, $__aGUIDisable[$__hGUIDisableHWndPrevious])
        GUISetBkColor($bColor, $__aGUIDisable[$__hGUIDisableHWnd])
        WinSetTrans($__aGUIDisable[$__hGUIDisableHWnd], '', 0)
        GUIRegisterMsg($WM_SIZE, '__GUIDisable_WM_SIZE')
    
            GUISetState(@SW_SHOW, $__aGUIDisable[$__hGUIDisableHWnd])
        
        GUISetState(@SW_DISABLE, $__aGUIDisable[$__hGUIDisableHWnd])
        GUISwitch($__aGUIDisable[$__hGUIDisableHWndPrevious])
    EndIf
    Return $__aGUIDisable[$__hGUIDisableHWnd]
EndFunc   ;==>_GUIDisable

Func __GUIDisable_WM_SIZE($hWnd, $iMsg, $wParam, $lParam)
    #forceref $hWnd, $iMsg, $wParam
    Local $iHeight = _WinAPI_HiWord($lParam)
    Local $iWidth = _WinAPI_LoWord($lParam)
    If $hWnd = $__aGUIDisable[$__hGUIDisableHWndPrevious] Then
        Local $iWinGetPos = WinGetPos($__aGUIDisable[$__hGUIDisableHWnd])
        If @error = 0 Then
            WinMove($__aGUIDisable[$__hGUIDisableHWnd], '', $iWinGetPos[0], $iWinGetPos[1], $iWidth, $iHeight)
        EndIf
    EndIf
    Return $GUI_RUNDEFMSG
EndFunc   ;==>__GUIDisable_WM_SIZE  
    

animasyon resmimiz

 

post-46572-0-19818600-1377352471.gif

 

inen gif adını  969uc.gif  olarak değiştirin

4.

#include-once
#include <GUIConstantsEx.au3>
#include <WinAPI.au3>
#include <WindowsConstants.au3>
#include "GIFAnimation.au3"

#mesale0077 tooltipimgudf
Global Enum $__hGUIDisableHWnd, $__hGUIDisableHWndPrevious, $__iGUIDisableMax
Global $__aGUIDisable[$__iGUIDisableMax]
_tooltipimg("mesale0077:I love you Autoit","infd",300,100,5000,"969uc.gif",-15,0,40,40,1,0)


func  _tooltipimg($text_1="",$title_1="",$x_1=0,$y_1=0,$timer_1=0,$image_1="",$image_x_1=0,$image_y_1=0,$image_w_1=32,$image_h_1=32,$icon_1=0,$options_1=0)
$s = $text_1&"              "
$s_1=stringlen($s)
ToolTip($s, $x_1, $y_1, $title_1,$icon_1,$options_1)
$H_TOOLTIP1 = WinGetHandle($s)
 GUISetState(@SW_DISABLE,$H_TOOLTIP1)
     Local $aWinGetPos =WinGetPos($H_TOOLTIP1)
    Local $hGUIDisable = _GUIDisable($H_TOOLTIP1, 1, 25)
Local $aClientSize = WinGetClientSize($H_TOOLTIP1)
    If @error = 0 Then
        WinMove($hGUIDisable, '', $aWinGetPos[0]+$aWinGetPos[2]-$aWinGetPos[3]+$s_1-20+$image_x_1,$aWinGetPos[1]+$aWinGetPos[3]-45+$image_y_1,$image_w_1, $image_h_1)
    EndIf
   ; $Pic1 = GUICtrlCreatePic($image_1,0 ,0, $image_w_1, $image_h_1)
     $Pic1 = GUICtrlCreatePic("",0 ,0, $image_w_1, $image_h_1)
         _GUICtrlSetGIF($Pic1 , $image_1)
        Sleep($timer_1)
ToolTip("")
    endfunc
Func _GUIDisable($hWnd, $iAnimate = Default, $iBrightness = Default, $bColor = 0x000000)
    Local Const $AW_SLIDE_IN_TOP = 0x00040004, $AW_SLIDE_OUT_TOP = 0x00050008
    If IsHWnd($__aGUIDisable[$__hGUIDisableHWnd]) Then
    
        GUIDelete($__aGUIDisable[$__hGUIDisableHWnd])
        GUISwitch($__aGUIDisable[$__hGUIDisableHWndPrevious])
        $__aGUIDisable[$__hGUIDisableHWnd] = 0
        $__aGUIDisable[$__hGUIDisableHWndPrevious] = 0
    Else
        $__aGUIDisable[$__hGUIDisableHWndPrevious] = $hWnd

        Local $iLeft = 0, $iTop = 0
        Local $sCurrentTheme = RegRead('HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Themes', 'CurrentTheme')
        Local $iIsClassicTheme = Number(StringInStr($sCurrentTheme, 'Basic.theme', 2) = 0 And StringInStr($sCurrentTheme, 'Ease of Access Themes', 2) > 0)

        Local $aStyle = GUIGetStyle($__aGUIDisable[$__hGUIDisableHWndPrevious])
        If UBound($aStyle) Then
            If BitAND($aStyle[0], $WS_SIZEBOX) Then
                If RegRead('HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\', 'CurrentVersion') >= 6.0 Then ; Windows Vista+.
                    If $iIsClassicTheme Then
                        $iLeft -= 1
                        $iTop -= 1
                    Else
                        $iLeft -= 5
                        $iTop -= 5
                    EndIf
                Else
                    $iLeft -= 1
                    $iTop -= 1
                EndIf
            EndIf
        EndIf

        Local $aWinGetPos = WinGetClientSize($__aGUIDisable[$__hGUIDisableHWndPrevious])
        $__aGUIDisable[$__hGUIDisableHWnd] = GUICreate('', $aWinGetPos[0], $aWinGetPos[1], $iLeft, $iTop, $WS_POPUP, $WS_EX_MDICHILD, $__aGUIDisable[$__hGUIDisableHWndPrevious])
        GUISetBkColor($bColor, $__aGUIDisable[$__hGUIDisableHWnd])
        WinSetTrans($__aGUIDisable[$__hGUIDisableHWnd], '', 0)
        GUIRegisterMsg($WM_SIZE, '__GUIDisable_WM_SIZE')
    
            GUISetState(@SW_SHOW, $__aGUIDisable[$__hGUIDisableHWnd])
        
        GUISetState(@SW_DISABLE, $__aGUIDisable[$__hGUIDisableHWnd])
        GUISwitch($__aGUIDisable[$__hGUIDisableHWndPrevious])
    EndIf
    Return $__aGUIDisable[$__hGUIDisableHWnd]
EndFunc   ;==>_GUIDisable

Func __GUIDisable_WM_SIZE($hWnd, $iMsg, $wParam, $lParam)
    #forceref $hWnd, $iMsg, $wParam
    Local $iHeight = _WinAPI_HiWord($lParam)
    Local $iWidth = _WinAPI_LoWord($lParam)
    If $hWnd = $__aGUIDisable[$__hGUIDisableHWndPrevious] Then
        Local $iWinGetPos = WinGetPos($__aGUIDisable[$__hGUIDisableHWnd])
        If @error = 0 Then
            WinMove($__aGUIDisable[$__hGUIDisableHWnd], '', $iWinGetPos[0], $iWinGetPos[1], $iWidth, $iHeight)
        EndIf
    EndIf
    Return $GUI_RUNDEFMSG
EndFunc   ;==>__GUIDisable_WM_SIZE  
  
Edited by mesale0077
Link to comment
Share on other sites

5.

#include-once
#include <GUIConstantsEx.au3>
#include <WinAPI.au3>
#include <WindowsConstants.au3>
#include "GIFAnimation.au3"

#mesale0077 tooltipimgudf
Global Enum $__hGUIDisableHWnd, $__hGUIDisableHWndPrevious, $__iGUIDisableMax
Global $__aGUIDisable[$__iGUIDisableMax]
_tooltipimg("mesale0077:I love you Autoit","infd",@DesktopWidth - 210,@DesktopHeight - 90,5000,"avatar12034_5.gif",-15,0,40,40,1,0)


func  _tooltipimg($text_1="",$title_1="",$x_1=0,$y_1=0,$timer_1=0,$image_1="",$image_x_1=0,$image_y_1=0,$image_w_1=32,$image_h_1=32,$icon_1=0,$options_1=0)
$s = $text_1&"              "
$s_1=stringlen($s)
ToolTip($s, $x_1, $y_1, $title_1,$icon_1,$options_1)
$H_TOOLTIP1 = WinGetHandle($s)
 GUISetState(@SW_DISABLE,$H_TOOLTIP1)
     Local $aWinGetPos =WinGetPos($H_TOOLTIP1)
    Local $hGUIDisable = _GUIDisable($H_TOOLTIP1, 1, 25)
Local $aClientSize = WinGetClientSize($H_TOOLTIP1)
    If @error = 0 Then
        WinMove($hGUIDisable, '', $aWinGetPos[0]+$aWinGetPos[2]-$aWinGetPos[3]+$s_1-20+$image_x_1,$aWinGetPos[1]+$aWinGetPos[3]-45+$image_y_1,$image_w_1, $image_h_1)
    EndIf
   ; $Pic1 = GUICtrlCreatePic($image_1,0 ,0, $image_w_1, $image_h_1)
     $Pic1 = GUICtrlCreatePic("",0 ,0, $image_w_1, $image_h_1)
         _GUICtrlSetGIF($Pic1 , $image_1)
        Sleep($timer_1)
ToolTip("")
    endfunc
Func _GUIDisable($hWnd, $iAnimate = Default, $iBrightness = Default, $bColor = 0x000000)
    Local Const $AW_SLIDE_IN_TOP = 0x00040004, $AW_SLIDE_OUT_TOP = 0x00050008
    If IsHWnd($__aGUIDisable[$__hGUIDisableHWnd]) Then
    
        GUIDelete($__aGUIDisable[$__hGUIDisableHWnd])
        GUISwitch($__aGUIDisable[$__hGUIDisableHWndPrevious])
        $__aGUIDisable[$__hGUIDisableHWnd] = 0
        $__aGUIDisable[$__hGUIDisableHWndPrevious] = 0
    Else
        $__aGUIDisable[$__hGUIDisableHWndPrevious] = $hWnd

        Local $iLeft = 0, $iTop = 0
        Local $sCurrentTheme = RegRead('HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Themes', 'CurrentTheme')
        Local $iIsClassicTheme = Number(StringInStr($sCurrentTheme, 'Basic.theme', 2) = 0 And StringInStr($sCurrentTheme, 'Ease of Access Themes', 2) > 0)

        Local $aStyle = GUIGetStyle($__aGUIDisable[$__hGUIDisableHWndPrevious])
        If UBound($aStyle) Then
            If BitAND($aStyle[0], $WS_SIZEBOX) Then
                If RegRead('HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\', 'CurrentVersion') >= 6.0 Then ; Windows Vista+.
                    If $iIsClassicTheme Then
                        $iLeft -= 1
                        $iTop -= 1
                    Else
                        $iLeft -= 5
                        $iTop -= 5
                    EndIf
                Else
                    $iLeft -= 1
                    $iTop -= 1
                EndIf
            EndIf
        EndIf

        Local $aWinGetPos = WinGetClientSize($__aGUIDisable[$__hGUIDisableHWndPrevious])
        $__aGUIDisable[$__hGUIDisableHWnd] = GUICreate('', $aWinGetPos[0], $aWinGetPos[1], $iLeft, $iTop, $WS_POPUP, $WS_EX_MDICHILD, $__aGUIDisable[$__hGUIDisableHWndPrevious])
        GUISetBkColor($bColor, $__aGUIDisable[$__hGUIDisableHWnd])
        WinSetTrans($__aGUIDisable[$__hGUIDisableHWnd], '', 0)
        GUIRegisterMsg($WM_SIZE, '__GUIDisable_WM_SIZE')
    
            GUISetState(@SW_SHOW, $__aGUIDisable[$__hGUIDisableHWnd])
        
        GUISetState(@SW_DISABLE, $__aGUIDisable[$__hGUIDisableHWnd])
        GUISwitch($__aGUIDisable[$__hGUIDisableHWndPrevious])
    EndIf
    Return $__aGUIDisable[$__hGUIDisableHWnd]
EndFunc   ;==>_GUIDisable

Func __GUIDisable_WM_SIZE($hWnd, $iMsg, $wParam, $lParam)
    #forceref $hWnd, $iMsg, $wParam
    Local $iHeight = _WinAPI_HiWord($lParam)
    Local $iWidth = _WinAPI_LoWord($lParam)
    If $hWnd = $__aGUIDisable[$__hGUIDisableHWndPrevious] Then
        Local $iWinGetPos = WinGetPos($__aGUIDisable[$__hGUIDisableHWnd])
        If @error = 0 Then
            WinMove($__aGUIDisable[$__hGUIDisableHWnd], '', $iWinGetPos[0], $iWinGetPos[1], $iWidth, $iHeight)
        EndIf
    EndIf
    Return $GUI_RUNDEFMSG
EndFunc   ;==>__GUIDisable_WM_SIZE  
  
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...