Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Want link for Visual Basic 6 Discussion Group

Discussion in 'Information Technology' started by Pradeep, Jul 28, 2006.

  1. Pradeep

    Pradeep
    Expand Collapse
    Guest

    Hello,

    I am trying to acheive the following in Visual Basic 6.0. Can someone point
    me in the right direction.

    ====================================================
    I am using the following code to paint a normal form and it works.

    PaintDesktop Me.hdc

    In the standard module i have the declaration for PaintDesktop

    Public Declare Function PaintDesktop Lib "user32" (ByVal hdc As Long) As
    Long

    Now I am not able to get the Me.hdc for the MDI Form. So I used the
    following additional API calls.

    Public Declare Function GetDC Lib "user32" (ByVal hwnd As Long) As Long
    Public Declare Function GetDesktopWindow Lib "user32" () As Long

    Now in the MDI Form I use the code:

    Dim lngLong As Long, hdc As Long

    hdc = GetDC(GetDesktopWindow())

    lngLong = PaintDesktop(hdc)

    the result in lngLong is 1 but the MDIForm is not painted with the
    desktop.
    =====================================================

    Thanks,

    Pradeep
     
  2. Loading...

    Similar Threads Forum Date
    Eh Janam Tumhare Lekhe... Official Movie Link... Announcements Jun 3, 2015
    Sikhism Complete Shalok Mehala 9 (Link) Videos Apr 22, 2014
    UK British PM orders probe into Thatcher link to Operation Bluestar (UPDATED) Breaking News Jan 14, 2014
    India Gwalior: A Unique Link to India's History Breaking News Nov 16, 2013
    Researchers establish link between racism and stupidity General Sep 28, 2013

  3. Ofer Cohen

    Ofer Cohen
    Expand Collapse
    Guest

    Try this link to VB discussion group

    http://www.microsoft.com/communitie...spx?guid=c895c4c2-6911-41a0-bb8e-083fcb0b1c05

    --
    Good Luck
    BS"D


    "Pradeep" wrote:

    > Hello,
    >
    > I am trying to acheive the following in Visual Basic 6.0. Can someone point
    > me in the right direction.
    >
    > ====================================================
    > I am using the following code to paint a normal form and it works.
    >
    > PaintDesktop Me.hdc
    >
    > In the standard module i have the declaration for PaintDesktop
    >
    > Public Declare Function PaintDesktop Lib "user32" (ByVal hdc As Long) As
    > Long
    >
    > Now I am not able to get the Me.hdc for the MDI Form. So I used the
    > following additional API calls.
    >
    > Public Declare Function GetDC Lib "user32" (ByVal hwnd As Long) As Long
    > Public Declare Function GetDesktopWindow Lib "user32" () As Long
    >
    > Now in the MDI Form I use the code:
    >
    > Dim lngLong As Long, hdc As Long
    >
    > hdc = GetDC(GetDesktopWindow())
    >
    > lngLong = PaintDesktop(hdc)
    >
    > the result in lngLong is 1 but the MDIForm is not painted with the
    > desktop.
    > =====================================================
    >
    > Thanks,
    >
    > Pradeep
    >
     
  4. Pradeep

    Pradeep
    Expand Collapse
    Guest

    That was the correct link.
    Thanks a lot ofer. That was what I was looking for.

    "Pradeep" wrote:

    > Hello,
    >
    > I am trying to acheive the following in Visual Basic 6.0. Can someone point
    > me in the right direction.
    >
    > ====================================================
    > I am using the following code to paint a normal form and it works.
    >
    > PaintDesktop Me.hdc
    >
    > In the standard module i have the declaration for PaintDesktop
    >
    > Public Declare Function PaintDesktop Lib "user32" (ByVal hdc As Long) As
    > Long
    >
    > Now I am not able to get the Me.hdc for the MDI Form. So I used the
    > following additional API calls.
    >
    > Public Declare Function GetDC Lib "user32" (ByVal hwnd As Long) As Long
    > Public Declare Function GetDesktopWindow Lib "user32" () As Long
    >
    > Now in the MDI Form I use the code:
    >
    > Dim lngLong As Long, hdc As Long
    >
    > hdc = GetDC(GetDesktopWindow())
    >
    > lngLong = PaintDesktop(hdc)
    >
    > the result in lngLong is 1 but the MDIForm is not painted with the
    > desktop.
    > =====================================================
    >
    > Thanks,
    >
    > Pradeep
    >
     

Share This Page