当前位置:首页 » 游戏类别 » 电脑壁纸小游戏代码

电脑壁纸小游戏代码

发布时间: 2022-12-24 03:20:00

A. pascal能够调用电脑中图片制作彩色程序吗

http://upload.programfan.com/upfile/200702241053371.zip
(该程序必须在使用了CRT UNIT补丁的Turbo Pascal上运行)
我自己用pascal写的几个小游戏,其中的纸牌和泡泡龙调用了16色的bmp图片
你可以参考一下.
理论上Pascal可以调用所有图片类型,但只能通过低级代码来自行书写
而且显示时Pascal(Turbo)为16色的.

感谢UpLoad.ProgramFan.com的网络空间

B. 新UI怎么把电脑里的图片弄到游戏背景里

之前实现了在figure上把图片做为背景,现在实现在Guide上实现。
其实很简单,就是在Fcn的地方添加以下代码:
ha=axes(;units;,;normalized;,;position;,[0 0 1 1]);
uistack(ha,;down;)
II=imread(;禾木01.bmp;);
image(II)
colormap gray
set(ha,;handlevisibility;,;off;,;visible;,;off;);
另外如果要把那些按钮等的背景也改变,也是在此处添加相应代码就可。
比如下面代码把按钮的背景改变了(此方法已有人在论坛发过帖子,请自己搜索):
I=imread(;buttoncdata.bmp;);
set(handles.pushbutton1,;cdata;,I);

C. 我变了一个推箱子的代码,可不知道如何加入图片和音乐,请求高人指点

推箱子小游戏代码,包含音乐,换图功能,同时可以进行鼠标或键盘操作-Sokoban game code, including music, for map features, at the same time can be a mouse or keyboard operation
[MoveNut.rar] - 推箱子游戏,无密码可解压。 经典游戏一个,欢迎大家下载。
[tftp_server_linux.rar] - linux下的tftp源代码,比较经典的一个,好东西大家分享
[ProxyService.rar] - 用socket做的代理程序,对于外网连内网很有用
[tuixz.rar] - 这个程序基本实现了推箱子的所有功能,加入了背景音乐,有5首背景音乐可供 选择,并可以跳关、选关等,并且可以无限悔步,一直悔到当前关卡的开始状态。
[mine60.rar] - Java推箱子游戏(一共有50关卡,带好听的音效),完整版源码,图形界面,看上去够专业。界面和泡泡堂游戏有点相似,学习游戏编程的JAVA朋友值得一看。

D. 用VB制作拼图游戏,求代码

Dim a(0 To 5) As Integer

Private Sub crearnd() '随机分配分割后的图片
Randomize
For i = 0 To 5
a(i) = Int(Rnd * 6)
If i >= 2 Then
For j = 0 To i - 1
If a(j) = a(i) Then
i = i - 1
End If
Next
End If
Next
End Sub

Private Sub Form_Load()
For i = 0 To 5
Picture2(i).Width = Picture1.Width / 3
Picture2(i).Height = Picture1.Height / 2
Next i
End Sub

Private Sub spi_CLICK()
crearnd
Picture2(a(0)).PaintPicture Picture1.Picture, 0, 0, Picture1.ScaleWidth / 3, Picture1.ScaleHeight / 2, 0, 0, Picture1.ScaleWidth / 3, Picture1.ScaleHeight / 2
Picture2(a(1)).PaintPicture Picture1.Picture, 0, 0, Picture1.ScaleWidth / 3, Picture1.ScaleHeight / 2, Picture1.ScaleWidth / 3, 0, Picture1.ScaleWidth / 3, Picture1.ScaleHeight / 2
Picture2(a(2)).PaintPicture Picture1.Picture, 0, 0, Picture1.ScaleWidth / 3, Picture1.ScaleHeight / 2, 2 * Picture1.ScaleWidth / 3, 0, Picture1.ScaleWidth / 3, Picture1.ScaleHeight / 2
Picture2(a(3)).PaintPicture Picture1.Picture, 0, 0, Picture1.ScaleWidth / 3, Picture1.ScaleHeight / 2, 0, Picture1.ScaleHeight / 2, Picture1.ScaleWidth / 3, Picture1.ScaleHeight / 2
Picture2(a(4)).PaintPicture Picture1.Picture, 0, 0, Picture1.ScaleWidth / 3, Picture1.ScaleHeight / 2, Picture1.ScaleWidth / 3, Picture1.ScaleHeight / 2, Picture1.ScaleWidth / 3, Picture1.ScaleHeight / 2
Picture2(a(5)).PaintPicture Picture1.Picture, 0, 0, Picture1.ScaleWidth / 3, Picture1.ScaleHeight / 2, 2 * Picture1.ScaleWidth / 3, Picture1.ScaleHeight / 2, Picture1.ScaleWidth / 3, Picture1.ScaleHeight / 2
Picture2(0).Move Picture1.Width, 0
Picture2(1).Left = Picture1.Width + Picture2(0).Width: Picture2(1).Top = 0
Picture2(2).Left = Picture1.Width + Picture2(0).Width + Picture2(1).Width: Picture2(2).Top = 0
Picture2(3).Left = Picture1.Width: Picture2(3).Top = Picture2(0).Height
Picture2(4).Left = Picture1.Width + Picture2(3).Width: Picture2(4).Top = Picture2(1).Height
Picture2(5).Left = Picture1.Width + Picture2(3).Width + Picture2(4).Width: Picture2(5).Top = Picture2(2).Height
End Sub

Private Sub Picture2_DragDrop(index As Integer, Source As Control, X As Single, Y As Single)
Dim PIC As StdPicture
Set PIC = Source.Image
Set Source.Picture = Picture2(index).Image
Set Picture2(index).Picture = PIC
End Sub
在窗体上建立一个picture1和一个picture2(index)控件数组,总共包含6个图片框,然后给所有的图片框的autoredraw属性设置为true,就ok了,费了我好的劲,有问题再给我说
至于你要求的界面,我没看见你的图啊

已经发送,请查收

E. 请问java游戏怎么加入一个背景图。请给我代码。谢谢

你说的如果是java swing程序,有两种方法,1、JPanel上放背景;2、JLabel放背景

//初始化窗口
publicvoidinitFrame(){
//利用JPanel添加背景图片

GImage=newJPanel(){

protectedvoidpaintComponent(Graphicsg){
ImageIconicon=newImageIcon("image\benbenla.jpg");
Imageimg=icon.getImage();
g.drawImage(img,0,0,icon.getIconWidth(),
icon.getIconHeight(),icon.getImageObserver());
jframe.setSize(icon.getIconWidth(),icon.getIconHeight());

}

};
jframe.setTitle("测试背景图片");
jframe.add(GImage);
jframe.pack();
jframe.setVisible(true);
jframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

}
ImageIconicon=newImageIcon("image\benbenla.jpg");
icon.setImage(icon.getImage().getScaledInstance(icon.getIconWidth(),
icon.getIconHeight(),Image.SCALE_DEFAULT));
System.out.println(icon.getIconHeight()+""+icon.getIconWidth());
jlpic.setBounds(0,0,1366,768);
jlpic.setHorizontalAlignment(0);
jlpic.setIcon(icon);
jframe.setSize(1366,768);
jframe.add(jlpic);
jframe.pack();
jframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
jframe.setVisible(true);

F. 求java小游戏源代码

[最佳答案] 连连看java源代码 import javax.swing.*; import java.awt.*; import java.awt.event.*; pu... int x0=0,y0=0,x=0,y=0,fristMsg=0,secondMsg=0,validateLV; //游戏按钮的位...

G. 电脑代码壁纸怎么设置

你首先找到这样的图片,再网上下一个,然后右键将该图片设置为壁纸

H. steam壁纸引擎代码怎么执行的

Steam上的Wallpaper Engine(桌面引擎),提供了桌面动态壁纸(3D,视频,Web页面)的商店功能,用户可以出售或购买壁纸,而且它占用的内存小,可根据系统运行的程序进行自动调节。
操作方法

01
安装Steam在steampowered网站上现在Steam安装包,下载完成后直接运行SteamSetup.exe文件进行软件安装,安装完成后后运行Steam,系统会自动联网进行下载更新。

02
创建Steam账号后登陆Steam,在商店搜索Wallpaper Engine,该软件需要18元人民币

03
通过搜索引擎搜索并下载 Wallpaper Engine破解版本进行安装,下载后运行对应的程序,如果提示缺少dll文件,只需要将对应的dll下载,解压后放在系统目录下,不同系统类型的电脑系统目录位置不同:64位系统的,将下载好的.dll文件放在 C:\Windows\SysWOW64目录;32位系统的,将下载好的.dll文件放在 C:\Windows\System32

04
打开Wallpaper Engine程序:wallpaper3.exe,选择左边的背景图作为桌面背景,同时可以设置回放速度和主题颜色,确认设置后可以返回桌面可以看到动态的桌面图案

05
打开外部视频文件作为桌面背景,这里我选择“使命召唤2”的视频作为桌面背景

I. C语言制作小游戏时怎么添加图片音乐,代码怎么打

添加音乐还是比较麻烦的
一个简单的思路是
先找一个开源的播放器代码
或者直接搞一个播放器接口的库
然后
把背景音乐存成文件,
在打开游戏的时候
创建线程进行播放。
代码编写:
PlaySound
The
PlaySound
function
plays
a
sound
specified
by
the
given
filename,
resource,
or
system
event.
(A
system
event
may
be
associated
with
a
sound
in
the
registry
or
in
the
WIN.INI
file.)

BOOL
PlaySound(

LPCSTR
pszSound,

HMODULE
hmod,

DWORD
fdwSound

);

Parameters
pszSound
A
string
that
specifies
the
sound
to
play.
If
this
parameter
is
NULL,
any
currently
playing
waveform
sound
is
stopped.
To
stop
a
non-waveform
sound,
specify
SND_PURGE
in
the
fdwSound
parameter.
Three
flags
in
fdwSound
(SND_ALIAS,
SND_FILENAME,
and
SND_RESOURCE)
determine
whether
the
name
is
interpreted
as
an
alias
for
a
system
event,
a
filename,
or
a
resource
identifier.
If
none
of
these
flags
are
specified,
PlaySound
searches
the
registry
or
the
WIN.INI
file
for
an
association
with
the
specified
sound
name.
If
an
association
is
found,
the
sound
event
is
played.
If
no
association
is
found
in
the
registry,
the
name
is
interpreted
as
a
filename.

hmod
Handle
of
the
executable
file
that
contains
the
resource
to
be
loaded.
This
parameter
must
be
NULL
unless
SND_RESOURCE
is
specified
in
fdwSound.
fdwSound
Flags
for
playing
the
sound.
The
following
values
are
defined:
SND_APPLICATION
The
sound
is
played
using
an
application-specific
association.
SND_ALIAS
The
pszSound
parameter
is
a
system-event
alias
in
the
registry
or
the
WIN.INI
file.
Do
not
use
with
either
SND_FILENAME
or
SND_RESOURCE.
SND_ALIAS_ID
The
pszSound
parameter
is
a
predefined
sound
identifier.
SND_ASYNC
The
sound
is
played
asynchronously
and
PlaySound
returns
immediately
after
beginning
the
sound.
To
terminate
an
asynchronously
played
waveform
sound,
call
PlaySound
with
pszSound
set
to
NULL.
SND_FILENAME
The
pszSound
parameter
is
a
filename.
SND_LOOP
The
sound
plays
repeatedly
until
PlaySound
is
called
again
with
the
pszSound
parameter
set
to
NULL.
You
must
also
specify
the
SND_ASYNC
flag
to
indicate
an
asynchronous
sound
event.
SND_MEMORY
A
sound
event's
file
is
loaded
in
RAM.
The
parameter
specified
by
pszSound
must
point
to
an
image
of
a
sound
in
memory.
SND_NODEFAULT
No
default
sound
event
is
used.
If
the
sound
cannot
be
found,
PlaySound
returns
silently
without
playing
the
default
sound.
SND_NOSTOP
The
specified
sound
event
will
yield
to
another
sound
event
that
is
already
playing.
If
a
sound
cannot
be
played
because
the
resource
needed
to
generate
that
sound
is
busy
playing
another
sound,
the
function
immediately
returns
FALSE
without
playing
the
requested
sound.
If
this
flag
is
not
specified,
PlaySound
attempts
to
stop
the
currently
playing
sound
so
that
the
device
can
be
used
to
play
the
new
sound.

SND_NOWAIT
If
the
driver
is
busy,
return
immediately
without
playing
the
sound.
SND_PURGE
Sounds
are
to
be
stopped
for
the
calling
task.
If
pszSound
is
not
NULL,
all
instances
of
the
specified
sound
are
stopped.
If
pszSound
is
NULL,
all
sounds
that
are
playing
on
behalf
of
the
calling
task
are
stopped.
You
must
also
specify
the
instance
handle
to
stop
SND_RESOURCE
events.

SND_RESOURCE
The
pszSound
parameter
is
a
resource
identifier;
hmod
must
identify
the
instance
that
contains
the
resource.
SND_SYNC
Synchronous
playback
of
a
sound
event.
PlaySound
returns
after
the
sound
event
completes.
Return
Values
Returns
TRUE
if
successful
or
FALSE
otherwise.

Remarks
The
sound
specified
by
pszSound
must
fit
into
available
physical
memory
and
be
playable
by
an
installed
waveform-audio
device
driver.
PlaySound
searches
the
following
directories
for
sound
files:
the
current
directory;
the
Windows
directory;
the
Windows
system
directory;
directories
listed
in
the
PATH
environment
variable;
and
the
list
of
directories
mapped
in
a
network.
For
more
information
about
the
directory
search
order,
see
the
documentation
for
the
OpenFile
function.

If
it
cannot
find
the
specified
sound,
PlaySound
uses
the
default
system
event
sound
entry
instead.
If
the
function
can
find
neither
the
system
default
entry
nor
the
default
sound,
it
makes
no
sound
and
returns
FALSE.

QuickInfo

Windows
NT:
Requires
version
3.1
or
later.

Windows:
Requires
Windows
95
or
later.

Windows
CE:
Unsupported.

Header:
Declared
in
mmsystem.h.

Import
Library:
Use
winmm.lib.

Unicode:
Implemented
as
Unicode
and
ANSI
versions
on
Windows
NT.

See
Also
Waveform
Audio
Overview,
Waveform
Functions

J. 如何将swf文件做电脑壁纸

将swf文件做成电脑壁纸的方法:
1、建立内嵌Flash动画的超文本文件。如:flash.htm
打开记事本,输入以下代码:
<html>
<body>
<embed src"flash.swf" width=1024 height=768>
</embed><br>
</body>
</html>
其中:width=1024 height=768 分别代表内嵌网面的Flash动画文件显示的宽度和高度。Flash.swf是代表该Flash动画文件名。这些参数和名称可以根据用户的屏幕设置情况和Flash文件情况有所改变。确认原代码无误后,将这个纯文本文件以文件名后辍为HTM或HTML的形式保存起来,最好用浏览器打开这个文件,看看浏览器中否正常显示Flash动画。
2、将内嵌Flash动画文件的超文本设置为活动桌面
右击桌面然后点击“属性”,再点击web选项卡,确认已选中按"web页方式查看活动桌面"复选框。再点击“背景”选项卡,点击“浏览”定位刚才创建的超文本文件地址,然后点“确定”按钮。这样桌面就形成了。

热点内容
绝地求生未来之役比赛为什么进不去 发布:2023-08-31 22:07:08 浏览:1456
dota2位置什么意思 发布:2023-08-31 22:00:04 浏览:896
lol电竞是什么样子 发布:2023-08-31 21:58:40 浏览:1357
绝地求生八倍镜的那个圆圈怎么弄 发布:2023-08-31 21:58:31 浏览:1445
lol龙龟一个多少金币 发布:2023-08-31 21:55:07 浏览:805
王者如何改游戏内名称 发布:2023-08-31 21:55:06 浏览:1090
游戏主播打广告是什么意思 发布:2023-08-31 21:55:06 浏览:1788
绝地求生如何免费拿到ss7赛季手册 发布:2023-08-31 21:52:13 浏览:973
pgg是哪个国家的战队lol 发布:2023-08-31 21:52:07 浏览:855
一个人的时候才发现游戏很没意思 发布:2023-08-31 21:49:24 浏览:1490