求编写一个表白程序?

求编写一个表白程序?,第1张

JAVA

传说中规范的爱情代码(2010-11-10 21:37:36)

转载

标签:it

private final static DEPOSIT = 100000;

private final static FELLING = 8;

public void love(boy, girl) {

Boolean isMarried = false;

if(boy有房() &&boy有车()) {

doMarry(boy, girl);

isMarried = true;

} else if(girl愿意等()) {

while(!(boy赚钱 > DEPOSIT && girl感情 > FELLING)) {

for(int day=1; day <=365; day++) {

if( day == 情人节 ) {

if(boygivegirl(玫瑰)) {

girl感情++;

} else {

girl感情--;

}

}

if(day == girl生日) {

if( boygivegirl(玫瑰) )

{

girl感情++;

}

else {

girl感情--;

boy拼命赚钱();

}

}

}

if(boy有房() && boy有车()) {

doMarry(boy, girl);

isMarried = true;

break;

}

年龄++;

girl感情--;

}

}

if(!IsMarried) {

girlgoto(another_boy);

}

private void doMarry(boy, girl) {

boyset(nothing);

girl嫁给(boy);

}

打开记事本,把下面的代码给拷贝进去,看情况改字哈``然后保存,最后把txt后缀改为hta,然后就可以运行罗``关闭的话ALT+F4

<html>

<head>

<title>杨清瑶我爱你</title><!--这里是标题-->

<hta:application sysmenu=no scroll=no border=none>

<script language="vbscript">

sub sub1

meclose

end sub

meresizeto 500,410 '这里设置窗口大小,单位为像素

memoveto 260,100 '这里设置窗口位置,单位为像素

windowsettimeout "sub1",100000 '这是设置时间,单位为毫秒,我这里设置为12秒

</script>

<body>

<CENTER>

<FONT style="COLOR:#33FF00; FILTER: shadow(color=black); FONT-FAMILY: 华文彩云; FONT-SIZE: 30pt; LINE-HEIGHT: 150%; WIDTH: 100%"><B>杨清瑶我爱你</B></FONT></CENTER>

<hr>

<style type="text/css">

3dfont { FILTER: glow(color=ffffff,strength=0) shadow(color=cccccc,direction:135); POSITION: relative; WIDTH: 100% }

</style>

<table border="0" width="100%">

<tr>

<td width="100%" class="3dfont"><font color=RED><CENTER> ☆☆☆☆☆☆ 永久通知 ☆☆☆☆☆☆</font>

<br>

<P align=left>

★杨清瑶是世界上最漂亮的姑娘!</B><br><br>

杨清瑶我真的好爱你,真的真的好爱你!</B><br><br>

<MARQUEE>轩辕伊杨 2010125</body>

</html>

#define IdYes 1002

#define IdNo 1003

#define IdStatic 1004

#define IdTimer 1005

#define Width 640

#define Height 480

#define Tick 2000

#include<windowsh>

int x,y;

RECT rdesk;

HINSTANCE hinst;

HWND hyes,hno;

BOOL quit=FALSE;

LRESULT CALLBACK WndProc(HWND hwnd,UINT Message,WPARAM wParam,LPARAM lParam)

{

HDC hdc;

PAINTSTRUCT ps;

RECT rclient;

HBRUSH hbrbkgnd;

static COLORREF c;

static BYTE r,g,b;

switch(Message)

{

case WM_TIMER:

if(IdTimer==LOWORD(wParam))

{

r=(BYTE)(rand()%256);

g=(BYTE)(rand()%256);

b=(BYTE)(rand()%256);

c=RGB(r,g,b);

InvalidateRect(hwnd,NULL,TRUE);

UpdateWindow(hwnd);

}

break;

case WM_PAINT:

hdc=BeginPaint(hwnd,&ps);

hbrbkgnd=CreateSolidBrush(c);

SelectObject(hdc,hbrbkgnd);

GetClientRect(hwnd,&rclient);

FillRect(hdc,&rclient,hbrbkgnd);

DeleteObject(hbrbkgnd);

EndPaint(hwnd,&ps);

break;

case WM_COMMAND:

switch(LOWORD(wParam))

{

case IdYes:

quit=TRUE;

MessageBox(hwnd,TEXT("回答正确,太太太好了!"),TEXT("宝贝"),MB_ICONEXCLAMATION|MB_OK);

SendMessage(hwnd,WM_CLOSE,0,0);

break;

case IdNo:

MessageBox(hwnd,TEXT("回答错误哦,我很生气呢!"),TEXT("宝贝"),MB_ICONEXCLAMATION|MB_OK);

break;

}

break;

case WM_SIZE:

case WM_MOVE:

SetWindowPos(hwnd,HWND_TOPMOST,x,y,Width,Height,SWP_SHOWWINDOW);

break;

case WM_DESTROY:

PostQuitMessage(0);

break;

case WM_CLOSE:

if(quit)

{

KillTimer(hwnd,IdTimer);

DestroyWindow(hwnd);

}

break;

case WM_CREATE:

CreateWindow(TEXT("Static"),

TEXT("请回答:做我女朋友好吗?"),

WS_CHILD|WS_VISIBLE|SS_CENTER,

200,

200,

240,

20,

hwnd,

(HMENU)IdStatic,

hinst,

NULL

);

hyes=CreateWindow(TEXT("Button"),

TEXT("好"),

WS_CHILD|WS_VISIBLE|BS_CENTER,

270,

230,

45,

20,

hwnd,

(HMENU)IdYes,

hinst,

NULL

);

hno=CreateWindow(TEXT("Button"),

TEXT("不好"),

WS_CHILD|WS_VISIBLE|BS_CENTER,

325,

230,

45,

20,

hwnd,

(HMENU)IdNo,

hinst,

NULL

);

SetTimer(hwnd,IdTimer,Tick,NULL);

break;

default:

return DefWindowProc(hwnd,Message,wParam,lParam);

}

return 0;

}

int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR lpCmdLine,int nCmdShow)

{

WNDCLASSEX wc;

HWND hwnd;

MSG msg;

hinst=hInstance;

srand(time(NULL));

memset(&wc,0,sizeof(wc));

wccbSize=sizeof(WNDCLASSEX);

wclpfnWndProc=WndProc;

wchInstance=hInstance;

wchCursor=LoadCursor(NULL,IDC_ARROW);

wchbrBackground=(HBRUSH)(COLOR_WINDOW+1);

wclpszClassName=TEXT("WindowClass");

wchIcon=LoadIcon(NULL,IDI_APPLICATION);

wchIconSm=LoadIcon(NULL,IDI_APPLICATION);

if(!RegisterClassEx(&wc))

{

MessageBox(NULL,TEXT("窗口注册失败!"),TEXT("错误"),MB_ICONEXCLAMATION|MB_OK);

return 0;

}

GetWindowRect(GetDesktopWindow(),&rdesk);

x=(rdeskright-Width)/2;

y=(rdeskbottom-Height)/2,

hwnd = CreateWindowEx(WS_EX_TOPMOST,

TEXT("WindowClass"),

TEXT("I Love You"),

WS_THICKFRAME|WS_VISIBLE,

x,

y,

Width,

Height,

NULL,NULL,hInstance,NULL);

if(NULL==hwnd)

{

MessageBox(NULL,TEXT("窗口创建失败!"),TEXT("错误!"),MB_ICONEXCLAMATION|MB_OK);

return 0;

}

while(GetMessage(&msg,NULL,0,0)>0)

{

TranslateMessage(&msg);

DispatchMessage(&msg);

}

return msgwParam;

}

截图

微信拥抱表白代码可以通过以下步骤来实现:1 打开微信,进入聊天窗口;2 在聊天窗口中输入文本“拥抱”,选中该文本;3 点击输入框下方的“+”符号,选择“表情”功能;4 在表情列表中找到“拥抱”表情,并发送出去。这样,接收者就可以收到你的“拥抱”表白了。另外,微信还提供了一些其他表情,可以根据自己的喜好选择发送。

欢迎分享,转载请注明来源:表白网

原文地址:https://h5.hunlipic.com/biaobai/3106177.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2024-02-05
下一篇2024-02-05

发表评论

登录后才能评论

评论列表(0条)

    保存