vb.net窗体渐入减出 vbs窗体
帮忙用vb.net写程序?急着用的。帮帮忙
这个程序很简单,我以前做过算素数的,算随机十以内的用来教我一个小叔子的儿子,你看看VB基础就可以写的出了,如果碰到代码问题可以找人帮忙,但是如果你单独让人来代写那么不是很现实,好像知道貌似没有帮代做单独软件的吧
创新互联建站是一家朝气蓬勃的网站建设公司。公司专注于为企业提供信息化建设解决方案。从事网站开发,网站制作,网站设计,网站模板,微信公众号开发,软件开发,微信小程序开发,十载建站对雨棚定制等多个行业,拥有丰富的网站制作经验。
vb.net 如何使文字能渐变颜色,就是颜色慢慢变淡然后在慢慢恢复?
也容易,如果是黑白三个颜色加上相同的渐变量,彩色的是起始颜色的三个分量与终止颜色的对应三个分量的差值,再除于相同的份数,就得出三原色各自的步进量。
窗体上放个图片框试试下面代码:
Private Sub PictureBox1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles PictureBox1.Paint
Dim startColor As Color = Color.Red
Dim endColor As Color = Color.Green
Dim s As String = "vb.net 如何使文字能渐变颜色,就是颜色慢慢变淡然后在慢慢恢复?"
Dim Steps As Integer = s.Length \ 2
Dim StepR As Integer = (CInt(endColor.R) - startColor.R) \ Steps
Dim StepG As Integer = (CInt(endColor.G) - startColor.G) \ Steps
Dim StepB As Integer = (CInt(endColor.B) - startColor.B) \ Steps
Dim R As Integer = startColor.R
Dim G As Integer = startColor.G
Dim B As Integer = startColor.B
Dim drawFont As New System.Drawing.Font("Arial", 16)
Dim X As Integer = 50
For i As Integer = 1 To Steps
Dim drawBrush As New SolidBrush(Color.FromArgb(R, G, B))
e.Graphics.DrawString(s.Substring(i - 1, 1), drawFont, drawBrush, X, 50.0)
X += 18
R += StepR
G += StepG
B += StepB
Next
For i As Integer = 1 To Steps
Dim drawBrush As New SolidBrush(Color.FromArgb(R, G, B))
e.Graphics.DrawString(s.Substring(i + Steps - 1, 1), drawFont, drawBrush, X, 50.0)
X += 18
R -= StepR
G -= StepG
B -= StepB
Next
End Sub
vb.net用按钮控制字体加减
怎么会了,你有没有双击“windows窗体”选项卡中的“FontDialog"控件啊!要是双击过了就会在编辑的框下面出现“FontDialog1”,那么在一个按钮内输入
private
sub
button1_click(.....)
FontDialog1.showDialog()
richtextbox1,selectionfont=FontDialog1.font
end
sub
就这样吧,有什么疑问,可以再问我!
分享题目:vb.net窗体渐入减出 vbs窗体
标题路径:http://pwwzsj.com/article/ddosdoj.html