Board index » delphi » ::: Why is it _still_ flickering??? your HELP is appreciated

::: Why is it _still_ flickering??? your HELP is appreciated

I've read the FAQ about flickering and I may have missed this one BUT:

Here's the deal:

 1. Start a new project.
 2. Drop a scrollbox on the form
 3. drop an image inside the scrollbox and load and bitmap you like it
    does not matter.
 4. Run the program.
 5. Resize the form : No flicker, all is cool

Now:

 Change the align property of the scrollbox to alclient.
 Add the following code in the Form1Create handle:

  Image1.Controlstyle := Image1.Controlstyle + [csOpaque];
  Scrollbox1.ControlStyle := Scrollbox1.ControlStyle + [csOpaque];
  Form1.Controlstyle := Form1.Controlstyle + [csOpaque];

 Run the program again.
 Resize the form. It flickers like crazy.

 As you can see: no drawing is going on on my part, nothing.
 Changing the align from alnone to alclient causes this mess.
 Why? How do you remedy this? Am I missing a faq somewhere?

 Thanks,

Naji.

 

Re:::: Why is it _still_ flickering??? your HELP is appreciated


Hi Naji,

i'm using a TPaintBox (instead of TImage) and display an image in the
OnPaint-Event of the PaintBox (with BitBlt or StretchDraw... as you like)

cu

Boris Nienke

Naji Mouawad schrieb in Nachricht <36C3CF09.4292E...@home.com>...

Quote
>I've read the FAQ about flickering and I may have missed this one BUT:

>Here's the deal:

> 1. Start a new project.
> 2. Drop a scrollbox on the form
> 3. drop an image inside the scrollbox and load and bitmap you like it
>    does not matter.
> 4. Run the program.
> 5. Resize the form : No flicker, all is cool

>Now:

> Change the align property of the scrollbox to alclient.
> Add the following code in the Form1Create handle:

>  Image1.Controlstyle := Image1.Controlstyle + [csOpaque];
>  Scrollbox1.ControlStyle := Scrollbox1.ControlStyle + [csOpaque];
>  Form1.Controlstyle := Form1.Controlstyle + [csOpaque];

> Run the program again.
> Resize the form. It flickers like crazy.

> As you can see: no drawing is going on on my part, nothing.
> Changing the align from alnone to alclient causes this mess.
> Why? How do you remedy this? Am I missing a faq somewhere?

> Thanks,

>Naji.

Re:::: Why is it _still_ flickering??? your HELP is appreciated


I did exactly as you stated and had no flicker at all..... Did you really
describe this as you stated and do it yourself or is this part of a larger
program.  I ask because if it is the later than you might go looking for
an OnPaint event handler that is giving you problems..... just a thought.

W. Willigg

Quote
Naji Mouawad wrote:
> I've read the FAQ about flickering and I may have missed this one BUT:

> Here's the deal:

>  1. Start a new project.
>  2. Drop a scrollbox on the form
>  3. drop an image inside the scrollbox and load and bitmap you like it
>     does not matter.
>  4. Run the program.
>  5. Resize the form : No flicker, all is cool

> Now:

>  Change the align property of the scrollbox to alclient.
>  Add the following code in the Form1Create handle:

>   Image1.Controlstyle := Image1.Controlstyle + [csOpaque];
>   Scrollbox1.ControlStyle := Scrollbox1.ControlStyle + [csOpaque];
>   Form1.Controlstyle := Form1.Controlstyle + [csOpaque];

>  Run the program again.
>  Resize the form. It flickers like crazy.

>  As you can see: no drawing is going on on my part, nothing.
>  Changing the align from alnone to alclient causes this mess.
>  Why? How do you remedy this? Am I missing a faq somewhere?

>  Thanks,

> Naji.

--
Ecological Software Solutions
http://www.ecostats.com

Re:::: Why is it _still_ flickering??? your HELP is appreciated


Do you have 4.0 or 3.0? I've got 3.0 this may make a difference.

Naji.

Quote
Mailbox wrote:

> I did exactly as you stated and had no flicker at all..... Did you really
> describe this as you stated and do it yourself or is this part of a larger
> program.  I ask because if it is the later than you might go looking for
> an OnPaint event handler that is giving you problems..... just a thought.

> W. Willigg

> Naji Mouawad wrote:

> > I've read the FAQ about flickering and I may have missed this one BUT:

> > Here's the deal:

> >  1. Start a new project.
> >  2. Drop a scrollbox on the form
> >  3. drop an image inside the scrollbox and load and bitmap you like it
> >     does not matter.
> >  4. Run the program.
> >  5. Resize the form : No flicker, all is cool

> > Now:

> >  Change the align property of the scrollbox to alclient.
> >  Add the following code in the Form1Create handle:

> >   Image1.Controlstyle := Image1.Controlstyle + [csOpaque];
> >   Scrollbox1.ControlStyle := Scrollbox1.ControlStyle + [csOpaque];
> >   Form1.Controlstyle := Form1.Controlstyle + [csOpaque];

> >  Run the program again.
> >  Resize the form. It flickers like crazy.

> >  As you can see: no drawing is going on on my part, nothing.
> >  Changing the align from alnone to alclient causes this mess.
> >  Why? How do you remedy this? Am I missing a faq somewhere?

> >  Thanks,

> > Naji.

> --
> Ecological Software Solutions
> http://www.ecostats.com

Re:::: Why is it _still_ flickering??? your HELP is appreciated


Hi Naji:

I have Delphi 3, using a Cyrix 200 mhz processor, 32megs SDRAM and used your
code exactly.

W. Willigg

Quote
Naji Mouawad wrote:
> Do you have 4.0 or 3.0? I've got 3.0 this may make a difference.

> Naji.

> Mailbox wrote:

> > I did exactly as you stated and had no flicker at all..... Did you really
> > describe this as you stated and do it yourself or is this part of a larger
> > program.  I ask because if it is the later than you might go looking for
> > an OnPaint event handler that is giving you problems..... just a thought.

> > W. Willigg

> > Naji Mouawad wrote:

> > > I've read the FAQ about flickering and I may have missed this one BUT:

> > > Here's the deal:

> > >  1. Start a new project.
> > >  2. Drop a scrollbox on the form
> > >  3. drop an image inside the scrollbox and load and bitmap you like it
> > >     does not matter.
> > >  4. Run the program.
> > >  5. Resize the form : No flicker, all is cool

> > > Now:

> > >  Change the align property of the scrollbox to alclient.
> > >  Add the following code in the Form1Create handle:

> > >   Image1.Controlstyle := Image1.Controlstyle + [csOpaque];
> > >   Scrollbox1.ControlStyle := Scrollbox1.ControlStyle + [csOpaque];
> > >   Form1.Controlstyle := Form1.Controlstyle + [csOpaque];

> > >  Run the program again.
> > >  Resize the form. It flickers like crazy.

> > >  As you can see: no drawing is going on on my part, nothing.
> > >  Changing the align from alnone to alclient causes this mess.
> > >  Why? How do you remedy this? Am I missing a faq somewhere?

> > >  Thanks,

> > > Naji.

> > --
> > Ecological Software Solutions
> > http://www.ecostats.com

--
Ecological Software Solutions
http://www.ecostats.com

Other Threads