Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21243

Runtime Error "481" - Invalid Picture

$
0
0
Hi,

I got this code from a site, but showing the subjected error when try to run, please help to resolve it

Actually I am trying to set the picture size exactly the size of Flexgrid column. Is there any other way ?

Code:

    With msh
        .Row = 0
        .Col = 0
       
                For colcount = 0 To .Cols - 1
                   
                    frmPic.Picture2.AutoRedraw = True
                    frmPic.Picture2.BorderStyle = 0
                    frmPic.Picture2.PaintPicture frmPic.Picture1.Picture, 0, 0, .CellWidth, .CellHeight
                    frmPic.Picture2.Width = .CellWidth
                    frmPic.Picture2.Height = .CellHeight

                    Set .CellPicture = Picture2.Image
                   
''                    Set .CellPicture = LoadResPicture("top1", 0)
                    .CellPictureAlignment = flexAlignLeftCenter
                    .ColAlignmentFixed = flexAlignCenterCenter
                    .CellForeColor = RGB(245, 245, 245) 'RGB(25, 50, 125)
                    .CellFontBold = True
                    If .Col = .Cols - 1 Then
                        Exit For
                    Else
                        .Col = .Col + 1
                    End If
                Next
                 
    If msh.Rows >= 2 Then
        .Row = 1
        .RowHeight(0) = 400
        .Col = 0
    Else
        .Row = 0
        .RowHeight(0) = 400
    End If
   
    End With


Viewing all articles
Browse latest Browse all 21243

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>