You are not logged in.

klctal

Trainee

  • "klctal" is male
  • "klctal" started this thread

Posts: 70

Date of registration: Jul 13th 2009

Location: Shanghai

Hobbies: Developing software

  • Send private message

1

Wednesday, September 9th 2009, 9:13am

End problem

If I do this:

Jabaco Source

1
2
3
If Something = True Then 
   End
End If


Return: Expected "End If". It doesn't find the "End If" after the "End"
:D

A1880

Intermediate

  • "A1880" is male

Posts: 500

Date of registration: Jan 1st 2009

Location: Hanover, Germany

Occupation: Software Engineer

Hobbies: Hilbert Curves

  • Send private message

2

Wednesday, September 9th 2009, 9:41am

Hi,
you can "end" a Form like this:

Jabaco Source

1
2
3
4
Public Sub cmdEnd_Click()
   Unload Me
   system.exit 0          '  returns an error status which can be reacted upon in a calling script
End Sub


Another way:

Jabaco Source

1
2
3
4
Public Sub cmdEnd_Click()
   Unload Me
   Me.close
End Sub


Greetings!

A1880

darkfr3ak

Beginner

Posts: 1

Date of registration: Feb 14th 2010

  • Send private message

3

Sunday, February 14th 2010, 4:05pm

Another way:

Jabaco Source

1
2
3
4
Public Sub cmdEnd_Click()
   Unload Me
   Me.close
End Sub


This don't work for me... the form is unloaded, or hidden, and the Program continues running.
Is there any problem using the first code?

A1880

Intermediate

  • "A1880" is male

Posts: 500

Date of registration: Jan 1st 2009

Location: Hanover, Germany

Occupation: Software Engineer

Hobbies: Hilbert Curves

  • Send private message

4

Sunday, February 14th 2010, 10:40pm

Comment out the following line in Module1:

Jabaco Source

1
Form1.SetDefaultClose()


This topic has been discussed before ih the forum. Please try the search facility.

The "System.exit()" works but is regarded a bit rude by Java purists.
Your are basically shutting down the whole Java VM. This is something a normal thread should try to avoid.
However, in small applications I don't see any objections.

Greetings

A1880

Rate this thread
WoltLab Burning Board