picture-stream-picture

Dim img As Image = pb1.Image Dim mstream As IO.MemoryStream = New IO.MemoryStream() img.Save(mstream, System.Drawing.Imaging.ImageFormat.Bmp) Dim buffer() As Byte = New Byte(mstream.Length) {} mstream.Position = 0 mstream.Read(buffer, 0, buffer.L...
2008-06-19 16:49 | 阅读 3023 次 | 评论 0 条

VB中的换行方法

vbCrLf Chr(13)
2008-01-04 15:32 | 阅读 1378 次 | 评论 0 条

Alt+F4

1.Alt+F4强行退出程序后,在程序中仍然执行Closed事件.所以如果想加处理可以在Closed方法中加.2.在任务管理器中关闭应用程序和平Alt+F4的功能一样.3.在任务管理器中关闭进程不会执行Closed事件.
2007-11-15 21:14 | 阅读 1245 次 | 评论 0 条

VB类型转换

VB类型转换1。CType(expression,typename) 只要合理就可以转换2。DirectCast(expression,typename) 两种类型之间必须具有继承或实现关系3。TryCast(expression,typename) 不会引发错误,如果类型不匹配则返回nothing,适用于引用类型,并且两种类型之间必须具有继承或实现关系
2007-09-19 17:06 | 阅读 3136 次 | 评论 0 条

获取键盘鼠标信息的方法

Public Class Form1 Public loop1 As Boolean = True Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim pMousePos As Point While loop1 System.Windows.Forms.Application.DoEvents() pMousePos = Control.MousePosition Select Case Contro...
2007-09-19 16:56 | 阅读 1370 次 | 评论 0 条
浏览67910次