Why is my drawer.New2() not working?

Discussion in 'Questions (Windows Mobile)' started by willisgt, Mar 24, 2008.

  1. willisgt

    willisgt Active Member Licensed User

    Could someone please tell me why this is producing an error?

    bitmapBKG is a bitmap, and background.bmp is a 24-bit BMP.

    Code:
    ' ... background image

       bitmapBKG.New1( AppPath & 
    "\background.bmp" )

       AddObject( 
    "drawerBKG""Drawer" )
       drawerBKG.New2( bitmapBKG.Value, B4PObject(
    5) )   '<-- error happens on this line
       
       pen.Color = cCyan   
    'Rgb( 0, 128, 0 )
    The error is: 'Object reference not set to an instance of an object'.

    I'm using ImageLib.dll v. 1.0.2860.34398.


    Gary

    :sign0085:
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    B4PObject(5) is actually a reference to the main form.
    You should show the form before this line.
     
  3. willisgt

    willisgt Active Member Licensed User

    *sigh* It's always the little details...

    :sign0161:
     
  4. Hai-DJ

    Hai-DJ New Member Licensed User

    drawer.New2

    Try this:

    ' ... background image

    ' make a new image with NEW2

    bitmapBKG.New2(width,height)

    AddObject( "drawerBKG", "Drawer" )
    drawerBKG.New2( bitmapBKG.Value, B4PObject(5) )

    pen.Color = cCyan 'Rgb( 0, 128, 0 )
     
Loading...