I'm still new to AppGameKit and coding too, so I'm not sure how useful my advice would be, but I'll give it a go!
It sounds like you're trying to move on with the next part of your app, right? In this case, I would use game_states to let the program know what state the game should be in.
you could declare a variable (game_state for instance) and set conditions for when it is a certain number.
In this case, if that screen you had is the opening screen, you would do something like
//Screen setup
SetVirtualResolution(1024, 768)
SetOrientationAllowed(1, 0, 1, 1)
global game_state = 0
//Sprites
//Bakgrunn
LoadImage(1, "bakgrunn2.png")
CreateSprite(1, 1)
SetSpriteSize(1, -1, -1)
SetSpriteDepth(1, 101)
//LOGO
LoadImage(2, "LOGO.png")
createsprite(2, 2)
SetSpritePosition(2, 35, 48)
SetSpriteDepth(2, 100)
SetSpriteSize(2, 20, 5)
//password
Loadimage(3, "password.png")
Createsprite(3, 3)
SetSpritePositionByOffset(3, 468, 539)
SetSpriteScaleByOffset(3, 0.70, 0.70)
//Username
LoadImage(4, "username.png")
CreateSprite(4, 4)
SetSpritePositionByOffset(4, 468, 489)
SetSpriteScaleByOffset(4, 0.70, 0.70)
//Mainscreen
LoadImage(5, "mainscreen.png")
createsprite(5, 5)
SetSpriteSize(5, 1024, 768)
SetSpritePosition(5, 1, 1)
SetSpriteVisible(5, 0)
//Textbox
CreateEditBox(1)
SetEditBoxPosition(1, 400, 500)
SetEditBoxBackgroundColor(1, 255, 255, 255, 1)
CreateEditBox(2)
SetEditBoxPosition(2, 400, 560)
SetEditBoxBackgroundColor(2, 255, 255, 255, 1)
do
select game_state
case 0:
(if GetPointerPressed() = 1
DeleteSprite(1)
DeleteSprite(2)
DeleteSprite(3)
DeleteSprite(4)
DeleteEditBox(1)
DeleteEditBox(2)
SetSpriteVisible(5, 1)
game_state = 1
endif)
sync()
endcase
case 1:
//whatever you plan to do next.
endcase
endselect
loop
I wasn't 100% sure what you would do for each of those tabs, but that's how I would do it -- except I would put that if condition inside a function and only hide the sprites instead of deleting them.
I hope that can help you a little bit!
Thanks!