OLE对象wav [英] OLE object wav

查看:67
本文介绍了OLE对象wav的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个OLE对象是一个wav文件,只要打开一个表单就会播放它。唯一的问题是我需要它在表单关闭时停止播放。现在我不得不按下''esc''键。我尝试过使用sendkeys,但它不起作用。有什么想法吗?

I have a OLE object that is a wav file and it plays whenever a form is opened. The only catch is that I need it to stop playing when the form is closed. Right now I am having to press the ''esc'' key. I''ve tried using sendkeys, but it doesn''t work. Any ideas?

展开 | 选择 | Wrap | 行号

推荐答案

您是否在询问如何阻止声音继续,或者您是询问代码在窗体关闭时如何运行?
Are you asking how to stop your sound from continuing, or are you asking how the code can run when the form is closed?


你总是可以在表单上放一个关闭按钮。
You can always put a Close button on your form.


我总是建议使用 Form_Close()事件过程,代替任何特定的关闭按钮,以处理结束逻辑。这当然并不意味着不提供一个,只是那里唯一的代码应该是:
I always recommend using the Form_Close() event procedure, in place of any specific Close button, to handle closing logic. This certainly doesn''t mean not to provide one, simply that the only code in there should be :
展开 | 选择 | Wrap | 行号


这篇关于OLE对象wav的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆