Eckhard P.
Hi everybody,

if you use iGrid in Access the iGrid is going to redrawn/flicker if iGris is loose the focus or the iGrid got the focus.
It seems, MS Access clears the contents of iGrid control and then send an additional WM_PAINT message to redraw the contents of the control - which causes flickering.
In this case it is not a iGrid/10tec malfunction and we as Access programmer must reduce the flicker.

My approach to solving a problem is not to eliminate the redrawing but rather the observed flickering.

The method in the attached application is a solution for an application which has loaded ONE form at time.
In other conditions (multible forms as tabs, dialog forms ...) this method is not tested and maybe failed.

Maybe my workaround is helpfull for other programmer to find a solution under other conditions and it's would be nice to publish the way here.

By the way, iGrid ActiveX v6 eliminated the combobox cell flickering problem. Igor/10tec good job.

Note: Access 2010 / iGrid ActiveX v5 / Open form frm_Start (41kb) downloaded 239 time(s).
Thank you for this workaround.

I have tested this in a multiple form setting where forms are shown as tabs. I noticed that it's a good idea to also turn on redrawing when a form with this workaround is deactivated. If not the grid that had focus is not repainted correctly when switching forms.

In my app I have more than one grid in more than one form and I found having a public general function quite handy. I modified your function to take a grid as a parameter - Kudos!

Public Function iGrid_SetRedraw(g As iGrid, bEnableRedraw As Boolean)
    'Each Control (which can get the focus) must have this function on GotFous
    SendMessage g.hwnd, WM_SETREDRAW, bEnableRedraw, 0
End Function

iGrid_SetRedraw Grid0.Object, false
I am not experiencing flicker, or at least that's not my key issue. i'm using DynamicCellFormatting and have 3 related iGrid controls that are color-coded to process file ingestion feeds by FeedType and FeedID so client file groups can be distinguished more easily in a job service control app.

When the FeedType iGrid object loses control it get's repainted to the default -1 no color (this is not a totally accurate description, sometimes the colors persist, sometimes they do not).

When I use the iGrid_SetRedraw myiGrid.object, false in the Access onLostFocus event, the control actually dissappears.

Here is a before color scheme and then a scrnshot of the effect I'm trying to describe: (couldn't upload scrnshots)

Click to View Image136 View(s)


Click to View Image131 View(s)

One comment: we have optimized the drawing code in iGrid 6.5, and our customers say that now the flickering is less annoying - especially in remote desktop environments.