这是个通用对话框的图形打开和保存程序,图形已经用代码打开了 可保存的时候出问题了,我不会让文件保存在通用对话框指定的路径里面, 哪位好心人给指点一下把 下面有生成好的EXE文件. Private Sub BB_Click() CommonDialog1.FileName = "" CommonDialog1.Flags = vbOFNFileMustExist CommonDialog1.Filter = "ALL Files|*.*|*.jpg|*.JPG|(*.exe|*.exe|(*.TXT)|*.TXT" CommonDialog1.FilterIndex = 2 CommonDialog1.DialogTitle = "Open File(*.jpg)" CommonDialog1.ShowOpen If CommonDialog1.FileName = "" Then MsgBox "No file selectd", 37, "Checking" Else
Picture1.Picture = LoadPicture(CommonDialog1.FileName)'打开指定路径的图片
End If End Sub
Private Sub CC_Click() CommonDialog1.CancelError = False CommonDialog1.DefaultExt = "jpg" CommonDialog1.FileName = "111.jpg" CommonDialog1.Filter = "Text files(*.txt)|*.jpg|*.JPG|*.TXT|All Files(*.*)|*.*" CommonDialog1.FilterIndex = 2 CommonDialog1.DialogTitle = "Save File As(*.jpg)" CommonDialog1.Flags = vbOFNOverwritePrompt Or vbOFNPathMustExist CommonDialog1.ShowSave '接下来如何保存通用对话框指定路径的图形文件呢 SavePicture Picture1, "d:\555.jpg"'调用这个语句只能把打开的图片保存在固定的位置,根本不是用通用对话框保存的,我想用通用对话框进行选择名字然后保存,大家说代码该咋写呀.我下一步该咋办呢.谢谢 End Sub
Private Sub DD_Click() End End Sub
[此贴子已经被作者于2005-10-16 11:47:32编辑过]