CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 1999
    Posts
    4

    windows message handling

    Hello,

    Will some one help me out in acting on windows messages in VB6? For example if MS word is open and user is editing the file, I want VB to check which file is open and save the file in occurence of "ActiveWindow.Close", and "Application.Quit " . This is to avoid loosing any text in case of sudden windows shutdown. Please do suggest some codes ( I am not worrried about autosave option in MS word.)

    Thanks in advance
    Milind


  2. #2
    Join Date
    Sep 2001
    Location
    Québec, Canada
    Posts
    1,923

    Re: windows message handling

    You can use 2 fonctions


    private Sub Form_Terminate()
    End Sub

    private Sub Form_Unload()
    End Sub




    I do not really know the differences between the 2, but unload is call before terminate

    CodeGuru VB FAQ Visual Basic Frequently Asked Questions
    VB Code color Tool to color your VB code on CodeGuru
    Before you post Importants informations to know before posting

  3. #3
    Join Date
    Jun 1999
    Posts
    4

    Re: windows message handling

    Thanks Jeff, probably I need some more detail answer. The functions you explained will work fine only on VB forms , I want to control MSword and other office application before OS shutdown.

    Milind


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

Featured