求两个函数

qyjiswgog 2005-05-08 08:50:29
1
求一个将路径转到指定的地方的函数
比如,我想将它转到(E:\kugoo)去,代码应该怎么写
2
当我单击一个按钮,它就用IE去打开一个网页比如(http://www.csdn.net)这代码应该怎么写??


各位帮帮忙,我马上结帐
...全文
79 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
qyjiswgog 2005-05-08
  • 打赏
  • 举报
回复
麻了,一遍英文......................看不懂
笑天居士 2005-05-08
  • 打赏
  • 举报
回复
详见Delphi帮助的:
IO routines
file management routines
笑天居士 2005-05-08
  • 打赏
  • 举报
回复
Append procedure

Prepares an existing file for adding text to the end.

BlockRead procedure

Reads one or more records from an open file into a variable.

BlockWrite procedure

Writes one or more records from a variable to an open file.

Eof function

Tests whether the file position is at the end of a file.

ErrOutput variable

Specifies a write-only Text file associated with the process's standard error file.

FileMode variable

Indicates the access mode on typed and untyped files opened by the Reset procedure.

FilePos function

Returns the current file position.

FileSize function

Returns the number of records in a file.

Input variable

Specifies a read-only Text file associated with the processes standard input file.

IOResult function

Returns the status of the last I/O operation performed.

MkDir procedure

Creates a new subdirectory.

Output variable

Specifies a write-only Text file associated with the process's standard output file.

Rename procedure

Changes the name of an external file.

Reset procedure

Opens an existing file.

Rewrite procedure

Creates a new file and opens it.

RmDir procedure

Deletes an empty subdirectory.

Seek procedure

Moves the current position of a file to a specified component.

Truncate procedure

Deletes all the records after the current file position.

Write procedure (for typed files)

Writes to a typed file.
笑天居士 2005-05-08
  • 打赏
  • 举报
回复
AssignFile procedure

Associates the name of an external file with a file variable.

ChDir procedure

Changes the current directory.

CloseFile procedure

Terminates the association between file variable and an external disk file.

CreateDir function

Creates a new directory.

DeleteFile function

Deletes a file from disk.

DirectoryExists function

Determines whether a specified directory exists.

DiskFree function

Returns the number of free bytes on a specified drive.

DiskSize function

Returns the size, in bytes, of a specified drive.

File mode constants

Used to open and close disk files.

File name constants

File name constants are used to express file names in a platform-independent manner.

File open mode constants

File open mode constants are used to control the access mode to a file or stream.

FileAccessRights variable

Points to the command-line arguments specified when the application is invoked.

FileAge function

Returns the OS timestamp of a file.

FileClose procedure

Closes a specified file.

FileCreate function

Creates a new file.

FileDateToDateTime function

Converts an OS timestamp value to TDateTime value.

FileExists function

Tests if a specified file exists.

FileGetAttr function

Returns the file attributes of FileName.

FileGetDate function

Returns an OS timestamp for a specified file.

FileIsReadOnly function

Reports whether a file is read-only.

FileOpen function

Opens a specified file using a specified access mode.

FileRead function

Reads a specified number of bytes from a file.

FileSearch function

Searches a specified directory path for a file.

FileSeek function

Repositions read/write point.

FileSetAttr function

Sets the file attributes of a specified file.

FileSetDate function

Sets the OS time stamp for a specified file.

FileSetReadOnly function

Sets the file permissions to read-only.

FileWrite function

Writes the contents of a buffer to the current position in a file.

FindClose procedure

Releases memory allocated by FindFirst.

FindFirst function

Searches for the first instance of a file name with a given set of attributes in a specified directory.

FindNext function

Returns the next entry matching the name and attributes specified in a previous call to FindFirst.

ForceDirectories function

Creates a new directory, including the creation of parent directories as needed.

GetCurrentDir function

Returns the name of the current directory.

GetDir procedure

Returns the current directory.

RemoveDir function

Deletes an existing empty directory.

RenameFile function

Changes a file name.

SetCurrentDir function

Sets the current directory.
fengzhengren 2005-05-08
  • 打赏
  • 举报
回复
路径是确定还是不确定?到底是程序转还是文件什么的转?为什么要转?
fengzhengren 2005-05-08
  • 打赏
  • 举报
回复
写错了,应该这样:
shellexecute(0, nil,'http://www.csdn.net', nil, nil, SW_NORMAL);
qyjiswgog 2005-05-08
  • 打赏
  • 举报
回复
谢谢

第二个就是,将路径转到其它地方啊,它默认的是应用程序的当前目录的嘛,比如我的应用程序处在E:\ts\,那么它的当前路径就是E:\ts\,现在我想要将它转到其它地方去,比如转到F:\kugoo去,怎么做??
fengzhengren 2005-05-08
  • 打赏
  • 举报
回复
第2个:

uses
shellapi
shellexecute(0,'open',pchar(http://www.csdn.net'));

第一个是什么意思?

1,183

社区成员

发帖
与我相关
我的任务
社区描述
Delphi Windows SDK/API
社区管理员
  • Windows SDK/API社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧