Console.WriteLine(" Stop Alarm? Enter Q")
Dim input As String = Console.ReadLine()
If input.Equals("Y") Or input.Equals("y") Then
Return
Else
If input.Equals("N") Or input.Equals("n") Then
CType(sender, AlarmClock).SnoozePressed = True
Return
Else
CType(sender, AlarmClock).Stop = True
Return
End If
End If
End If
Else
Console.WriteLine(" Let alarm ring? Enter Y")
Console.WriteLine(" Stop Alarm? Enter Q")
Dim input As String = Console.ReadLine()
If input.Equals("Y") Or input.Equals("y") Then
Return
Else
CType(sender, AlarmClock).Stop = True
Return
End If
End If
End Sub
End Class
' The driver class that hooks up the event handling method of
' WakeMeUp to the alarm event of an Alarm object using a delegate.
' In a forms-based application, the driver class is the
' form.
'
Public Class AlarmDriver
Public Shared Sub Main()
' Instantiates the event receiver.
Dim w As New WakeMeUp()
' Instantiates the event source.
Dim clock As New AlarmClock()
' Wires the AlarmRang method to the Alarm event.
AddHandler clock.Alarm, AddressOf w.AlarmRang
clock.Start()
End Sub
End Class
End Namespace
vb.net怎样设置ie浏览器的代理服务器地址建议vb.net事件代理你使用注册表vb.net事件代理的API进行修改
封装两个NET函数给vb.net事件代理你
private string GetReg(string RegPath)取得注册表项内容
{
string str="";
RegistryKey hkml = Registry.LocalMachine;
RegistryKey software = hkml.OpenSubKey("SOFTWARE",true);
RegistryKey aimdir = software.OpenSubKey("krabs",true);
if (aimdir != null)
{
if (aimdir.GetValue(RegPath) != null)
str = aimdir.GetValue(RegPath).ToString();
if (str != null)
return str;
return null;
}
return null;
}
private bool SetReg(string RegPath,string Data)//设置注册表内容
{
RegistryKey reg = Registry.LocalMachine;
RegistryKey software = reg.OpenSubKey("SOFTWARE", true);
RegistryKey aimdir1 = software.CreateSubKey("krabs");
if (aimdir1 == null)
return false;
aimdir1.SetValue(RegPath, Data);
return true;
}
【vb.net事件代理的简单介绍】关于vb.net事件代理和的介绍到此就结束了,不知道你从中找到你需要的信息了吗 ?如果你还想了解更多这方面的信息 , 记得收藏关注本站 。
推荐阅读
- 智慧电商如何盈利,电商企业发展智慧物流的原因
- oracle怎么删表的一行,oracle删除一行语句
- 怎么查热门收藏视频号内容,怎样查找收藏的视频号
- 直播背景素材复古暗影,直播背景素材复古暗影
- go语言有什么特点 go语言有什么特点和功能
- 华为路由器x1怎么设置,华为路由器x1怎么设置网络
- 酒吧营销如何勾搭,酒吧营销如何勾搭顾客
- 钉钉线上直播使用指南要求,钉钉直播条件
- go语言后端结构 go语言类型后置