Welcome to SPN

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

Sign Up Now!
  1. Monthly (Recurring) Target: $300 :: Achieved: $95
      Become a Supporter    ::   Make a Contribution    Let's do it!

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
    >
     
Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     



Share This Page