Get caption of active window in C#

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • NitinSawant
    Contributor
    • Oct 2007
    • 271

    Get caption of active window in C#

    Hi, pls tell me how to get info about current active window using C#??
  • CyberSoftHari
    Recognized Expert Contributor
    • Sep 2007
    • 488

    #2
    [CODE=cpp]this.Text[/CODE]
    you should try a bit more.

    Comment

    • NitinSawant
      Contributor
      • Oct 2007
      • 271

      #3
      Originally posted by CyberSoftHari
      [CODE=cpp]this.Text[/CODE]
      you should try a bit more.
      no!! not in that way,
      consider scenario,
      I open 2-3 windows of intentet explorer,
      when i open my C# windows applicatuion i should be able to get caption of current active window of ie through my application.

      Thanx

      Comment

      • CyberSoftHari
        Recognized Expert Contributor
        • Sep 2007
        • 488

        #4
        I think this link will help you

        Comment

        • NitinSawant
          Contributor
          • Oct 2007
          • 271

          #5
          I think this link will help you
          _______________ _______________ ___
          no, please provide the appropriate code

          Comment

          • CyberSoftHari
            Recognized Expert Contributor
            • Sep 2007
            • 488

            #6
            The link I given is about
            how to get window caption(just like microsoft spy++).
            hope you are looking same.

            We can solve your problem, but unable to do homework.

            Comment

            • Plater
              Recognized Expert Expert
              • Apr 2007
              • 7872

              #7
              Originally posted by Nitin646
              no, please provide the appropriate code
              We are here to help with problems you may have, not do you work for you.
              That link gives you a good idea on how to get things done.
              I will tell you this, you will have to use win32_API to do this task and not native .NET functions. So you can look up how it would be done in c++ and use DLLImport to handle it.
              As this is a fairly common request, I happen to know there are plenty of examples of how to do this on the internet.

              Comment

              Working...