vb代码写爱心(vbs表白心形代码复制)

http://www.itjxue.com  2023-03-07 19:58  来源:未知  点击次数: 

你会用Vb编程B编写"爱心"用符号“*”

Private?Sub?form_Click()

Print?Tab(10);?"**";

Print?Tab(20);?"**",

?

Print?Tab(6);?"*";

Print?Tab(14);?"*";

Print?Tab(18);?"*";

Print?Tab(25);?"*",

?

Print?Tab(4);?"*";

Print?Tab(15);?"*";

Print?Tab(17);?"*";

Print?Tab(27);?"*",

?

Print?Tab(3);?"*";

Print?Tab(16);?"*";

Print?Tab(28);?"*",

?

Print?Tab(3);?"*";

Print?Tab(28);?"*",

?

Print?Tab(4);?"*";

Print?Tab(27);?"*",

Print?Tab(5);?"*";

Print?Tab(26);?"*",

Print?Tab(7);?"*";

Print?Tab(24);?"*",

Print?Tab(9);?"*";

Print?Tab(22);?"*",

Print?Tab(11);?"*";

Print?Tab(20);?"*",

Print?Tab(13);?"*";

Print?Tab(17);?"*",

Print?Tab(15);?"*",

End?Sub

hi。。。。

VB编写爱心形状的窗体

你的描述我不是很明白,可以给你个思路!首先找个爱心形状的图片,加载进窗体的picturebox中,调整到合适大小。然后用以下让窗体透明。'设置Me.BorderStyle = 0

Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long

Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long

Private Declare Function SetLayeredWindowAttributes Lib "user32" (ByVal hwnd As Long, ByVal crKey As Long, ByVal bAlpha As Byte, ByVal dwFlags As Long) As Long

Private Const WS_EX_LAYERED = H80000

Private Const GWL_EXSTYLE = (-20)

Private Const LWA_ALPHA = H2

Private Const LWA_COLORKEY = H1

Private Declare Function ReleaseCapture Lib "user32" () As Long

Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long

Private Const WM_NCLBUTTONDOWN = HA1

Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal X As Long, ByVal Y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long

Private Sub Form_Load()

Me.BackColor = HFF0000

Dim rtn As Long

rtn = GetWindowLong(hwnd, GWL_EXSTYLE)

rtn = rtn Or WS_EX_LAYERED

SetWindowLong hwnd, GWL_EXSTYLE, rtn

SetLayeredWindowAttributes hwnd, HFF0000, 0, LWA_COLORKEY

End Sub

VB编写"爱心"用符号“*”

Private?Sub?form_Click()

Print?Tab(10);?"**";

Print?Tab(20);?"**",

Print?Tab(6);?"*";

Print?Tab(14);?"*";

Print?Tab(18);?"*";

Print?Tab(25);?"*",

Print?Tab(4);?"*";

Print?Tab(15);?"*";

Print?Tab(17);?"*";

Print?Tab(27);?"*",

Print?Tab(3);?"*";

Print?Tab(16);?"*";

Print?Tab(28);?"*",

Print?Tab(3);?"*";

Print?Tab(28);?"*",

Print?Tab(4);?"*";

Print?Tab(27);?"*",

Print?Tab(5);?"*";

Print?Tab(26);?"*",

Print?Tab(7);?"*";

Print?Tab(24);?"*",

Print?Tab(9);?"*";

Print?Tab(22);?"*",

Print?Tab(11);?"*";

Print?Tab(20);?"*",

Print?Tab(13);?"*";

Print?Tab(17);?"*",

Print?Tab(15);?"*",

End?Sub

'单击窗口看运行效果 ?看在我这么辛苦的份上 采纳吧

(责任编辑:IT教学网)

更多

推荐windows vista文章