DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: run-time error 438

  1. #1
    Tony A Guest

    run-time error 438


    Hi
    I can figure out what this means, that is which object is being reffered
    to. Therefore I can't help myself.
    I know its not necessary to use the BitBlt however that is the point of this
    exercise. Can someone please take a look at this and tell me the error of
    my ways...Thanks

    Thanks in advance,
    Tony

    A brief explanation of the program,
    I have picture boxes (in an array) which recieve another picture by dragging
    and dropping. The picture is a weather icon inside a picture box (I don't
    think that matters). Any way thats about the gist of it....

    Run-time error 438
    Object doesn't support this property or method.

    Private Sub picDay_DragDrop(Index As Integer, Source As Control, X As Single,
    Y As Single)

    Dim xplot As Integer
    Dim yplot As Integer

    'now BitBlt the weather image to the plot form
    xplot = 10
    yplot = 10

    '*...The Problem Line Lies Below...*
    myrtn = BitBlt(picDay(Index).hDC, xplot, yplot, Picture.Width, Picture.Height,
    Picture.hDC, 0, 0, vbSrcCopy)

    frmCalendar.Refresh

    End Sub

  2. #2
    mrfelis Guest

    Re: run-time error 438

    > Private Sub picDay_DragDrop(Index As Integer, Source As Control, X As
    Single,
    > Y As Single)
    >

    <snip>

    > myrtn = BitBlt(picDay(Index).hDC, xplot, yplot, Picture.Width,

    Picture.Height,
    > Picture.hDC, 0, 0, vbSrcCopy)

    You should be using Source instead of Picture. Source is the control being
    dragged. You will also want to verify that Source is a PictureBox:

    if TypeOf Soirce is picturebox then
    'bitblast
    end if

    --
    ~~~
    C'Ya,
    mrfelis
    mrfelis@yahoo.NOSPAM.com
    just remove the spam
    Tony A <tony_abruzzo@hotmail.com> wrote in message
    news:39f72528$1@news.devx.com...
    >
    > Hi
    > I can figure out what this means, that is which object is being reffered
    > to. Therefore I can't help myself.
    > I know its not necessary to use the BitBlt however that is the point of

    this
    > exercise. Can someone please take a look at this and tell me the error of
    > my ways...Thanks
    >
    > Thanks in advance,
    > Tony
    >
    > A brief explanation of the program,
    > I have picture boxes (in an array) which recieve another picture by

    dragging
    > and dropping. The picture is a weather icon inside a picture box (I don't
    > think that matters). Any way thats about the gist of it....
    >
    > Run-time error 438
    > Object doesn't support this property or method.
    >
    > Private Sub picDay_DragDrop(Index As Integer, Source As Control, X As

    Single,
    > Y As Single)
    >
    > Dim xplot As Integer
    > Dim yplot As Integer
    >
    > 'now BitBlt the weather image to the plot form
    > xplot = 10
    > yplot = 10
    >
    > '*...The Problem Line Lies Below...*
    > myrtn = BitBlt(picDay(Index).hDC, xplot, yplot, Picture.Width,

    Picture.Height,
    > Picture.hDC, 0, 0, vbSrcCopy)
    >
    > frmCalendar.Refresh
    >
    > End Sub




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


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center