views:

5

answers:

1

Hello guys,

how do i print msflexgrid with picture in some of its cells in vb6

A: 

I think you have to first select the grid cell, optionally set the cell picture alignment, then load the picture using either LoadPicture (if you are using a file path to a picture on disk) or preferably LoadResPicture (if you are using a picture in a resource file) e.g.

  With MSFlexGrid1
    .Row = 1
    .Col = 1
    .RowSel = 1
    .ColSel = 1
    .CellAlignment = flexAlignCenterCenter
    Set .CellPicture = LoadPicture("C:\My Pictures\Me.bmp")
    ' Alternatively:
    ' Set .CellPicture = LoadResPicture(MY_PROFILE_PIC_ID)
  End With
onedaywhen
Thanks for your reply, the problem here is that i am creating the picture dynamically from text typed by the user using. is there another way
Smith