more graphics woes lazarus / 39-Graphics ---------------------------------------------------------------------- liewald · 2019-01-30 09:53 Lazarus 1.8.4 r57972 FPC 3.0.4 x86_64-win64-win32/win64 Simple one this time I hope For some reason drawing a TBGRABitmap to a form canvas is failing with no error and no image begin displayed on the canvas simple enough code procedure TImageform.FormPaint(Sender: TObject); begin    imageform.Canvas.Draw(0,0,image.Bitmap); end; also tried image.draw(imageform.canvas,0,0) Thanks in advance Dave ---------------------------------------------------------------------- circular · 2019-01-30 19:10 Surprising. Have you checked that the image contains something for example by doing image.SaveToFile ? Regards ---------------------------------------------------------------------- liewald · 2019-01-30 19:35 Yup and I can assign it to a timage ---------------------------------------------------------------------- lucamar · 2019-01-30 20:12 See this: BGRABitmap tutorial (2) - Draw the bitmap For more info: BGRABitmap Tutorial, a 16 wiki-pages tutorial on using TBGRABitmap. ETA BTW, when using properties of a form inside its class you shouldn't qualify them with the name of the instance i.e. this should be enough: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TImageform.FormPaint(Sender: TObject);begin   Canvas.Draw(0, 0, image.Bitmap);{or at most, Self.Canvas.Draw(...)}{ Idem for:  image.draw(Canvas, 0, 0);}end; ---------------------------------------------------------------------- liewald · 2019-01-30 21:34 Yup that was the original code. didn't work either been at this for 2 days only thing a bit different is that the menu making the calls is on the main form and the canvas is on a secondary form but the code is on the canvas form. Dave ---------------------------------------------------------------------- liewald · 2019-01-30 21:41 This is the setup I want. here I'm using a timage rather than the canvas and it works ok but for a number of reasons I would rather use a tcanvas! ---------------------------------------------------------------------- circular · 2019-01-31 18:10 Are you calling FormPaint ? This may not always work. Rather call Invalidate. ---------------------------------------------------------------------- liewald · 2019-01-31 19:43 will give it a try Dave ---------------------------------------------------------------------- liewald · 2019-02-11 11:03 got it thanks all