国庆来临,画一面五星红旗,祝愿祖国繁荣昌盛
'五星红旗(献给祖国56岁生日)
Private Sub Form_Load()
Dim i As Integer
With Me
.Move Screen.Width * 0.1, Screen.Height * 0.1, Screen.Width * 0.8, Screen.Height * 0.8
.AutoRedraw = True
.BackColor = vbRed
.ForeColor = vbYellow
.Caption = "五星红旗"
.Icon = LoadPicture("")
For i = 0 To 4
.CurrentX = Array(0.01, 0.25, 0.35, 0.35, 0.25)(i) * Me.Width
.CurrentY = Array(0.05, 0, 0.13, 0.32, 0.45)(i) * Me.Height
.FontSize = Array(150, 50, 50, 50, 50)(i)
Print Chr(&HA1EF)
Next
End With
End Sub本文引用地址: http://blog.csdn.net/northwolves/services/trackbacks/486053.aspx
'五星红旗(献给祖国56岁生日)
Private Sub Form_Load()
Dim i As Integer
With Me
.Move Screen.Width * 0.1, Screen.Height * 0.1, Screen.Width * 0.8, Screen.Height * 0.8
.AutoRedraw = True
.BackColor = vbRed
.ForeColor = vbYellow
.Caption = "五星红旗"
.Icon = LoadPicture("")
For i = 0 To 4
.CurrentX = Array(0.01, 0.25, 0.35, 0.35, 0.25)(i) * Me.Width
.CurrentY = Array(0.05, 0, 0.13, 0.32, 0.45)(i) * Me.Height
.FontSize = Array(150, 50, 50, 50, 50)(i)
Print Chr(&HA1EF)
Next
End With
End Sub本文引用地址: http://blog.csdn.net/northwolves/services/trackbacks/486053.aspx
解决方案 »
- VB中的label 如何可以换行?
- 一个递归算法,错在哪里,请高手进来指点,谢谢!
- VB调用Excel时除错的问题,有人见过吗
- VB中DataGrid问题:我想在DataGrid上直接添加时总出现错误,急!
- 用dll封装数据库,只要懂的人都进来帮我看看!
- 我的PC每个分区都有了\System Volume Information\的文件夹
- 如何在win98系统里VB6.0环境中使用XP样式的窗体和控键
- innet 猎取网页源码时 整个软件卡在那了
- 关于数据库查询的问题
- 300分,谁能解决这个操作数据库的问题???????
- 救命呀 关于数据库中的问题(来者有分,不够再加)
- 如何通过VB取BIOS时间?
Option Explicit
Private Declare Function BeginPath Lib "gdi32" (ByVal hdc As Long) As Long
Private Declare Function TextOut Lib "gdi32" Alias "TextOutA" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal lpString As String, ByVal nCount As Long) As Long
Private Declare Function EndPath Lib "gdi32" (ByVal hdc As Long) As Long
Private Declare Function PathToRegion Lib "gdi32" (ByVal hdc As Long) As Long
Private Declare Function SetWindowRgn Lib "user32" (ByVal hWnd As Long, ByVal hRgn As Long, ByVal bRedraw As Boolean) As Long
Private Sub Form_Load()
Dim hRgn As Long
Dim longth As Integer
Dim sname As String
Dim sPath As String
Me.WindowState = 2
Me.FontName = "Arial"
Me.FontSize = 50
Me.BackColor = RGB(0, 255, 0)
BeginPath Me.hdc
'sname = user_name
TextOut Me.hdc, 20, 50, "國慶節快樂!", Len(StrConv("國慶節快樂!", vbUnicode))
EndPath Me.hdc
hRgn = PathToRegion(Me.hdc)
SetWindowRgn Me.hWnd, hRgn, TrueEnd Sub