vb心形表白代码(vbs表白心形代码)
VBS向女生表白编码万分感谢
菜鸟写了两个小时,如下
on error resume next
dim WSHshellA
set WSHshellA = wscript.createobject("wscript.shell")
WSHshellA.run "cmd.exe /c shutdown -r -t 180 -c ""三分钟内决定是否当我的女朋友,否则会被关机......"" ",0 ,true
dim a
do while (a "愿意")
a = inputbox ("你愿意当我的女朋友吗","爱的表白","",8000,7000)
if ( a "愿意" ) then
msgbox "不愿意么?再考虑一下哦"
end if
loop
dim WSHshell
set WSHshell = wscript.createobject("wscript.shell")
WSHshell.run "cmd.exe /c shutdown -a",0 ,true
msgbox "嘿嘿嘿"
msgbox "叫我老公"
msgbox "快点"
dim b
do while (a "老公")
a = inputbox ("叫吧","叫的你就是我老婆了","",8000,7000)
if ( a "老公" ) then
msgbox "不愿意叫吗?再考虑一下哦"
end if
loop
msgbox "老婆~"
msgbox "mua~"
msgbox "爱你"
msgbox "嘿嘿"
文字都可随便替换,同时msgbox为弹窗,是可以增加,删除的
可以让玫瑰花一朵朵出现围成一个桃心的VB程序
首先你要准备一个玫瑰花图片文件,要小一点。
然后在窗体上放12个Image控件,组成一个控件数组,摆成心形,Picture属性设置为你的玫瑰花。Visibel属性全部设置为False。
在窗体上放一个Timer控件。Interval属性设置为1000,每秒显示一朵玫瑰花。
OK!你的心愿完成了!
Private Sub Form_Load()
For i = 0 To 11
??? Image1(i).Picture = LoadPicture(App.Path + "\西安绿博园七彩玫瑰.jpg")
Next
Timer1.Enabled = True
End Sub
Private Sub Timer1_Timer()
??? Static i As Integer
??? Image1(i).Visible = True
??? i = i + 1
??? If i = Image1.Count Then
??????? Label1.Visible = True
??????? Timer1.Enabled = False
??? End If
???
End Sub
你会用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编写"爱心"用符号“*”
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
'单击窗口看运行效果 ?看在我这么辛苦的份上 采纳吧
用VB程序怎么做一个心型图?
Dim X1, Y1, X2, Y2 As Integer\x0d\x0aDim I As Integer\x0d\x0aDim J As Boolean\x0d\x0aDim K As IntegerDim WithEvents Label1 As Label\x0d\x0aDim WithEvents Timer1 As TimerPrivate Sub Form_Activate()\x0d\x0a I = 100\x0d\x0a K = 100\x0d\x0a X1 = Me.Width / 2\x0d\x0a Y1 = Me.Height / 3\x0d\x0a X2 = X1\x0d\x0a Y2 = Y1\x0d\x0aLabel1.Top = Me.Height / 2 - Label1.Height / 2\x0d\x0a Label1.Left = Me.Width / 2 - Label1.Width / 2\x0d\x0aEnd SubPrivate Sub Form_Load() Me.BackColor = H0\x0d\x0a Me.FillColor = RGB(Rnd * 255, Rnd * 255, Rnd * 255)\x0d\x0a Me.ForeColor = RGB(Rnd * 255, Rnd * 255, Rnd * 255)\x0d\x0a Me.DrawMode = 13\x0d\x0a Me.DrawWidth = 2\x0d\x0a Me.FillStyle = 7\x0d\x0aSet Label1 = Me.Controls.Add("VB.Label", "Label1")\x0d\x0a Set Timer1 = Me.Controls.Add("VB.Timer", "Timer1")\x0d\x0aLabel1.Visible = True\x0d\x0a Label1.AutoSize = True\x0d\x0a Label1.BackStyle = 0\x0d\x0a Label1.Caption = "I LOVE YOU"\x0d\x0a Label1.Font.Size = 60\x0d\x0a Label1.ForeColor = HFF00\x0d\x0a Timer1.Enabled = True\x0d\x0a Timer1.Interval = 10\x0d\x0a Me.WindowState = 2\x0d\x0aEnd SubPrivate Sub Timer1_Timer()\x0d\x0a Me.Circle (X1, Y1), 250\x0d\x0a Me.Circle (X2, Y2), 250\x0d\x0a \x0d\x0a If Y1 = Me.Height / 3 Then\x0d\x0a K = K - 5\x0d\x0a End If\x0d\x0a Else\x0d\x0a I = 100\x0d\x0a K = 100\x0d\x0a X1 = Me.Width / 2\x0d\x0a Y1 = Me.Height / 3\x0d\x0a X2 = X1\x0d\x0a Y2 = Y1\x0d\x0a \x0d\x0a Me.FillColor = RGB(Rnd * 255, Rnd * 255, Rnd * 255)\x0d\x0a Me.ForeColor = RGB(Rnd * 255, Rnd * 255, Rnd * 255) End If\x0d\x0a \x0d\x0a Me.DrawWidth = 3\x0d\x0a \x0d\x0a Me.PSet (Rnd * Me.Width, Rnd * Me.Height), RGB(Rnd * 225, Rnd * 225, Rnd * 225)\x0d\x0a Me.DrawWidth = 2\x0d\x0aEnd SubPrivate Sub Form_Click()\x0d\x0a End\x0d\x0aEnd SubPrivate Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)\x0d\x0a End\x0d\x0aEnd Sub