From: ralph on
On Wed, 03 Mar 2010 17:24:30 +0000, MM <kylix_is(a)yahoo.co.uk> wrote:

>On Wed, 3 Mar 2010 17:02:09 +0100, "Henning"
><computer_hero(a)coldmail.com> wrote:
>
>>
>>"MM" <kylix_is(a)yahoo.co.uk> skrev i meddelandet
>>news:h9iqo5pens21lrjljqfqpjgfi8at2p3ad2(a)4ax.com...
>>> Suppose I have:
>>>
>>> Sub AnyProc (cbo as ComboBox)
>>> MsgBox cbo.Name
>>> End Sub
>>>
>>> With Combo1
>>> AnyProc ?
>>> End With
>>>
>>> How can I refer to the object itself to pass to AnyProc? What I need
>>> is a .Self property!
>>>
>>> MM
>>
>>Sorry, but I can't see why using With/End With to call AnyProc Combo1?
>>Setting parameters is nice inside the With/End with, but the call should IMO
>>be outside. With/End With has a certain functionality, we can't change that.
>>;)
>>
>>/Henning
>>
>
>I'm just looking at it with my purist's hat on. In the case of a form
>I can use Me in many cases. I think With/End With was an afterthought
>that the MS designers came up with later end with. It's not a major
>problem!
>
>MM

Actually a well-thought out extension to the language.

The title of "Afterthought" more properly belongs to "While...Wend".
<g>

-ralph
From: Karl E. Peterson on
ralph wrote:
> On Wed, 03 Mar 2010 10:25:25 -0800, Karl E. Peterson <karl(a)exmvps.org>
> wrote:
>
>> MM wrote:
>>>> "ralph" <nt_consulting64(a)yahoo.net> wrote...
>>>>
>>>>> The With...End construct is provided only to simplify typing,
>>>>
>>>> All together now: "Oh no it's not!"
>>>>
>>>> The With/End With only makes a single call to the COM, without the With
>>>> there would be a call for every item that is replaced by the use of
>>>> With/End With. There are some other subtle effects but they are not
>>>> really important.
>>>
>>> I've never actually noticed any improvement in performance, though, by
>>> using With/End With. I just think it makes the code more readable and
>>> looks neater.
>>
>> You won't see the improvement on today's hardware. But if you use your
>> own object hierarchy, and single step through, you definitely will.
>
> And that's the key. "Single Step" where?
> In VB stepping through opcode?
> Using a debugger to step through running excode?
> Or using a debugger to step through running native code?
>
> The VB debugger often shows you exactly what you expect to see.

Yeah, good point. May not be the best "proof" out there. <g>

--
..NET: It's About Trust!
http://vfred.mvps.org


From: Karl E. Peterson on
ralph wrote:
> On Wed, 03 Mar 2010 17:24:30 +0000, MM <kylix_is(a)yahoo.co.uk> wrote:
>
>> On Wed, 3 Mar 2010 17:02:09 +0100, "Henning"
>> <computer_hero(a)coldmail.com> wrote:
>>
>>>
>>> "MM" <kylix_is(a)yahoo.co.uk> skrev i meddelandet
>>> news:h9iqo5pens21lrjljqfqpjgfi8at2p3ad2(a)4ax.com...
>>>> Suppose I have:
>>>>
>>>> Sub AnyProc (cbo as ComboBox)
>>>> MsgBox cbo.Name
>>>> End Sub
>>>>
>>>> With Combo1
>>>> AnyProc ?
>>>> End With
>>>>
>>>> How can I refer to the object itself to pass to AnyProc? What I need
>>>> is a .Self property!
>>>>
>>>> MM
>>>
>>> Sorry, but I can't see why using With/End With to call AnyProc Combo1?
>>> Setting parameters is nice inside the With/End with, but the call should
>>> IMO be outside. With/End With has a certain functionality, we can't change
>>> that. ;)
>>>
>>> /Henning
>>>
>>
>> I'm just looking at it with my purist's hat on. In the case of a form
>> I can use Me in many cases. I think With/End With was an afterthought
>> that the MS designers came up with later end with. It's not a major
>> problem!
>>
>> MM
>
> Actually a well-thought out extension to the language.
>
> The title of "Afterthought" more properly belongs to "While...Wend".
> <g>

Huh? That one goes *waaaaay* back, to the days well before compound
keywords. Shoot, it might have even preceeded For/Next?

--
..NET: It's About Trust!
http://vfred.mvps.org


From: Helmut Meukel on

"Karl E. Peterson" <karl(a)exmvps.org> schrieb im Newsbeitrag
news:eNOq1XwuKHA.2436(a)TK2MSFTNGP04.phx.gbl...
> ralph wrote:
>> On Wed, 03 Mar 2010 17:24:30 +0000, MM <kylix_is(a)yahoo.co.uk> wrote:
>>
>>> On Wed, 3 Mar 2010 17:02:09 +0100, "Henning"
>>> <computer_hero(a)coldmail.com> wrote:
>>>
>>>>
>>>> "MM" <kylix_is(a)yahoo.co.uk> skrev i meddelandet
>>>> news:h9iqo5pens21lrjljqfqpjgfi8at2p3ad2(a)4ax.com...
>>>>> Suppose I have:
>>>>>
>>>>> Sub AnyProc (cbo as ComboBox)
>>>>> MsgBox cbo.Name
>>>>> End Sub
>>>>>
>>>>> With Combo1
>>>>> AnyProc ?
>>>>> End With
>>>>>
>>>>> How can I refer to the object itself to pass to AnyProc? What I need
>>>>> is a .Self property!
>>>>>
>>>>> MM
>>>>
>>>> Sorry, but I can't see why using With/End With to call AnyProc Combo1?
>>>> Setting parameters is nice inside the With/End with, but the call should
>>>> IMO be outside. With/End With has a certain functionality, we can't change
>>>> that. ;)
>>>>
>>>> /Henning
>>>>
>>>
>>> I'm just looking at it with my purist's hat on. In the case of a form
>>> I can use Me in many cases. I think With/End With was an afterthought
>>> that the MS designers came up with later end with. It's not a major
>>> problem!
>>>
>>> MM
>>
>> Actually a well-thought out extension to the language.
>>
>> The title of "Afterthought" more properly belongs to "While...Wend".
>> <g>
>
> Huh? That one goes *waaaaay* back, to the days well before compound keywords.
> Shoot, it might have even preceeded For/Next?
>
> --
> .NET: It's About Trust!
> http://vfred.mvps.org
>


Hmm,

even the TSR-80 Basic had For/Next, I tried to look into my old manual
for While/Wend because I can't remember it, but I couldn't find the manual
any more :-(
My collection of manuals still contains GW-Basic, Vectra-Basic -First
Edition, 1985-, MS Basic PDS 7.0, VB-DOS, FORTRAN (1972) and
HP 1000 A-Series Computer Handbook 5th Edition (12/89).

Helmut.

From: Helmut Meukel on

"Helmut Meukel" <NoSpam(a)NoProvider.de> schrieb im Newsbeitrag
news:uu6HrLxuKHA.796(a)TK2MSFTNGP05.phx.gbl...
>
> "Karl E. Peterson" <karl(a)exmvps.org> schrieb im Newsbeitrag
> news:eNOq1XwuKHA.2436(a)TK2MSFTNGP04.phx.gbl...
>> ralph wrote:
>>> On Wed, 03 Mar 2010 17:24:30 +0000, MM <kylix_is(a)yahoo.co.uk> wrote:
>>>
>>>> On Wed, 3 Mar 2010 17:02:09 +0100, "Henning"
>>>> <computer_hero(a)coldmail.com> wrote:
>>>>
>>>>>
>>>>> "MM" <kylix_is(a)yahoo.co.uk> skrev i meddelandet
>>>>> news:h9iqo5pens21lrjljqfqpjgfi8at2p3ad2(a)4ax.com...
>>>>>> Suppose I have:
>>>>>>
>>>>>> Sub AnyProc (cbo as ComboBox)
>>>>>> MsgBox cbo.Name
>>>>>> End Sub
>>>>>>
>>>>>> With Combo1
>>>>>> AnyProc ?
>>>>>> End With
>>>>>>
>>>>>> How can I refer to the object itself to pass to AnyProc? What I need
>>>>>> is a .Self property!
>>>>>>
>>>>>> MM
>>>>>
>>>>> Sorry, but I can't see why using With/End With to call AnyProc Combo1?
>>>>> Setting parameters is nice inside the With/End with, but the call should
>>>>> IMO be outside. With/End With has a certain functionality, we can't
>>>>> change that. ;)
>>>>>
>>>>> /Henning
>>>>>
>>>>
>>>> I'm just looking at it with my purist's hat on. In the case of a form
>>>> I can use Me in many cases. I think With/End With was an afterthought
>>>> that the MS designers came up with later end with. It's not a major
>>>> problem!
>>>>
>>>> MM
>>>
>>> Actually a well-thought out extension to the language.
>>>
>>> The title of "Afterthought" more properly belongs to "While...Wend".
>>> <g>
>>
>> Huh? That one goes *waaaaay* back, to the days well before compound
>> keywords. Shoot, it might have even preceeded For/Next?
>>
>> --
>> .NET: It's About Trust!
>> http://vfred.mvps.org
>>
>
>
> Hmm,
>
> even the TSR-80 Basic had For/Next, I tried to look into my old manual
> for While/Wend because I can't remember it, but I couldn't find the manual
> any more :-(
> My collection of manuals still contains GW-Basic, Vectra-Basic -First
> Edition, 1985-, MS Basic PDS 7.0, VB-DOS, FORTRAN (1972) and
> HP 1000 A-Series Computer Handbook 5th Edition (12/89).
>
> Helmut.

Sorry for the typo, I meant TRS-80

Helmut

First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4 5 6 7 8 9
Prev: Graphic Draw Question
Next: Redirection