Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. New Message window loses focus when launched via Simple MAPI

New Message window loses focus when launched via Simple MAPI

Scheduled Pinned Locked Moved C#
help
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    cobra2005
    wrote on last edited by
    #1

    I have an app that's trying to send email via Simple MAPI. When the default client is Oulook, the New Message window that comes up appears to lose focus. I am able to tab thru the varous controls on the message window, but I cannot set the focus to anything inside the window (New Message) with the mouse. Clicking on a different app and then coming back to the New Message window "fixes" the problem. I'm passing 0 for the parent window handle. I've tried passing in the handle of the main application window, but it did not make a difference. Any help would be greatly appreciated. Here is what my two MAPI calls look like: error = MAPILogon(IntPtr.Zero, null, null, MapiNewSession | MapiLogonUi, 0, ref session); error = MAPISendMail(session, IntPtr.Zero, mapiMessage, MapiDialog | MapiLogonUi, 0);

    cobra2005

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups