Jump to content
Sign in to follow this  
Valeriy

SplashImageOn WITHOUT Border

Recommended Posts

Valeriy

I need to call SplashImageOn without a frame (border). How can this be done?

Share this post


Link to post
Share on other sites
BugFix

Like Help says, you can use with Opt=1 for thin border, but not without.

Or you create your own SplashImage.

Edit: Here an example for an own SplashImage

#include <WindowsConstants.au3>
#include <WinAPI.au3>

; example
$picPath = @Systemdir & "\oobe\images\mslogo.jpg" ; 255x40
$gui = GUICreate("", 255, 40, -1, -1, $WS_POPUP, $WS_EX_TOPMOST)
$ctrl = GUICtrlCreatePic($picPath, 0, 0, 255, 40)
GUISetState(@SW_SHOW)
$pos = WinGetPos($gui)
_GuiHole($gui, 0, 0, 255, 40)

Sleep(3000)
GUIDelete($gui)



Func _GuiHole($h_win, $i_x, $i_y, $i_sizew, $i_sizeh)
    Local $combined_rgn
    $combined_rgn = _WinAPI_CreateRectRgn(0, 0, 0, 0)
    _AddCtrlRegion($combined_rgn, $ctrl)
    _WinAPI_SetWindowRgn($h_win, $combined_rgn)
EndFunc   ;==>_GuiHole

Func _AddCtrlRegion($full_rgn, $ctrl_id)
    Local $ctrl_pos, $ctrl_rgn
    $ctrl_pos = ControlGetPos($gui, "", $ctrl_id)
    $ctrl_rgn = _WinAPI_CreateRectRgn($ctrl_pos[0], $ctrl_pos[1], $ctrl_pos[0] + $ctrl_pos[2], $ctrl_pos[1] + $ctrl_pos[3])
    _WinAPI_CombineRgn($full_rgn, $full_rgn, $ctrl_rgn, $RGN_OR)
    _WinAPI_DeleteObject($ctrl_rgn)
EndFunc   ;==>_AddCtrlRegion
Edited by BugFix

Best Regards BugFix  

Share this post


Link to post
Share on other sites
Valeriy

I run this script and i have errors - C:\Documents and Settings\Валерий\Рабочий стол\sdgsa.au3(28,64) : WARNING: $RGN_OR: possibly used before declaration.

_WinAPI_CombineRgn($full_rgn, $full_rgn, $ctrl_rgn, $RGN_OR)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Documents and Settings\Валерий\Рабочий стол\sdgsa.au3(28,64) : ERROR: $RGN_OR: undeclared global variable.

_WinAPI_CombineRgn($full_rgn, $full_rgn, $ctrl_rgn, $RGN_OR)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Documents and Settings\Валерий\Рабочий стол\sdgsa.au3(19,53) : ERROR: _WinAPI_CreateRectRgn(): undefined function.

$combined_rgn = _WinAPI_CreateRectRgn(0, 0, 0, 0)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Documents and Settings\Валерий\Рабочий стол\sdgsa.au3(21,47) : ERROR: _WinAPI_SetWindowRgn(): undefined function.

_WinAPI_SetWindowRgn($h_win, $combined_rgn)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Documents and Settings\Валерий\Рабочий стол\sdgsa.au3(28,64) : ERROR: _WinAPI_CombineRgn(): undefined function.

_WinAPI_CombineRgn($full_rgn, $full_rgn, $ctrl_rgn, $RGN_OR)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Documents and Settings\Валерий\Рабочий стол\sdgsa.au3 - 4 error(s), 1 warning(s)

Share this post


Link to post
Share on other sites
BugFix

Have you included WinApi.au3 ?


Best Regards BugFix  

Share this post


Link to post
Share on other sites
Valeriy

I install latest beta of autoit. Problem solved)

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.