DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 5 of 5
  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



Bookmarks

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


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links