Chis,
Not true,
The "Me" is only for the programmer, it does nothing at runtime.
The With clause creates an extra reference in a program. In this case it
will be slower than a program without a With clause, however think than
probably in parts of nanoseconds.
I hope this gives some ideas?
Cor
"Chris, Master of All Things Insignificant"
..
> Herfried, maybe your example here can get you to answer a question I've
> wondered about for a while.
>
> With Me.Label1
> .Text = ...
> .Refresh()
> End With
>
> The idea behind the With clause is it allows for faster execution since
> the "Me" ojbect doesn't have to be resolved 2 times in your example. But
> you could rewrite your sample w/o the Me
>
> With Label1
> .Text = ...
> .Refresh()
> End With
>
> In this case there wouldn't be any inhancement since you are not actually
> eliminating the dot. Am I correct in my thinking?
>
> Chris
>
>
> "Herfried K. Wagner [MVP]" <hirf-spam-me-(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> "John Smith" <(E-Mail Removed)> schrieb:
>>>I have a form doing a large process. While this form is doing its
>>> processing I want to write a status to a Textbox of where it is at in
>>> the
>>> process. Similar to having a log file but within a textbox. As it
>>> reaches
>>> its mark it adds a line to the textbox "Step 2 is complete." or "Step 3
>>> Failed because of...". My problem is that the text within the textbox
>>> does
>>> not display until after all of the processing is complete. How can I
>>> get
>>> the text to display when it reaches each specific process?
>>
>> Solution 1:
>>
>> \\\
>> With Me.Label1
>> .Text = ...
>> .Refresh()
>> End With
>> Application.DoEvents() ' See documentation.
>> ///
>>
>> Solution 2:
>>
>> Multithreading + Windows Forms:
>>
>> <URL:http://msdn.microsoft.com/library/en-us/dnforms/html/winforms06112002.asp>
>> <URL:http://msdn.microsoft.com/library/en-us/dnforms/html/winforms08162002.asp>
>> <URL:http://msdn.microsoft.com/library/en-us/dnforms/html/winforms01232003.asp>
>>
>> <URL:http://www.devx.com/dotnet/Article/11358/>
>>
>> <URL:http://msdn.microsoft.com/library/en-us/cpref/html/frlrfSystemWindowsFormsControlClassInvokeTopic.asp>
>>
>> Multithreading in Visual Basic .NET (Visual Basic Language Concepts)
>> <URL:http://msdn.microsoft.com/library/en-us/vbcn7/html/vaconthreadinginvisualbasic.asp>
>>
>> Sample:
>>
>> FileSystemEnumerator
>> <URL:http://dotnet.mvps.org/dotnet/samples/filesystem/downloads/FileSystemEnumerator.zip>
>>
>> --
>> M S Herfried K. Wagner
>> M V P <URL:http://dotnet.mvps.org/>
>> V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
>
>
|