SoundPlayer 01-04-10

Can someone explain why the soundplayer still works after a Dispose() =
call

SoundPlayer player =3D new SoundPlayer();
player.Stream =3D Properties.Resources.alarm;
player.Play();
player.Dispose();
player.Play()                // Should this still work???
mick

0
mick
1/4/2010 4:46:12 PM
dotnet.languages.csharp 1931 articles. 0 followers. Follow

14 Replies
893 Views

Similar Articles

[PageSpeed] 24

On Jan 4, 11:46=A0am, "mick" <coughco...@privacy.com> wrote:
> Can someone explain why the soundplayer still works after a Dispose() cal=
l
>
> SoundPlayer player =3D new SoundPlayer();
> player.Stream =3D Properties.Resources.alarm;
> player.Play();
> player.Dispose();
> player.Play() =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0// Should this still work???
> mick

From memory, I've had problems with sound unless I stick to the
script. And when you play with Dispose you are overriding the
automatic garbage collection, which in C# has its own problems.  Why
not just stick to the script?  Follow the template in your textbook
and be done with it. MacDonald is a good author.  Liberty as well.
Several others.  Don't stray outside the safe boundaries they have
established.

RL
0
RayLopez99
1/4/2010 5:24:44 PM
RayLopez99 wrote:
> And when you play with Dispose you are overriding the
> automatic garbage collection, which in C# has its own problems.
>
> RL
>   

Mind clarifying that comment? By "play with Dispose", do you mean 
calling Dispose and then continuing to make use of the object?  Or 
calling Dispose at all?  Generally, if an object implements Dispose, you 
SHOULD call it once you are done using the object.

-Adam
0
Adam
1/4/2010 7:14:14 PM
mick wrote:
> Can someone explain why the soundplayer still works after a Dispose() call
> 
> SoundPlayer player = new SoundPlayer();
> player.Stream = Properties.Resources.alarm;
> player.Play();
> player.Dispose();
> player.Play()                // Should this still work???

There is actually no requirement that a call to Dispose() should render 
an object unusable, either partially or completely.

That said, in this particular case, looking in Reflector I don't see any 
implementation in SoundPlayer for the Dispose() method, in spite of what 
the docs say (they claim that the Dispose(bool) overload is overridden 
in SoundPlayer).  So calling Dispose() doesn't do anything at all to any 
of the SoundPlayer-specific functionality.  I suppose it's possible that 
something in the base class Component might no longer work after a call 
to Dispose(), but something like the Play() method has no obvious reason 
_not_ to continue working after you call Dispose().

Of course, the big question is: why are you calling Dispose() before 
you're done with the object?  :)  Hopefully your question is simply 
academic, and isn't related to a problem you're having in your code.

Pete
0
Peter
1/4/2010 7:17:26 PM
"mick" <coughcough@privacy.com> wrote in news:eNAyu1VjKHA.3792
@TK2MSFTNGP02.phx.gbl:

> SoundPlayer player = new SoundPlayer();
> player.Stream = Properties.Resources.alarm;
> player.Play();
> player.Dispose();
> player.Play()                // Should this still work???

I am not sure how the SoundPlayer works, but the main reason it might still 
play is you have not stopped anything prior to dispose (closed the stream).  
That would stop the object from being properly marked for disposal and it 
would not dispose.

Peace and Grace,

-- 
Gregory A. Beamer (MVP)

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

*******************************************
|      Think outside the box!             |
*******************************************
0
Gregory
1/4/2010 7:36:53 PM
Should it work? --You can resurect your object (and I would let others to 
explain it), but that is probably NOT what you WANT, neither it is not 
related to your first question.

It is quite possible that your SoundPlayer simply continue to play the 
buffered 'sound'. In fact, if it would not, you would likely be hearing 
nothing, (Play( )  does not *wait* to reach the end of the stream to 
continue the execution of the calling code! It generates the sound from 
another thread). It seems that you should call the Stop method to explicitly 
'kill' (pause for an infinite amount of time) the sound.
http://msdn.microsoft.com/en-us/library/system.media.soundplayer.stop.aspx

Vanderghast, Access MVP

"mick" <coughcough@privacy.com> wrote in message 
news:eNAyu1VjKHA.3792@TK2MSFTNGP02.phx.gbl...
Can someone explain why the soundplayer still works after a Dispose() call

SoundPlayer player = new SoundPlayer();
player.Stream = Properties.Resources.alarm;
player.Play();
player.Dispose();
player.Play()                // Should this still work???
mick

0
vanderghast
1/4/2010 9:41:37 PM
"Peter Duniho" <no.peted.spam@no.nwlink.spam.com> wrote in message =
news:ex8HOKXjKHA.2164@TK2MSFTNGP02.phx.gbl...
> mick wrote:
>> Can someone explain why the soundplayer still works after a Dispose() =
call
>>=20
>> SoundPlayer player =3D new SoundPlayer();
>> player.Stream =3D Properties.Resources.alarm;
>> player.Play();
>> player.Dispose();
>> player.Play()                // Should this still work???
>=20
> There is actually no requirement that a call to Dispose() should =
render=20
> an object unusable, either partially or completely.
>=20
> That said, in this particular case, looking in Reflector I don't see =
any=20
> implementation in SoundPlayer for the Dispose() method, in spite of =
what=20
> the docs say (they claim that the Dispose(bool) overload is overridden =

> in SoundPlayer).  So calling Dispose() doesn't do anything at all to =
any=20
> of the SoundPlayer-specific functionality.  I suppose it's possible =
that=20
> something in the base class Component might no longer work after a =
call=20
> to Dispose(), but something like the Play() method has no obvious =
reason=20
> _not_ to continue working after you call Dispose().
>=20
> Of course, the big question is: why are you calling Dispose() before=20
> you're done with the object?  :)

Well the little program I used it in would use it for click sounds when =
a button
was pressed. This would be a rare occurance (if at all)  so what i was =
doing
was creating a Soundplayer, using it, then disposing rather creating one =
at the
start of the prog and using that when and if I needed it. (Note - this =
was from
when I was learning about .Net and C# and was probably learning about =
Dispose())

>  Hopefully your question is simply=20
> academic, and isn't related to a problem you're having in your code.

:-) Yes, it was simply something I`d noticed when messing aound with =
this old
piece of code. When I first learned about the SoundPlayer I`m almost =
certain
that the article I learnt it from said you *should* use Dispose() after =
you were=20
finished with it. I thought I`d try to see what happened after the =
Dispose and
was surprised to find it still worked. Just for clarity then (for me) Do =
I need
to Dispose of this oject myself or does the GC do it for me? I also =
remember=20
watching one of those MSN Webcast series which, again, I`m almost =
certain
said that if you`re not sure which objects you should dispose of =
yourself
then check to see if it exposes the Dispose method.

mick
0
mick
1/4/2010 11:07:46 PM
"Gregory A. Beamer" <NoSpamMgbworld@comcast.netNoSpamM> wrote in message =
news:Xns9CF68A3975EDBgbworld@207.46.248.16...
> "mick" <coughcough@privacy.com> wrote in news:eNAyu1VjKHA.3792
> @TK2MSFTNGP02.phx.gbl:
>=20
>> SoundPlayer player =3D new SoundPlayer();
>> player.Stream =3D Properties.Resources.alarm;
>> player.Play();
>> player.Dispose();
>> player.Play()                // Should this still work???
>=20
> I am not sure how the SoundPlayer works, but the main reason it might =
still=20
> play is you have not stopped anything prior to dispose (closed the =
stream). =20
> That would stop the object from being properly marked for disposal and =
it=20
> would not dispose.

What this snippet doesnt make clear is that the sound is actually =
finished playing
when the Dispose() is called as I was actually stepping through the code =
in the=20
debugger.

mick
0
mick
1/4/2010 11:16:35 PM
mick wrote:
> [...]
> Just for clarity then (for me) Do I need
> to Dispose of this oject myself or does the GC do it for me? I also remember 
> watching one of those MSN Webcast series which, again, I`m almost certain
> said that if you`re not sure which objects you should dispose of yourself
> then check to see if it exposes the Dispose method.

What you should check for is IDisposable.  For example:

   object someObject = ...;

later:

   IDisposable disposable = someObject as IDisposable;

   if (disposable != null)
   {
     disposable.Dispose();
   }

How exactly that code will look depends a lot on the lifetime of the 
object.  If it's used only locally, then a "using" statement is best. 
Otherwise, you need to track the lifetime of the object in some sensible 
way, and make sure you call Dispose() before you lose track of the object.

Note that in many cases, you know the exact type of the object, and thus 
already know whether it implements IDisposable or not, and thus can just 
go ahead and call Dispose() directly, without checking for the 
implementation (for some objects � those that implement IDisposable 
explicitly rather than implicitly � you'll have to cast them to 
IDisposable to access the Dispose() method).

In any case, the phrase "when you are finished with it" hides a lot of 
potential complexity.  In the SoundPlayer example, it's reasonable to 
assume that you might want to pre-load a sound, and then keep that 
pre-loaded SoundPlayer instance around so that you can play the sound 
any time you like.  In that case, you wouldn't dispose the instance 
until you are sure you won't need to play that sound again.  That might 
actually be when your program is shutting down!

In any case, yes�you should always dispose your objects somehow.  And 
that's true even if you happen to find out that for a particular object, 
the Dispose() method turns out to be a NOP.  You never know when the 
object implementation might change.  If it implements IDisposable, 
that's its way of telling you that you do need to dispose it when you're 
finally through with it.

Properly implemented IDisposable objects will also have a finalizer, 
which will allow the GC to dispose the object for you if you should 
happen to forget _and_ the object becomes unreachable (i.e. 
collectable).  But you shouldn't rely on that; it's a backstop for the 
object, not for your own code to depend on.  Garbage collection and 
object finalization happens on a non-deterministic basis; even if the 
object does get finalized, it's less efficient to let the GC finalize 
objects than to dispose them explicitly.  And there is actually no 
guarantee the GC will ever actually dispose and collect your object.

Pete
0
Peter
1/4/2010 11:33:30 PM
"mick" <coughcough@privacy.com> wrote in
news:OnTF5PZjKHA.5608@TK2MSFTNGP05.phx.gbl: 

> What this snippet doesnt make clear is that the sound is actually
> finished playing when the Dispose() is called as I was actually
> stepping through the code in the debugger.

This is inconsequential, as what you perceive and what the computer 
"thinks" are two different things. As you are not in control of garbage 
collection or the compiler, there are rules deeper than your code that are 
in order. WIthout me playing with the code, I cannot guarantee this is the 
case, but I have a strong suspicion.

I guess the more important questions is "why is it important that code to 
run a sound after dispose fail?". You are in control of the code and 
setting up the condition. Why set up something you know should not work 
(from a human standpoint)?

Peace and Grace,

-- 
Gregory A. Beamer (MVP)

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

*******************************************
|      Think outside the box!             |
*******************************************
0
Gregory
1/5/2010 3:47:53 PM
"Gregory A. Beamer" <NoSpamMgbworld@comcast.netNoSpamM> wrote in message =
news:Xns9CF763666EFDFgbworld@207.46.248.16...
> "mick" <coughcough@privacy.com> wrote in
> news:OnTF5PZjKHA.5608@TK2MSFTNGP05.phx.gbl:=20
>=20
>> What this snippet doesnt make clear is that the sound is actually
>> finished playing when the Dispose() is called as I was actually
>> stepping through the code in the debugger.
>=20
> This is inconsequential, as what you perceive and what the computer=20
> "thinks" are two different things. As you are not in control of =
garbage=20
> collection or the compiler, there are rules deeper than your code that =
are=20
> in order. WIthout me playing with the code, I cannot guarantee this is =
the=20
> case, but I have a strong suspicion.
>=20
> I guess the more important questions is "why is it important that code =
to=20
> run a sound after dispose fail?". You are in control of the code and=20
> setting up the condition. Why set up something you know should not =
work=20
> (from a human standpoint)?

It isn`t. I noticed that it happened and was curious as to the =
explanation.

mick
0
mick
1/5/2010 8:17:19 PM
"Peter Duniho" wrote:

> mick wrote:
> > [...]
> > Just for clarity then (for me) Do I need
> > to Dispose of this oject myself or does the GC do it for me? I also remember 
> > watching one of those MSN Webcast series which, again, I`m almost certain
> > said that if you`re not sure which objects you should dispose of yourself
> > then check to see if it exposes the Dispose method.
> 
> What you should check for is IDisposable.  For example:
> 
>    object someObject = ...;
> 
> later:
> 
>    IDisposable disposable = someObject as IDisposable;
> 
>    if (disposable != null)
>    {
>      disposable.Dispose();
>    }
> 
> How exactly that code will look depends a lot on the lifetime of the 
> object.  If it's used only locally, then a "using" statement is best. 
> Otherwise, you need to track the lifetime of the object in some sensible 
> way, and make sure you call Dispose() before you lose track of the object.
> 
> Note that in many cases, you know the exact type of the object, and thus 
> already know whether it implements IDisposable or not, and thus can just 
> go ahead and call Dispose() directly, without checking for the 
> implementation (for some objects – those that implement IDisposable 
> explicitly rather than implicitly – you'll have to cast them to 
> IDisposable to access the Dispose() method).
> 
> In any case, the phrase "when you are finished with it" hides a lot of 
> potential complexity.  In the SoundPlayer example, it's reasonable to 
> assume that you might want to pre-load a sound, and then keep that 
> pre-loaded SoundPlayer instance around so that you can play the sound 
> any time you like.  In that case, you wouldn't dispose the instance 
> until you are sure you won't need to play that sound again.  That might 
> actually be when your program is shutting down!
> 
> In any case, yes…you should always dispose your objects somehow.  And 
> that's true even if you happen to find out that for a particular object, 
> the Dispose() method turns out to be a NOP.  You never know when the 
> object implementation might change.  If it implements IDisposable, 
> that's its way of telling you that you do need to dispose it when you're 
> finally through with it.
> 
> Properly implemented IDisposable objects will also have a finalizer, 
> which will allow the GC to dispose the object for you if you should 
> happen to forget _and_ the object becomes unreachable (i.e. 
> collectable).  But you shouldn't rely on that; it's a backstop for the 
> object, not for your own code to depend on.  Garbage collection and 
> object finalization happens on a non-deterministic basis; even if the 
> object does get finalized, it's less efficient to let the GC finalize 
> objects than to dispose them explicitly.  And there is actually no 
> guarantee the GC will ever actually dispose and collect your object.

Am I being misled? Why is there a GC.Collect() method if there is supposedly 
no way to control the GC? I figure that GC.Collect() will collect all garbage 
and that regular calls to it will dispose every unused object, even 
IDisposables.

> 
> Pete
> .
> 

-- 

Wannabe Geek
0
Utf
1/5/2010 8:49:01 PM
"mick" <coughcough@privacy.com> wrote in
news:ulpwYQkjKHA.2260@TK2MSFTNGP04.phx.gbl: 

> It isn`t. I noticed that it happened and was curious as to the
> explanation. 

That's cool. I do this as well, but sometimes I have to wonder as many 
times people get the problem and the problem plus attempted solution mixed 
up. Better to ask intent than assume and try to answer. ;-)

Peace and Grace,

-- 
Gregory A. Beamer (MVP)

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

*******************************************
|      Think outside the box!             |
*******************************************
0
Gregory
1/5/2010 9:45:07 PM
wannabe geek wrote:
> Am I being misled? Why is there a GC.Collect() method if there is supposedly 
> no way to control the GC?

Because, very rarely, it is useful to tell the GC to do a collection. 
Most applications never need to, nor should, call the method.

> I figure that GC.Collect() will collect all garbage 
> and that regular calls to it will dispose every unused object, even 
> IDisposables.

Garbage collection is _not_ the same as disposing.

Disposing exists only because .NET has to interact with systems on the 
computer that are unmanaged, and thus has no way to know how to release 
those unmanaged resources.  A disposable object will get _in the way of_ 
a collection operation if it hasn't been properly managed by the user's 
code, because it causes the object to wind up in the finalizer queue 
rather than actually getting collected.

Dispose your IDisposables.  Let the GC do its job when it wants to. 
These are probably two of the most important rules with respect to 
managed code and its memory model.

Pete
0
Peter
1/6/2010 12:18:30 AM
"Peter Duniho" <no.peted.spam@no.nwlink.spam.com> wrote in message =
news:eQ$3TZZjKHA.5020@TK2MSFTNGP02.phx.gbl...
> mick wrote:
>> [...]
>> Just for clarity then (for me) Do I need
>> to Dispose of this oject myself or does the GC do it for me? I also =
remember=20
>> watching one of those MSN Webcast series which, again, I`m almost =
certain
>> said that if you`re not sure which objects you should dispose of =
yourself
>> then check to see if it exposes the Dispose method.
>=20
> What you should check for is IDisposable.  For example:
>=20
>   object someObject =3D ...;
>=20
> later:
>=20
>   IDisposable disposable =3D someObject as IDisposable;
>=20
>   if (disposable !=3D null)
>   {
>     disposable.Dispose();
>   }
>=20
> How exactly that code will look depends a lot on the lifetime of the=20
> object.  If it's used only locally, then a "using" statement is best.=20
> Otherwise, you need to track the lifetime of the object in some =
sensible=20
> way, and make sure you call Dispose() before you lose track of the =
object.
>=20
> Note that in many cases, you know the exact type of the object, and =
thus=20
> already know whether it implements IDisposable or not, and thus can =
just=20
> go ahead and call Dispose() directly, without checking for the=20
> implementation (for some objects =96 those that implement IDisposable=20
> explicitly rather than implicitly =96 you'll have to cast them to=20
> IDisposable to access the Dispose() method).
>=20
> In any case, the phrase "when you are finished with it" hides a lot of =

> potential complexity.  In the SoundPlayer example, it's reasonable to=20
> assume that you might want to pre-load a sound, and then keep that=20
> pre-loaded SoundPlayer instance around so that you can play the sound=20
> any time you like.  In that case, you wouldn't dispose the instance=20
> until you are sure you won't need to play that sound again.  That =
might=20
> actually be when your program is shutting down!
>=20
> In any case, yes=85you should always dispose your objects somehow.  =
And=20
> that's true even if you happen to find out that for a particular =
object,=20
> the Dispose() method turns out to be a NOP.  You never know when the=20
> object implementation might change.  If it implements IDisposable,=20
> that's its way of telling you that you do need to dispose it when =
you're=20
> finally through with it.
>=20
> Properly implemented IDisposable objects will also have a finalizer,=20
> which will allow the GC to dispose the object for you if you should=20
> happen to forget _and_ the object becomes unreachable (i.e.=20
> collectable).  But you shouldn't rely on that; it's a backstop for the =

> object, not for your own code to depend on.  Garbage collection and=20
> object finalization happens on a non-deterministic basis; even if the=20
> object does get finalized, it's less efficient to let the GC finalize=20
> objects than to dispose them explicitly.  And there is actually no=20
> guarantee the GC will ever actually dispose and collect your object.
>=20

I managed to miss this reply somehow. Thanks for the excellent =
explanation.

mick
0
mick
1/6/2010 1:39:43 AM
Reply:

Similar Artilces:

extra line number 01-20-10
With Word 2003 I didn't have this problem, but with 2007 when I put in a page break the last line of the page does not have a line number, but when I print, it prints a line number with a blank line. To avoid this I have deleted the paragraph before the page break, making the page break immediately after the text on the same line. However, sometimes my alignment is different right there at the page break, meaning left aligned on the first page and centered on the following page. If I delete the paragraph like I stated before, my alignment gets all messed up. Anybody know ...

word document 01-28-10
While in a word document I accidentally hit the default button and changed my settings. Now when I open word it opens in landscape form and a booklet style. How do I get it to go back to a normal page Assuming that you are using Word 2007, do the following: On the Page Layout tab, click the dialog launcher button (the little arrow on the bottom right) of the Page Setup group. In the Page Setup dialog box, click the Margins tab. Change the the orientation to "Portrait" and choose "Normal" for "Multiple pages." Then click the Default button. If/when ...

SoundPlayer 06-20-10
Is there any way to detect when a soundplayer (playing asynchronously) has finished playing a sound? mick mick wrote: > Is there any way to detect when a soundplayer (playing asynchronously) > has finished playing a sound? I assume you're talking about System.Media.SoundPlayer? AFAIK, no. But, you can play the sound synchronously in a thread you have control over and detect the end of the sound that way. For example: SoundPlayer player = �; Action<SoundPlayer> play = p => { p.PlaySync(); MethodToCallWhenSoundIsDone(); ...

Help with writing a script 09-25-10
I need to know how to create a vbscript using notepad ++ that will do the following: · Prompt the user for a folder name & a file name · If the folder does not exist, create the folder & the file. Let the user know that the folder & the file have been created. · If the folder does exist but the file does not, create the file. Let the user know the file has been created. · If the both the folder & the file exist, print the following info about the file: when the file was created, when the file was accessed la...

drop down list 01-27-10
I am trying to create a drop down list for inventory locations, like tool crib, shed, yard, etc. How do I go about creating one. -- Adam Gould Hi Look into Debra web has excellent explanation and examples http://www.contextures.com/xlDataVal01.html http://www.contextures.com/xlDataVal13.html#Create http://www.contextures.com/xlDataVal02.html "Adam gould" wrote: > I am trying to create a drop down list for inventory locations, like tool > crib, shed, yard, etc. How do I go about creating one. > -- > Adam Gould ...

formula help 02-10-10
Hi- Issue: 211 310 410 569 Would like to accomplish: 2211 2310 2410 2569 How do I add number 2 infront of the above ISSUE numbers as I have thousands of line to do. Soth If your number is in column A then in column B type =2 & A1 and copy it down. -- -John http://www.jmbundy.blogspot.com/ Please rate when your question is answered to help us and others know what is helpful. "Soth" wrote: > Hi- > > Issue: > 211 > 310 > 410 > 569 > > Would like to accomplish: > 2211 > 2310 > 2410 > 2...

sending e-mails 05-05-10
I can receive but can't send e-mails. I am on vacation out of the country and not sure why I can't send? Use the webmail portal to your email account, or see if your email account provider offers an authenticated SMTP server that uses a port # other than the the default 25. Who is your email account provider? -- Dave N. MS-MVP (Mail) Windows 7 Ultimate http://download.live.com/wlmail "Joe" <Joe@discussions.microsoft.com> wrote in message news:9C5F78E3-9F2A-4567-BC9A-B493F1557E3E@microsoft.com... > I can receive but can't send e-mai...

Relationships 01-07-10
Hi, I am very confused about relationships. I have read and done the online training but I am still struggling and hope someone can help me. I have a database that tracks safety observations with several tables. The main table is my OBS Main table, which contains the basic information about each safety observation. The OBS_ID is my primary key I do believe. Now I have 3 other tables - Counter Measures, Critical Behaviours, and Critical Conditions. These tables link to my main table by each having the same OBS_ID field in them. When I tried to create the relationship betwe...

extra line number 01-11-10
With Word 2003 I didn't have a problem, but ever since I've had 2007, when I have a page break, although it doesn't show a line number on the screen nor on the print preview, it will print a line number on the line with the page break. I can fix some of these by deleting the paragraph before the line break, but if I have different alignments on the preceding and succeeding lines, that doesn't work. To keep the formatting correct, I must have that paragraph before the page break. Either being able to fix the line number printing or being able to fix the formatti...

publisher 97 #10
I have a file that was oriniated in Publisher 97. I inadevertently opened and saved it in Publisher 2002 on a different computer(using server). Now I can't access it through 97. Is there a way to do this? Can't save as, as the files of type don't say 97. Maybe they were the same as Publisher 98 files. Worth a try. -- Don Vancouver, USA "Terry" <Terry@discussions.microsoft.com> wrote in message news:D0B451AE-ACF2-449B-8F11-4F0C16297A12@microsoft.com... > I have a file that was oriniated in Publisher 97. I inadevertently opened > and saved it in P...

Word Document 01-14-10
I have two Word documents saved. Everytime I access one of these documents to make a change, the cursor just freezes as soon as I hit any key. I have to hit Ctnl, Alt, Del to exit the document because the entire page is locked up. What causes this and how do I get by this freezing? Thanks. -- tramonte50 See http://word.mvps.org/FAQs/AppErrors/CorruptDoc.htm. -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. tramonte50 wrote: > I have two Word ...

SoundPlayer 01-04-10
Can someone explain why the soundplayer still works after a Dispose() = call SoundPlayer player =3D new SoundPlayer(); player.Stream =3D Properties.Resources.alarm; player.Play(); player.Dispose(); player.Play() // Should this still work??? mick On Jan 4, 11:46=A0am, "mick" <coughco...@privacy.com> wrote: > Can someone explain why the soundplayer still works after a Dispose() cal= l > > SoundPlayer player =3D new SoundPlayer(); > player.Stream =3D Properties.Resources.alarm; > player.Play(); > player.Dispose(); > player.P...

Cannot send email 02-21-10
Email has always worked fine until today, when I received the following message. The connection to the server has failed. Subject 'Re: Re:', Account: 'mail.comcast.net', Server: 'smtp.comcast.net', Protocol: SMTP, Port: 25, Secure(SSL): No, Socket Error: 10060, Error Number: 0x800CCC0E I followed the troubleshooting solutions in the help file, but nothing works. Change the SMTP port to 587 and make sure: My Server Requires Authentication is checked. How do I set up/configure Outlook Express, Windows Mail & Windows Live Mail for Comcast email? h...

SUMPRODUCT 01-21-10
The following formula works fine: =SUMPRODUCT(--(INDIRECT($AW$3&"!$BL1:$BL$6000")={"A"}),--(INDIRECT($AW$3&"!$O$1:$O$6000")="XN01"),(INDIRECT($AW$3&"!$CI$1:$CI$6000"))) However, I cant seem to get the following to work: =SUMPRODUCT(--(INDIRECT($AW$3&"!$BL1:$BL$6000")={"A","B"}),--(INDIRECT($AW$3&"!$O$1:$O$6000")="XN01","XR01"),(INDIRECT($AW$3&"!$CI$1:$CI$6000"))) I need to be able to summarise (using a headcount indicator (1) in Column CI) ...

supress 01-01-1900
Hi. I have a column coming from an sql-base. When the data are displayed as values I can supress 0. But when I show the data in date-format 0 is shown as 01-01-1900. Thus the value are shown again. What am I doing wrong ? Regards Peter On Dec 6, 6:46=A0am, Peter <pgrandj...@jubiimail.dk> wrote: > When the data are displayed as values I can supress 0. But when I show > the data in date-format 0 is shown as 01-01-1900. Thus the value are > shown again. What am I doing wrong ? Not telling us what revision of Excel you use and how you are suppressing zeros in the first place...

Incoming emails 05-19-10
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel Email Client: pop All incoming emails are sent to the Deleted Items folder. <br><br>Help! <br><br>SK On 2010-05-19 07:05:23 -0400, Samuel_Knox@officeformac.com said: Hi Samuel, > All incoming emails are sent to the Deleted Items folder. > > Help! Check all rules and mailing list manager. I bet one of them got corrupted and is sending to the wrong location. ����������Corentin -- --- Office:Mac MVP http://www.cortig.net/wordpress/ --- ...

Office X and Leopard (10.5)
Version: v.X Operating System: Mac OS X 10.4 (Tiger) Processor: Intel We want to upgrade our Macs to 10.5, but are stuck with Office X (our employer doesn't want us to be out of line with the Windows users in the organisation, who are also using a fairly old version of Office). We've had no problems using Office X on our 10.4 Intel Macs, despite a few initial warnings that it wouldn't work. Can anybody confirm that Office X will still work OK on 10.5? "OK", yes :-) At the moment it's a bit iffy - for the most part you should find that there is nothing of signific...

Money 04 desktop and ppc version
First, sorry if this has been covered, but I can't find anything with the search that relates. Just recently I've been having difficulties with the PPC version of money not staying current with the desktop version (version is money o4). I've uninstalled it over and over and it still gets to the point to where it is not jiving with the desktop version. It continues to be off by about 7-10 dollars. What the heck could be going on and is there anyone else that is experiencing this? Thank you very much in advance for comments/suggestions. ...

Memo Field 04-20-07
my memo field will not allow characters past 257 characters when typing in data from a form, why won't it? Are you sure you defined the field as memo, and not text with a limit of 255 characters? Mich "accessdesigner" <accessdesigner@discussions.microsoft.com> wrote in message news:497B46D1-2D36-4520-B3B6-82C199F80AF4@microsoft.com... > my memo field will not allow characters past 257 characters when typing in > data from a form, why won't it? 1. Are you really, really sure that it's a memo field and not a text field? I had to ask. 2. Is there some s...

Convert 010105 mmddyy text to 01/01/06
I need some help with this one. Tried everything I can think of. Thanks, Bret -- supersonicf11 ----------------------------------------------------------------------- supersonicf111's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=433 View this thread: http://www.excelforum.com/showthread.php?threadid=49727 Do you mean 010106? If so, Format - Cells - Date - under Type scroll down to the appropriate format. -- JoAnn Paules MVP Microsoft [Publisher] "supersonicf111" <supersonicf111.20z9ky_1136155500.7119@excelforum-nospam.com> wrote in ...

GP 10 Client Installation
I am sure that I am making installation harder than necessary. My company has created an install document that loads every all purchased features such as Audit Trails, Collection Managment, Extender, Fixed Assets, Revenue Expense Deferals, Smartlilst Builder and especially Integration Manager. Most of these options are never used by general users. Especially Integration Manager. Is there a way to create a "lite" installation for a normal user. thank you in advance Adger, You can create a simple package for normal users, with the basic modules, just run the setup and cho...

Outlook Contacts 09-30-04
When you install CRM Sales for Outlook all of the existing Contacts are added to your Outlook Contacts. However, unless you then add all new Contacts through the Outlook client, the Outlook Contact list does not stay up to date. We have users who add contacts through the browser interface, and I need these to flow through into Outlook (and thence into my PDA). Is it possible to re-sync the CRM Contacts into Outlook? Simply 'Go Offline' to sync CRM contacts to Outlook. If you don't see them sync, check the user settings... the suer may have elected not to sync to that fo...

updates 06-08-10
All my updates have failed but maybe 20 of them. I keep doing them but get the same message And is the message a secret or...? cheryl wrote: > All my updates have failed but maybe 20 of them. I keep doing them but get > the same message Thanks for sharing. Now, when you can provide some real information, maybe someone can help. "cheryl" <cheryl@discussions.microsoft.com> wrote in message news:C901F65B-C7C1-4C8C-AC34-17B4ABE902BB@microsoft.com... : All my updates have failed but maybe 20 of them. I keep doing them but get : the same message ...

Secinds from 1980-01-01
I have a cell that shows a date shown in seconds from 1980-01-01 and i want to convert this....how could i do this? thanks nails --- Message posted from http://www.ExcelForum.com/ Hi nails! Use: =DATE(1980,1,1)+A1/(24*60*60) Format as (eg) dd-mmm-yyyy hh:mm:ss Or: ="1980-01-01"+A1/(24*60*60) -- Regards Norman Harker MVP (Excel) Sydney, Australia njharker@optusnet.com.au It is imperative that the patches provided by Microsoft in its April Security Release be applied to Systems as soon as possible. It is believed that the likelihood of a worm being released SOON that exp...

send/receive problem #10
I posted this and did not see it appear, so am trying again. Apologies if it ends up on the list twice. I'm having a problem with Outlook XP, 2002 edition running on a new HP Pavilion with broadband access through our cable company. We've checked the cable company and the problem does not lie there. When I hit send/receive, sometimes everything is sent fine. But then - especially during a reply - the status will show 100% complete although it is still processing. Then it will try processing again and say 66%, then 33% and so on. The only way to send the message at this poi...