Menu in VB6 displayed twice when an email is composed using MAPI RRS feed

  • Question

  • Hi,

    Following is the code we use to compose and send an email using MAPI in VB6 SP5, with Windows7 RC having the display set to 150%.
    Once the loMapiSession.SignOn is called, the menu in VB is shown twice one below the other.
    Also the characters displayed in the title bars of the available windows within VB gets larger.

    - The composed email is sent and received in Windows7 even with this display problem. MS Outlook 2007 is the default email application.
    - In Windows XP there is no such display problem when the email is sent.

    Dim loMapiSession As MSMAPI.MAPISession
    Dim loMapiMessage As MSMAPI.MAPIMessages

    Set loMapiSession = New MSMAPI.MAPISession
    With loMapiSession
    End With

    Set loMapiMessage = New MSMAPI.MAPIMessages
    With loMapiMessage
        .SessionID = loMapiSession.SessionID
        .MsgIndex = -1
        .RecipIndex = .RecipCount
        .RecipDisplayName = "email address"
        .RecipType = 1

        .AddressResolveUI = False
        .MsgSubject = "Subject"
        .MsgNoteText = "Message Body"
        .Send False
    End With


    Following are the steps required to simulate this issue,
    - Set the display to 150% in Windows7
    - Open VB6 development and run the above code
    This can be done by placing the code in a command button of a form.
    Also ensure to add the MSMAPI32.ocx(eg. C:\Windows\System32\) as a reference(Project menu references) to the VB project.
    - Once the loMapiSession.SignOn is called(even after the emails sent) and try to move or resize the main VB window, the main menu within VB is shown twice. Also characters in the title bars of other windows opened in VB gets larger(eg. form which was used to run the above code)

    Could someone please advice what may be causing the problem or is there a work around for this?

    Wednesday, October 7, 2009 4:17 AM