Results 1 to 5 of 5

Thread: (Resolved) Alt F4 doesn't close the app

  1. #1

    Thread Starter
    Hyperactive Member Couin's Avatar
    Join Date
    Dec 2020
    Posts
    274

    Resolved (Resolved) Alt F4 doesn't close the app

    Hi friends !

    Is there something to activate/add to make Alt F4 closing the application ?

    Thanks !
    Couin
    Last edited by Couin; Jun 3rd, 2021 at 04:33 PM. Reason: Resolved
    1 Hour vinyl mix live on Eurodance90 each sunday 10:00 PM (French Timezone) - New non-official Jingle Palette update Jingle Palette Reloaded

  2. #2
    PowerPoster
    Join Date
    Nov 2017
    Posts
    3,138

    Re: Alt F4 doesn't nose the app

    One potential reason why this might be happening is if you have the main Form's ControlBox property set to False. If so, set it to True and you should be able to close with Alt+F4.

  3. #3

    Thread Starter
    Hyperactive Member Couin's Avatar
    Join Date
    Dec 2020
    Posts
    274

    Re: Alt F4 doesn't close the app

    Hi dear,

    Thanks for your fast answer
    ControlBox is on False (to prevent "Enter" on some areas, but I tried with changing to True, but Alt F4 still not doing anything.

    Edit :
    Ooooh , just found a alternative solution based on :

    Code:
    Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
       If KeyCode = 115 And Shift = 4 Then
          End
       End If
    End Sub
    Is it can help other peoples
    Thanks !
    Last edited by Couin; Jun 3rd, 2021 at 04:33 PM.
    1 Hour vinyl mix live on Eurodance90 each sunday 10:00 PM (French Timezone) - New non-official Jingle Palette update Jingle Palette Reloaded

  4. #4
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,205

    Re: (Resolved) Alt F4 doesn't close the app

    End is not advisable.
    You should be using Unload Me to close your form. The program will close if that is the last form. If you have multiple forms or are using classes or other such resources you should create a routine that properly cleans up and unloads whatever is needed to cleanly close the program.

    Never rely on End can open a can of worms if you are not careful and I can't think of any case where it needs to be or should be used.

  5. #5

    Thread Starter
    Hyperactive Member Couin's Avatar
    Join Date
    Dec 2020
    Posts
    274

    Re: (Resolved) Alt F4 doesn't close the app

    Hi dear,

    Thanks for info
    The project has only one Form but as it's good to know, I replaced End for Unload Me

    See ya !
    1 Hour vinyl mix live on Eurodance90 each sunday 10:00 PM (French Timezone) - New non-official Jingle Palette update Jingle Palette Reloaded

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width