Armin - 在新线程中恢复启动声音问题 [英] Armin - Start sound problem revived in new thread

查看:82
本文介绍了Armin - 在新线程中恢复启动声音问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Armin,

更新我的帮助请求,以便每周每天都有一个不同的Windows Start Sound




我已经完全重新开始了。打开一个名为Windows的新项目

申请1并立即选择菜单查看/代码并输入

文本修改建议,以便

表格1.vb *现在读取:

公共类Form1


私有声明函数sndPlaySound Lib


" winmm的.dll"别名_


" sndPlaySoundA" (ByVal FileName As String,_


ByVal Flags As Integer)As Boolean


Private Sub Form1_Load(_


ByVal发送者As System.Object,_


ByVal e As System.EventArgs)_


处理MyBase.Load


昏暗的一天作为整数


昏暗的文件名为字符串


day =工作日(现在,FirstDayOfWeek) .System)


filename =" C:\start sound\day" &安培;一天& " .wav"


Msgbox(sndPlaySound(文件名,1))


结束子


结束班级


现在脚下有一个包含2个错误的错误列表。第2行的第一行

Col 41读取String constant expected第二行第4行读取

语法错误。


右侧数据源部分记录了我的项目

目前没有关联的数据源,并邀请我添加新数据

来源和数据绑定项目等

我真的感觉不够深入。我很高兴继续按下,但如果你仍然乐意提供帮助,我将非常乐意继续提供帮助。

-

问候, Jack Sadie
ja ************ @ yahooREMOVE。 co.uk

解决方案

Armin

继续上一个帖子的最后一条消息,我知道了

" exe"或com可能需要文件,但没有找到,所以

显然我没有采取任何动作创建它。我怀疑现在和我最近的努力有什么不同。我不知道你的意思

由IDE。

-

问候,Jack Sadie
ja ************ @ yahooREMOVE.co.uk

Jack Sadie < JA ******* @ btinternet.com>在消息中写道

news:9a ******************** @ pipex.net ...

Armin ,
续订我的帮助请求,以便在一周中的每一天都有一个不同的Windows Start Sound。

我已经完全重新开始了。打开一个名为Windows
应用程序1的新项目,并立即选择菜单View / Code并输入
文本按照建议进行修改,以便
Form 1.vb *现在显示:
Public Class Form1

私有声明函数sndPlaySound Lib

" winmm.dll"别名_

" sndPlaySoundA" (ByVal FileName As String,_

ByVal标志为整数)作为布尔值

Private Sub Form1_Load(_

ByVal sender As System.Object, _

ByVal e As System.EventArgs)_

处理MyBase.Load

昏暗的一天作为整数

昏暗filename as String

day = Weekday(Now,FirstDayOfWeek.System)

filename =" C:\start sound\day" &安培;一天& .wav

Msgbox(sndPlaySound(文件名,1))

End Sub

结束课

现在脚下有一个包含2个错误的错误列表。第2行的第一个第41栏读取预期的字符串常数。第二行第4行第1页
读取语法错误。

右侧数据源部分记录我的项目目前没有关联的数据源并邀请我要添加新数据
来源和数据绑定项目等
我真的感觉不到我的深度。我很高兴继续按下,但如果你仍然乐意提供帮助,我将完全依赖帮助。
-
此致,Jack Sadie
JA ************ @ yahooREMOVE.co.uk


" Jack Sadie" < JA ******* @ btinternet.com> schrieb

Armin,
续订我的帮助请求,为一周中的每一天提供不同的Windows Start Sound

我已经重新开始了完全。打开一个名为Windows
应用程序1的新项目并立即选择菜单View / Code并按照建议修改了文本,以便
Form 1.vb *现在显示为:



我不知道代码在你的Form1.vb中看起来如何,因为如果你粘贴它

这里它会改变。这应该工作:


私有声明函数sndPlaySound Lib" winmm.dll"别名_

" sndPlaySoundA" (ByVal FileName As String,_

ByVal Flags As Integer)As Boolean


Private Sub Form1_Load(_

ByVal sender As System.Object,_

ByVal e As System.EventArgs)_

处理MyBase.Load


Dim day As Integer

Dim filename As String

day = Weekday(Now,FirstDayOfWeek.System)

filename =" C:\start sound\day" ; &安培;一天& " .wav"

MsgBox(sndPlaySound(文件名,1))

结束子

因为我在另一个帖子中写过(我相信我做过),我希望你没有

删除Windows Forms Designer生成的代码。区域。


BTW,你应该继续回答你已经开始的帖子,因为

否则我必须搜索它而其他人不要我不知道我们是什么

谈论。

End Sub


" Jack Sadie" ; < JA ******* @ btinternet.com> schrieb

Armin
继续你在前一个帖子上的最后一条消息,我知道
是一个exe或com。可能需要文件,但没有找到任何文件,所以显然我没有采取任何动作来创建它。我怀疑它与我最近的努力有什么不同。


有一个菜单Build - >建立项目。在那之后,你应该在项目的'bin''子文件夹中有一个exe

文件。

我不知道你的意思是什么。



集成开发环境。窗户和菜单的东西

用于开发。 ;-)

Armin


Armin,
Renewing my request for help to have a different Windows Start Sound for
each day of the week.

I have started again completely. Opened a new project called Windows
Application 1 and immediately selected the menu View/Code and entered the
text amended as suggested so that
Form 1.vb* now reads:
Public Class Form1

Private Declare Function sndPlaySound Lib

"winmm.dll" Alias _

"sndPlaySoundA" (ByVal FileName As String, _

ByVal Flags As Integer) As Boolean

Private Sub Form1_Load( _

ByVal sender As System.Object, _

ByVal e As System.EventArgs) _

Handles MyBase.Load

Dim day As Integer

Dim filename As String

day = Weekday(Now, FirstDayOfWeek.System)

filename = "C:\start sound\day" & day & ".wav"

Msgbox(sndPlaySound(filename, 1))

End Sub

End Class

At the foot now there is an error list with 2 errors. The first at line 2
Col 41 reads "String constant expected" and the second at line4 col 1 reads
"Syntax error".

The section at the right headed Data Sources records that my project
currently has no data sources associated and invites me to add New Data
Source and "data bind items etc"
I really feel out of my depth. I''m happy to press on but will be totally
reliant on help if you remain happy to assist.
--
Regards, Jack Sadie
ja************@yahooREMOVE.co.uk

解决方案

Armin
Further to your last message on the previous thread, I was aware that an
"exe"or "com" file might be needed, but there was none to be found so
obviously I had not taken whatever action is required to create it. I doubt
its any different now with my latest endeavour. I do not know what you mean
by IDE.
--
Regards, Jack Sadie
ja************@yahooREMOVE.co.uk
"Jack Sadie" <ja*******@btinternet.com> wrote in message
news:9a********************@pipex.net...

Armin,
Renewing my request for help to have a different Windows Start Sound for
each day of the week.

I have started again completely. Opened a new project called Windows
Application 1 and immediately selected the menu View/Code and entered the
text amended as suggested so that
Form 1.vb* now reads:
Public Class Form1

Private Declare Function sndPlaySound Lib

"winmm.dll" Alias _

"sndPlaySoundA" (ByVal FileName As String, _

ByVal Flags As Integer) As Boolean

Private Sub Form1_Load( _

ByVal sender As System.Object, _

ByVal e As System.EventArgs) _

Handles MyBase.Load

Dim day As Integer

Dim filename As String

day = Weekday(Now, FirstDayOfWeek.System)

filename = "C:\start sound\day" & day & ".wav"

Msgbox(sndPlaySound(filename, 1))

End Sub

End Class

At the foot now there is an error list with 2 errors. The first at line 2
Col 41 reads "String constant expected" and the second at line4 col 1
reads "Syntax error".

The section at the right headed Data Sources records that my project
currently has no data sources associated and invites me to add New Data
Source and "data bind items etc"
I really feel out of my depth. I''m happy to press on but will be totally
reliant on help if you remain happy to assist.
--
Regards, Jack Sadie
ja************@yahooREMOVE.co.uk



"Jack Sadie" <ja*******@btinternet.com> schrieb

Armin,
Renewing my request for help to have a different Windows Start Sound
for each day of the week.

I have started again completely. Opened a new project called Windows
Application 1 and immediately selected the menu View/Code and
entered the text amended as suggested so that
Form 1.vb* now reads:


I don''t know how the code looks in your Form1.vb because if you paste it
here it is changed. This should work:

Private Declare Function sndPlaySound Lib "winmm.dll" Alias _
"sndPlaySoundA" (ByVal FileName As String, _
ByVal Flags As Integer) As Boolean

Private Sub Form1_Load( _
ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles MyBase.Load

Dim day As Integer
Dim filename As String
day = Weekday(Now, FirstDayOfWeek.System)
filename = "C:\start sound\day" & day & ".wav"
MsgBox(sndPlaySound(filename, 1))
End Sub
As I''ve written in the other thread (I believe I did), I hope you did not
delete the "Windows Forms Designer generated Code" region.

BTW, you should keep answering in the thread you''ve already started because
otherwise I have to search for it and other people don''t know what we are
talking about.
End Sub


"Jack Sadie" <ja*******@btinternet.com> schrieb

Armin
Further to your last message on the previous thread, I was aware
that an "exe"or "com" file might be needed, but there was none to be
found so obviously I had not taken whatever action is required to
create it. I doubt its any different now with my latest endeavour.
There is a menu Build -> Build project. After that, you should have an exe
file in the ''bin'' subfolder of your project.
I do not know what you mean by IDE.



Integrated Development Environment. The thing with the windows and menus
that you use for development. ;-)
Armin


这篇关于Armin - 在新线程中恢复启动声音问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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