By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,524 Members | 1,593 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,524 IT Pros & Developers. It's quick & easy.

Execution Order

P: n/a
VB.NET seems to be processing things in a different "order" than I'm used
to. For example, I had a problem (I don't have the exact code handy anymore
so it's just a "guess") where if I put the complete code in a single
subroutine it wouldn't work but if I put the part that wasn't working in a
subroutine, and called it after the first subroutine finished, would work
even though if you laid out the actual commands linearly ("in order") they
would be exactly the same. Does anyone know why this happens and what is it
"called"?

--
Thanks,
Ricky W. Hunt
freendeed
Nov 21 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
* "Ricky W. Hunt" <rh*****@hotmail.com> scripsit:
VB.NET seems to be processing things in a different "order" than I'm used
to. For example, I had a problem (I don't have the exact code handy anymore
so it's just a "guess") where if I put the complete code in a single
subroutine it wouldn't work but if I put the part that wasn't working in a
subroutine, and called it after the first subroutine finished, would work
even though if you laid out the actual commands linearly ("in order") they
would be exactly the same. Does anyone know why this happens and what is it
"called"?


Normally, this should not occur. I can imagine some situations where
placing code in a separate procedure and calling this procedure may
behave differently because of a possible small delay caused by the call
to the method, but in general, there must not be a difference.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 21 '05 #2

P: n/a
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:2o************@uni-berlin.de...

Normally, this should not occur. I can imagine some situations where
placing code in a separate procedure and calling this procedure may
behave differently because of a possible small delay caused by the call
to the method, but in general, there must not be a difference.


That was my guess too. So I tried putting a Sleep command (up to 5 seconds -
5000ms) and it still didn't work. Only when I put it another block did it
work. I will try to come up with the exact code again and post it to see if
you have any clues. BTW, thanks for all the help you provide.
Nov 21 '05 #3

P: n/a
"Ricky W. Hunt" <rh*****@hotmail.com> wrote in message
news:JrkVc.194961$eM2.185468@attbi_s51...
VB.NET seems to be processing things in a different "order" than I'm used
to. For example, I had a problem (I don't have the exact code handy anymore so it's just a "guess") where if I put the complete code in a single
subroutine it wouldn't work but if I put the part that wasn't working in a
subroutine, and called it after the first subroutine finished, would work
even though if you laid out the actual commands linearly ("in order") they
would be exactly the same. Does anyone know why this happens and what is it "called"?

--
Thanks,
Ricky W. Hunt
freendeed


Are you reusing a variable name in the subroutine whic when the code is
linear alters its operation ? Just a guess.

--
Jonathan Bailey.
Nov 21 '05 #4

P: n/a
* "Ricky W. Hunt" <rh*****@hotmail.com> scripsit:
Normally, this should not occur. I can imagine some situations where
placing code in a separate procedure and calling this procedure may
behave differently because of a possible small delay caused by the call
to the method, but in general, there must not be a difference.


That was my guess too. So I tried putting a Sleep command (up to 5 seconds -
5000ms) and it still didn't work. Only when I put it another block did it
work. I will try to come up with the exact code again and post it to see if
you have any clues. BTW, thanks for all the help you provide.


OK, I think it doesn't make much sense to discuss this topic without the
source code that caused the problem.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 21 '05 #5

P: n/a
<jb> wrote in message news:41**********************@news.easynet.co.uk.. .

Are you reusing a variable name in the subroutine whic when the code is
linear alters its operation ? Just a guess.


No. It's just a call to the Window's Media Player. No variables involved at
all
Nov 21 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.