CaretPos in different application


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 5 of 5

Thread: CaretPos in different application

  1. #1
    Brian Guest

    CaretPos in different application


    Hi,

    From a VB add-in, can I determine the caret position in the VBIDE?
    GetCaretPos returns the caret position in the add-in only.


    Thanks,

    Brian


  2. #2
    Mattias Sjögren Guest

    Re: CaretPos in different application

    Brian,

    >From a VB add-in, can I determine the caret position in the VBIDE?
    >GetCaretPos returns the caret position in the add-in only.


    You could try the GetGUIThreadInfo API.


    Matt

    ============================================
    Mattias Sjögren - mattiass @ hem.passagen.se
    VB+ - http://hem.spray.se/mattias.sjogren/
    CodeHound - Free VB Search Engine
    http://www.codehound.com

  3. #3
    Mattias Sjögren Guest

    Re: CaretPos in different application

    Brian,

    >From a VB add-in, can I determine the caret position in the VBIDE?
    >GetCaretPos returns the caret position in the add-in only.


    You could try the GetGUIThreadInfo API.


    Matt

    ============================================
    Mattias Sjögren - mattiass @ hem.passagen.se
    VB+ - http://hem.spray.se/mattias.sjogren/
    CodeHound - Free VB Search Engine
    http://www.codehound.com

  4. #4
    Brian Leung Guest

    Re: CaretPos in different application


    Thanks Matthias,

    that gave me the caret position of the appropriate window. Unfortunately
    it was with respect to the client window rather than the screen
    (which is what I wanted). I tried the ClientToScreen API, but
    it didn't seem to give me the right answers wrt the VB IDE
    i.e., it treated the toolBox, immediate window etc as all part
    of the same window, rather than just the activeCodePane which is
    what I wanted.


    cheers,

    Brian




    mattiass.dont.want.spam@hem.passagen.se (Mattias Sjögren) wrote:
    >Brian,
    >
    >>From a VB add-in, can I determine the caret position in the VBIDE?
    >>GetCaretPos returns the caret position in the add-in only.

    >
    >You could try the GetGUIThreadInfo API.
    >
    >
    >Matt
    >
    >============================================
    >Mattias Sjögren - mattiass @ hem.passagen.se
    > VB+ - http://hem.spray.se/mattias.sjogren/
    > CodeHound - Free VB Search Engine
    > http://www.codehound.com



  5. #5
    Brian Leung Guest

    Re: CaretPos in different application


    Thanks Matthias,

    that gave me the caret position of the appropriate window. Unfortunately
    it was with respect to the client window rather than the screen
    (which is what I wanted). I tried the ClientToScreen API, but
    it didn't seem to give me the right answers wrt the VB IDE
    i.e., it treated the toolBox, immediate window etc as all part
    of the same window, rather than just the activeCodePane which is
    what I wanted.


    cheers,

    Brian




    mattiass.dont.want.spam@hem.passagen.se (Mattias Sjögren) wrote:
    >Brian,
    >
    >>From a VB add-in, can I determine the caret position in the VBIDE?
    >>GetCaretPos returns the caret position in the add-in only.

    >
    >You could try the GetGUIThreadInfo API.
    >
    >
    >Matt
    >
    >============================================
    >Mattias Sjögren - mattiass @ hem.passagen.se
    > VB+ - http://hem.spray.se/mattias.sjogren/
    > CodeHound - Free VB Search Engine
    > http://www.codehound.com



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center