getWindowDC erro

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • s-galit

    #1

    getWindowDC erro

    hi,
    im using the getWindowDC but getting the error- " Value of type
    'System.IntPtr' cannot be converted to integer "
    can someone tell me whats wrong??

    Declare Function GetWindowDC Lib "user32" (ByVal hwnd As Integer) As IntPtr

    Dim me_hdc As IntPtr = GetWindowDC(Me. Handle)

    ////the error is on "Me.Handle"

    hope someone help me...
    thanks
  • Mick Doherty

    #2
    Re: getWindowDC erro

    Declare Function GetWindowDC Lib "user32" (ByVal hwnd As IntPtr) As IntPtr

    or

    Dim me_hdc As IntPtr = GetWindowDC(Me. Handle.ToInt32)

    --
    Mick Doherty
    Dotnetrix offers Nothing. Standard and Premium versions available.



    "s-galit" <sgalit@discuss ions.microsoft. com> wrote in message
    news:CBFAB06B-ABF6-4881-974F-A7ED5C4EF8ED@mi crosoft.com...[color=blue]
    > hi,
    > im using the getWindowDC but getting the error- " Value of type
    > 'System.IntPtr' cannot be converted to integer "
    > can someone tell me whats wrong??
    >
    > Declare Function GetWindowDC Lib "user32" (ByVal hwnd As Integer) As
    > IntPtr
    >
    > Dim me_hdc As IntPtr = GetWindowDC(Me. Handle)
    >
    > ////the error is on "Me.Handle"
    >
    > hope someone help me...
    > thanks[/color]


    ---
    Outgoing mail is certified Virus Free.
    Checked by AVG anti-virus system (http://www.grisoft.com).
    Version: 6.0.742 / Virus Database: 495 - Release Date: 19/08/2004


    Comment

    • Mick Doherty

      #3
      Re: getWindowDC erro

      Declare Function GetWindowDC Lib "user32" (ByVal hwnd As IntPtr) As IntPtr

      or

      Dim me_hdc As IntPtr = GetWindowDC(Me. Handle.ToInt32)

      --
      Mick Doherty
      Dotnetrix offers Nothing. Standard and Premium versions available.



      "s-galit" <sgalit@discuss ions.microsoft. com> wrote in message
      news:CBFAB06B-ABF6-4881-974F-A7ED5C4EF8ED@mi crosoft.com...[color=blue]
      > hi,
      > im using the getWindowDC but getting the error- " Value of type
      > 'System.IntPtr' cannot be converted to integer "
      > can someone tell me whats wrong??
      >
      > Declare Function GetWindowDC Lib "user32" (ByVal hwnd As Integer) As
      > IntPtr
      >
      > Dim me_hdc As IntPtr = GetWindowDC(Me. Handle)
      >
      > ////the error is on "Me.Handle"
      >
      > hope someone help me...
      > thanks[/color]


      ---
      Outgoing mail is certified Virus Free.
      Checked by AVG anti-virus system (http://www.grisoft.com).
      Version: 6.0.742 / Virus Database: 495 - Release Date: 19/08/2004


      Comment

      • s-galit

        #4
        Re: getWindowDC erro

        THANK YOU!!!!!!!
        you have been very very helpul :)

        Comment

        • s-galit

          #5
          Re: getWindowDC erro

          THANK YOU!!!!!!!
          you have been very very helpul :)

          Comment

          Working...