Screen refresh question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • J L

    #1

    Screen refresh question

    I am using

    SendMessage(me. Handle, WM_SETREDRAW, False, 0)

    to prevent my form form displaying during my update of a listview.
    During the update I possibly change the size of both the listview and
    the form containing it.

    My problem is that if the new form is larger than the old one, all is
    fine. But if it is smaller than the old one, the image of the old one
    remains outside the bounds of the new form.

    Does that make sense and how can I eliminate this behavior. I use
    me.Refresh after I turn the redraw back on.

    TIA,
    John
  • Robin Tucker

    #2
    Re: Screen refresh question

    You shouldn't be using the sendmessage at all. The listview has two
    methods: BeginUpdate and EndUpdate, which do this for you.

    "J L" <john@marymonte .com> wrote in message
    news:0lur81t7ov 7mfpmmcqit8s48g vanajttvo@4ax.c om...[color=blue]
    >I am using
    >
    > SendMessage(me. Handle, WM_SETREDRAW, False, 0)
    >
    > to prevent my form form displaying during my update of a listview.
    > During the update I possibly change the size of both the listview and
    > the form containing it.
    >
    > My problem is that if the new form is larger than the old one, all is
    > fine. But if it is smaller than the old one, the image of the old one
    > remains outside the bounds of the new form.
    >
    > Does that make sense and how can I eliminate this behavior. I use
    > me.Refresh after I turn the redraw back on.
    >
    > TIA,
    > John[/color]


    Comment

    • J L

      #3
      Re: Screen refresh question

      Hi Robin,
      Thanks for the reply but Begin and EndUpdate wont do the trick for me.
      I am not only updating the listview but also resizing the form and
      moving buttons around. So I do need to prevent the form from redrawing
      duing all of this. The problem is if the form gets smaller, then the
      old excess is still visible.

      John

      On Fri, 20 May 2005 17:46:04 +0100, "Robin Tucker"
      <idontwanttobes pammedanymore@r eallyidont.com> wrote:
      [color=blue]
      >You shouldn't be using the sendmessage at all. The listview has two
      >methods: BeginUpdate and EndUpdate, which do this for you.
      >
      >"J L" <john@marymonte .com> wrote in message
      >news:0lur81t7o v7mfpmmcqit8s48 gvanajttvo@4ax. com...[color=green]
      >>I am using
      >>
      >> SendMessage(me. Handle, WM_SETREDRAW, False, 0)
      >>
      >> to prevent my form form displaying during my update of a listview.
      >> During the update I possibly change the size of both the listview and
      >> the form containing it.
      >>
      >> My problem is that if the new form is larger than the old one, all is
      >> fine. But if it is smaller than the old one, the image of the old one
      >> remains outside the bounds of the new form.
      >>
      >> Does that make sense and how can I eliminate this behavior. I use
      >> me.Refresh after I turn the redraw back on.
      >>
      >> TIA,
      >> John[/color]
      >[/color]

      Comment

      Working...