Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 100
Default How to disable TreeView screen update?

Relative newbie Q:

I have a process that goes thru an Excel 2002 TreeView and moves 'n
prunes a lot of Nodes.

Even though I (don't think I'm) actually selecting the Nodes I'm
working on (I never use .SelectedItem), still the whole tree insists
on visually updating in real time to reflect every change, resulting
in ungodly (and time-consuming) visual churn.

I cannot find a ScreenUpdate property in TreeView (or in any VBA
control, for that matter). And setting:

- TreeView.Enabled
- Application.ScreenUpdating

to False fail to stop it.

What property do I use?

Thanks much.

***
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default How to disable TreeView screen update?

Try preventing the repaint with the Windows API:

'this goes at the top of the module or at the top of the form code
'---------------------------------------------------------------------------
Private Const WM_SETREDRAW = &HB
Private Declare Function SendMessage Lib "user32" Alias _
"SendMessageA" (ByVal hwnd As Long, ByVal wMsg As _
Long, ByVal wParam As Long, lParam As Any) As Long

'this goes in your procedure
'--------------------------------
With TreeView1
SendMessage .hwnd, WM_SETREDRAW, 0, 0
'run your treeview code here
SendMessage .hwnd, WM_SETREDRAW, 1, 0
End With


RBS

wrote in message
...
Relative newbie Q:

I have a process that goes thru an Excel 2002 TreeView and moves 'n
prunes a lot of Nodes.

Even though I (don't think I'm) actually selecting the Nodes I'm
working on (I never use .SelectedItem), still the whole tree insists
on visually updating in real time to reflect every change, resulting
in ungodly (and time-consuming) visual churn.

I cannot find a ScreenUpdate property in TreeView (or in any VBA
control, for that matter). And setting:

- TreeView.Enabled
- Application.ScreenUpdating

to False fail to stop it.

What property do I use?

Thanks much.

***


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 100
Default How to disable TreeView screen update?

RB:

Thanks very much for your reply. That will certainly work.

***
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
disable screen refreshes ybazizi Excel Programming 3 November 21st 05 10:37 PM
Macro to disable screen saver snax500[_2_] Excel Programming 3 July 27th 05 08:45 PM
Disable Splash Screen John Baker Excel Programming 3 October 8th 04 06:52 PM
Disable Print Screen Round 2 . . . Fable[_15_] Excel Programming 0 September 17th 04 01:40 AM
Disable Print Screen Challenge Fable Excel Programming 14 September 16th 04 08:11 PM


All times are GMT +1. The time now is 03:24 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"