请各位大虾帮忙,一个简单的图片代换~! Picture1.Picture = LoadPicture(App.Path + "\a.jpg") 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 把pufeng_999(小灰狼)给出的代码放到按钮的click事件里app.path是程序所在路径,如果程序在根目录下,后面的"\a.jpg"就该写成"a.jpg" 如果你对语言不懂的那么我贴代码也是白贴新建一个文本把以下内容贴进去然后把它改名为Form1.frmVERSION 5.00Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "Comdlg32.ocx"Begin VB.Form Form1 Caption = "Form1" ClientHeight = 3195 ClientLeft = 60 ClientTop = 345 ClientWidth = 4680 LinkTopic = "Form1" ScaleHeight = 3195 ScaleWidth = 4680 StartUpPosition = 3 '窗口缺省 Begin MSComDlg.CommonDialog CommonDialog1 Left = 465 Top = 2145 _ExtentX = 847 _ExtentY = 847 _Version = 393216 End Begin VB.PictureBox Picture1 Height = 1395 Left = 270 ScaleHeight = 1335 ScaleWidth = 4155 TabIndex = 1 Top = 270 Width = 4215 End Begin VB.CommandButton Command1 Caption = "Command1" Height = 495 Left = 1695 TabIndex = 0 Top = 2085 Width = 1215 EndEndAttribute VB_Name = "Form1"Attribute VB_GlobalNameSpace = FalseAttribute VB_Creatable = FalseAttribute VB_PredeclaredId = TrueAttribute VB_Exposed = FalseOption ExplicitPrivate Sub Command1_Click()CommonDialog1.ShowOpenPicture1.Picture = LoadPicture(CommonDialog1.FileName)End Sub然后再新建一个文本把以下再贴,然后再改名为工程1.vbpType=ExeForm=Form1.frmReference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#D:\WINNT\System32\Stdole2.tlb#OLE AutomationObject={F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0; Comdlg32.ocxStartup="Form1"Command32=""Name="工程1"HelpContextID="0"CompatibleMode="0"MajorVer=1MinorVer=0RevisionVer=0AutoIncrementVer=0ServerSupportFiles=0CompilationType=0OptimizationType=0FavorPentiumPro(tm)=0CodeViewDebugInfo=0NoAliasing=0BoundsCheck=0OverflowCheck=0FlPointCheck=0FDIVCheck=0UnroundedFP=0StartMode=0Unattended=0Retained=0ThreadPerObject=0MaxNumberOfThreads=1[MS Transaction Server]AutoRefresh=1然后打开就是一个实例了~~~自己看着办吧 叶飞说的挺OK的了就是那么做啊Picture1.Picture = LoadPicture(App.Path + "\a.jpg")多用几次这个 年终奖 关于 SendMessage 使用的问题(在Text1中,转到指定行、设置光标位置、返回光标位置、获得光标所在行的位置) 是不是控件名不能用变量? ppp.visble = True出错 将excel另存为文件错误,在线等啊! 如何只能在combo里选择选项,而不能输入东西 请给我一个在线升级的例子。。。。 Excel的一个问题? 关于 getopenfilename 请大家帮忙 vb与sql的变量互相通讯的问题???? 用什么代码能关掉windows XP?在线等待,急! 向表中插入记录的问题? (50分)
新建一个文本把以下内容贴进去然后把它改名为Form1.frm
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "Comdlg32.ocx"
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 3195
ClientLeft = 60
ClientTop = 345
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3195
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin MSComDlg.CommonDialog CommonDialog1
Left = 465
Top = 2145
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin VB.PictureBox Picture1
Height = 1395
Left = 270
ScaleHeight = 1335
ScaleWidth = 4155
TabIndex = 1
Top = 270
Width = 4215
End
Begin VB.CommandButton Command1
Caption = "Command1"
Height = 495
Left = 1695
TabIndex = 0
Top = 2085
Width = 1215
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option ExplicitPrivate Sub Command1_Click()
CommonDialog1.ShowOpen
Picture1.Picture = LoadPicture(CommonDialog1.FileName)
End Sub然后再新建一个文本把以下再贴,然后再改名为工程1.vbp
Type=Exe
Form=Form1.frm
Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#D:\WINNT\System32\Stdole2.tlb#OLE Automation
Object={F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0; Comdlg32.ocx
Startup="Form1"
Command32=""
Name="工程1"
HelpContextID="0"
CompatibleMode="0"
MajorVer=1
MinorVer=0
RevisionVer=0
AutoIncrementVer=0
ServerSupportFiles=0
CompilationType=0
OptimizationType=0
FavorPentiumPro(tm)=0
CodeViewDebugInfo=0
NoAliasing=0
BoundsCheck=0
OverflowCheck=0
FlPointCheck=0
FDIVCheck=0
UnroundedFP=0
StartMode=0
Unattended=0
Retained=0
ThreadPerObject=0
MaxNumberOfThreads=1[MS Transaction Server]
AutoRefresh=1然后打开就是一个实例了~~~自己看着办吧
多用几次这个