📄 37.html
字号:
<html>
<head>
<title>Re: 关于GetWindowsDirectory API的问题..</title>
</head>
<BODY BACKGROUND="" BGCOLOR="white" TEXT="black" LINK="red" VLINK="#808080" ALINK="">
<center>
<h1>Re: 关于GetWindowsDirectory API的问题..</h1>
</center>
<HR><p>
Posted by <a href="mailto:yfwu@iname.com">小吴</a> on June 04, 1997 at 00:32:59:<p>
In Reply to: <a href="36.html"><b>关于GetWindowsDirectory API的问题..</b></a> posted by SATURNBOY on June 03, 1997 at 16:50:12:<p>
首先,WinDir 不建议使用固定长度字串变数,建议用下面的写法<br>Dim WinDir As String<br>WinDir = Space$(20)<p>然后取得资料之后要将末尾空白去掉<br>WinDir = Left$(WinDir, Rtval)<p>这样才对。上面的 code 在 Windows 的目录是用中文命名时会破功。不过好像没人这么做,所以就放心用吧!<p><br>: HI! 小吴好!<br>: 程式码如下:(在vb6.0下,使用WIN95a)<br>: -------------------------------------------------------------------------------------------<br>: Dim WinDir As String * 20 <br>: Dim Rtval As Integer<p>: Rtval = GetWindowsDirectory(WinDir, 20)<br>: '抓出windows的目录 WinDir = c:\windows<p>: label1.Caption = WinDir & "\win.ini"<br>: '应该label1会显示 c:\windows\win.ini<br>: '可是结果却还是 c:\windows<br>: 为啥会如此呢?<p>: 谢啦!<p>
<br>
<p>
<a name="followups">Follow Ups:</a><br>
<ul><!--insert: 37-->
</ul><!--end: 37-->
<br><HR><p>
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -