level 9
难道没人想聊聊这方面或者其他的?一有时间就苦逼自己自个摸索来学习net里的东西,我相信网上能有的资源并不多,实例是个很重要的东西。为什么不聊聊用法,或者自己有什么不明白的地方也可以发表出来——大家来共同讨论嘛。汇聚起来的大火总比分散的小火好嘛
2013年03月18日 15点03分
4
level 1
从来没数过,VB.NET里有简单的统计方法吗?总不会要复制到WORD里,把空行都替换掉,然后看统计吧?
另外,也不能以代码行数说事,要比的话应该比实现个什么功能。
就比如字符串操作,要把小写都换成大写,有的人自己写了一个for循环,然后一个字符一个字符的判断,可有的人就直接用String里现成的方法一句带过。再比如老师留作业让做个银行家算法。有的人只做个的函数给老师看,而有的人却把每一次操作,每一次比较都用动画的形式演示给老师看。这其中的差别是很大的。
2013年03月21日 09点03分
7
右下角有显示行数和列数
2013年03月21日 10点03分
不简单的字符串处理,其中用的函数是Strings模块里的,没有用上绘制函数,总共是500多行;要是你来写个这样的函数,大概会花费多少时间?
2013年03月21日 14点03分
回复 OneStep7 :我现在写的这个模块还没写完,目前总共1463行,空行大概得有200吧,这个模块创建到现在刚好5天整,但其中,看动漫花去1天多,做别的模块花了1整天,剩下的时间一半花在查资料上,一半花在写程序上。所以速度应该和你差不多吧。
2013年03月21日 15点03分
回复 OneStep7 :真正费时间的地方是调试。比如我这个模块,因为要与网络信息互动,一个完整的流程跑下来要一个多月的时间,刚编出来的程序问题也肯定少不了,到时候还不知道得调试多久呢。
2013年03月21日 15点03分
level 9
发个简单的渐变按钮,用户控件
Imports System.IO
Imports System.Text
Public Class MyButton
Inherits Windows.Forms.UserControl
Private Function mydraw(ByVal image As Bitmap, ByVal result_bm As Bitmap, ByVal ALPHA As Integer, ByVal x As Integer, ByVal y As Integer)
Dim watermark_bm As Bitmap = image
Dim clr As Color
For py As Integer = 0 To watermark_bm.Height - 1
For px As Integer = 0 To watermark_bm.Width - 1
clr = watermark_bm.GetPixel(px, py)
If clr <> Color.FromArgb(0, 0, 0, 0) Then
watermark_bm.SetPixel(px, py, Color.FromArgb(ALPHA, clr.R, clr.G, clr.B))
End If
Next px
Next py
Dim a As Bitmap = result_bm
Dim gr As Graphics = Graphics.FromImage(a)
gr.DrawImage(watermark_bm, New Rectangle(0, 0, x, y))
Return a End Function Public Event Click(sender As Object, e As EventArgs)
Public WithEvents timer1 As New Timer
Public WithEvents timer2 As New Timer
Public mypics1(15) As Stream
Public num As Integer = 0
Public num2 As Integer = 0
Public WithEvents mybutton As New PictureBox
Public mypic1 As Bitmap
Public mypic2 As Bitmap
Public Zhenshu As Integer = 15
Public Property Zhennum() As Integer
Get
Return Zhenshu
End Get
Set(ByVal value As Integer)
Zhenshu = value
End Set
End Property
Public Property Timertick As Integer
Get
Return timer1.Interval
End Get
Set(ByVal value As Integer)
timer1.Interval = value
timer2.Interval = value
End Set
End Property
Public Property Picture1() As Bitmap
Get
Return mypic1
End Get
Set(ByVal value As Bitmap)
mypic1 = value
End Set End Property
Public Property Picture2() As Bitmap
Get
Return mypic2
End Get
Set(ByVal value As Bitmap)
mypic2 = value
End Set
End Property
Private Sub PictureBox1_MouseEnter(sender As Object, e As EventArgs) Handles PictureBox1.MouseEnter
timer1.Start()
End Sub
Private Sub PictureBox1_Mouseleave(sender As Object, e As EventArgs) Handles PictureBox1.MouseLeave
timer2.Start()
End Sub
Private Sub MyButton_Load(sender As Object, e As EventArgs) Handles MyBase.Load
On Error Resume Next
PictureBox1.Image = mypic1
Me.Size = mypic1.Size
ReDim mypics1(Zhenshu - 1)
For i = 0 To Zhenshu - 1 Step 1
Dim temp As Bitmap = mydraw(mypic1, mypic2, i * (255 / Zhenshu), mypic1.Width, mypic1.Width)
Dim ms As New System.IO.MemoryStream
temp.Save(ms, System.Drawing.Imaging.ImageFormat.Bmp)
mypics1(i) = ms
Next
End Sub
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles timer1.Tick On Error Resume Next
Dim a As Bitmap = Bitmap.FromStream(mypics1(15 - num))
PictureBox1.Image = a
num = num + 1
If num = Zhenshu Then
num = 0
timer1.Stop()
End If
End Sub
Private Sub Timer2_Tick(sender As Object, e As EventArgs) Handles timer2.Tick
On Error Resume Next
Dim a As Bitmap = Bitmap.FromStream(mypics1(num2))
PictureBox1.Image = a
num2 = num2 + 1
If num2 = Zhenshu Then
num2 = 0
timer2.Stop()
End If
End Sub
Private Sub PictureBox1_Click(sender As Object, e As EventArgs) Handles PictureBox1.Click, MyBase.Click
RaiseEvent Click(sender, e)
End Sub
End Class
2013年03月23日 11点03分
10
level 9
器内部流通不外发
ht去掉tp://w去掉ww.2a去掉ia.com/thre去掉ad-57597去掉-1-1.去掉html
2013年03月24日 04点03分
15