Jump to content

Trying to Splash screen but error all the time


Recommended Posts

Hi, this is my first post and im try to make a this function 1024 x 768 for Splash screen off... but i always have the "Error in function.2", i dont undertand where is the problem..... could u guys pls help this noob(me).... tks a lot.

Func _SSoff()
    local $X, $Y, $Z, $A

    opt("WinTitleMatchMode", 1)
    WinSetTitle( "Title v1.0", "", "title- " & $title1)
    If Not WinExists( "title- " & $title1) Then _ShowError( "must be on.")

    SplashOff()

    WinActivate("title- " & $title1, "")

    $dll = DllOpen("system.dll")

;~  If @DesktopHeight > 768 And @DesktopWidth > 1024 Then WinMove( "title- " & $title1, "", -4, -11, 1032, 755)

    if @DesktopDepth < 24 then
        _gethelp()
        _ShowError( "Your color depth should be 24bit or 32bit" )
    endif

    If @DesktopHeight > 768 And @DesktopWidth > 1024 Then

        WinMove( "title- " & $title1, "", 0, 0, 1024, 755)

        $Y = 0
        while PixelGetColor( 500, $Y ) <> 0
            $Y = $Y  + 1
        WEnd

;~  721

        $X = 0
        while PixelGetColor( $X, $Y ) <> 0
            $X = $X  + 1
        WEnd

        $Z = $Y + $X

        $Y = $Y - 19

        WinMove( "title- " & $title1, "", -$X, -$Y, 1024 + 2*$X, 721+$Z )

    Else
                                _ShowError( "Error in function.2")

        WinSetState( "title- " & $title1, "", @SW_MAXIMIZE )

        $a = WinGetClientSize( "title-" $title1)

        if $a[0] <> 1024 or $a[1] <> 721 then
            _gethelp()
            _ShowError( "Error in function.1")
        endif

    EndIf


EndFunc  ;==>_SSoff
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...