?
Solved

Lock treeview update

Posted on 2006-07-18
1
Medium Priority
?
260 Views
Last Modified: 2006-11-18
Hi Experts,

I would like to lock a treeview from updating for a few lines of code,

What i mean is:

'Lock
If IsExpanded = True Then
        Nd.Collapse()
    Else
        Nd.Expand()
End If
'Unlock

How easy is this to accomplish?

Cheers,

Tom
0
Comment
Question by:TommyTwoPints
1 Comment
 
LVL 5

Accepted Solution

by:
mydasx earned 2000 total points
ID: 17134424
use synclock.  easy as greasy!

Sub MonkeyBusiness()
    SyncLock Me.treeView1
         'treeview bidness goes here
    End SyncLock
End Sub
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Loops Section Overview
Suggested Courses

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question