Leaving the application.
BlitzPlus Forums/BlitzPlus Beginners Area/Leaving the application.
| ||
| I have a simple window and the way out is by clicking the close button on the window and a cancel button, but it does not work properly because it touches give twice on the Close button to exit the window. Help. [bbcode] ; Ventana Inicial. Local Windows% = CreateWindow("Instalador de Pawn",ClientWidth(Desktop())/2-252,ClientHeight(Desktop())/2-159,510,350,0,1) Local Bton_Next% = CreateButton("Siguiente",430,273.5,55,25,Windows%,0) Local Bton_Close% = CreateButton("Cancelar",370,273.5,55,25,Windows%,0) Local Linea1% = CreatePanel (0,270,510,5,Windows%,1) Local Linea2% = CreatePanel (0,10,510,5,Windows%,1) Local Linea3% = CreatePanel (0,300,510,5,Windows%,1) Local Img_Panel% = CreatePanel (10,17,115,250,Windows%,0) Local Info% = CreateLabel ("Prueba",130,20,100,100,Windows%,3) Local Web% = CreateLabel ("www.iris3d.tk -Games Studios-",10,280,150,20,Windows%,0) SetPanelImage (Img_Panel%,"Box.bmp") Repeat If WaitEvent()=$401 If EventSource()=Bton_Close% Then Local Respuesta% = Proceed ("Esta cancelando la incialacion"+Chr(13) + "de Pawn. Seguro desea cancelarla?",False) Select Respuesta% Case 1 End Case 0 Case -1 End Select End If End If If WaitEvent() = $803 Respuesta% = Proceed ("Esta cancelando la incialacion"+Chr(13) + "de Pawn. Seguro desea cancelarla?",False) Select Respuesta% Case 1 End Case 0 Case -1 End Select End If Forever [/bbcode] |
| ||
| Forever mean it will never end and try this one change this
If WaitEvent() = $803
Respuesta% = Proceed ("Esta cancelando la incialacion"+Chr(13) + "de Pawn. Seguro desea cancelarla?",False)
Select Respuesta%
Case 1
End
Case 0
Case -1
End Select
End If
to that before main loop.....put State=0
If WaitEvent() = $803
Respuesta% = Proceed ("Esta cancelando la incialacion"+Chr(13) + "de Pawn. Seguro desea cancelarla?",False)
Select Respuesta%
Case 1
State=1
Case 0
Case -1
End Select
until State=True
hope that help :) Last edited 2012 |
| ||
If WaitEvent()=$401
If EventSource()=Bton_Close% Then
Local Respuesta% = Proceed ("Esta cancelando la incialacion"+Chr(13) + "de Pawn. Seguro desea cancelarla?",False)
Select Respuesta%
Case 1
End
Case 0
Case -1
End Select
End If
End If
If WaitEvent() = $803
Respuesta% = Proceed ("Esta cancelando la incialacion"+Chr(13) + "de Pawn. Seguro desea cancelarla?",False)
Select Respuesta%
Case 1
End
Case 0
Case -1
End Select
End If
No work.
Local State% = False
Repeat
If WaitEvent()=$401
If EventSource()=Bton_Close% Then
Local Respuesta% = Proceed ("Esta cancelando la incialacion"+Chr(13) + "de Pawn. Seguro desea cancelarla?",False)
Select Respuesta%
Case 1
End
Case 0
Case -1
End Select
End If
End If
If WaitEvent() = $803
Respuesta% = Proceed ("Esta cancelando la incialacion"+Chr(13) + "de Pawn. Seguro desea cancelarla?",False)
Select Respuesta%
Case 1
State=1
Case 0
Case -1
End Select
Until State=True
The problem is that if I close button in the window does not come out, and touch him again to exit the window. sample exe here: https://dl.dropbox.com/u/39767349/Setup.rar edit:
While WaitEvent() <> $803
If WaitEvent()=$401
If EventSource()=Bton_Close% Then
Local Respuesta% = Proceed ("Esta cancelando la incialacion"+Chr(13) + "de Pawn. Seguro desea cancelarla?",False)
Select Respuesta%
Case 1
Exit
Case 0
Case -1
End Select
End If
End If
Wend
double clic in button cancel... :( Last edited 2012 Last edited 2012 |
| ||
If you change If WaitEvent() = $803 to If EventID() = $803 It should work in your original code and maybe put End after Forever Last edited 2012 |
| ||
Sorry this is a nightmare, I regret not speak English, I have solved the problem.
; Buton Close Windows.
If WaitEvent()=$803
Respuesta% = Proceed ("Esta cancelando la instalación"+Chr(13) + "de Pawn. Seguro desea cancelarla?",False)
Select Respuesta%
Case 1
Exit
End Select
End If
; Button Cancel Instal.
If EventSource()=Bton_Cancel% Then
Respuesta% = Proceed ("Esta cancelando la instalación"+Chr(13) + "de Pawn. Seguro desea cancelarla?",False)
Select Respuesta%
Case 1
Exit
End Select
End If
Edit: BlitzPlus hate, I reported errors, just closes the application Grrrrrrrrrrrr Last edited 2000 Last edited 2012 |
| ||
Is it still not working ? Try this
; Ventana Inicial.
Local Windows% = CreateWindow("Instalador de Pawn",ClientWidth(Desktop())/2-252,ClientHeight(Desktop())/2-159,510,350,0,1)
Local Bton_Next% = CreateButton("Siguiente",430,273.5,55,25,Windows%,0)
Local Bton_Close% = CreateButton("Cancelar",370,273.5,55,25,Windows%,0)
Local Linea1% = CreatePanel (0,270,510,5,Windows%,1)
Local Linea2% = CreatePanel (0,10,510,5,Windows%,1)
Local Linea3% = CreatePanel (0,300,510,5,Windows%,1)
Local Img_Panel% = CreatePanel (10,17,115,250,Windows%,0)
Local Info% = CreateLabel ("Prueba",130,20,100,100,Windows%,3)
Local Web% = CreateLabel ("www.iris3d.tk -Games Studios-",10,280,150,20,Windows%,0)
SetPanelImage (Img_Panel%,"Box.bmp")
Repeat
If WaitEvent()=$401
If EventSource()=Bton_Close% Then
Local Respuesta% = Proceed ("Esta cancelando la incialacion"+Chr(13) + "de Pawn. Seguro desea cancelarla?",False)
Select Respuesta%
Case 1
End
Case 0
Case -1
End Select
End If
End If
;If WaitEvent() = $803
If EventID() = $803
Respuesta% = Proceed ("Esta cancelando la incialacion"+Chr(13) + "de Pawn. Seguro desea cancelarla?",False)
Select Respuesta%
Case 1
End
Case 0
Case -1
End Select
End If
Forever
|