绝对VB新手请教接口的问题

Ambiter 2003-08-20 04:40:25
刚入到公司,为了考核,老板叫我做个文本编辑器,代码我已找到,也能理解. 他还有个要求卡了我.
就是接口问题.
例如: 把这个文本编辑器在louts里调用出来,有一部分功能将用不到.这里如何实现?
他说接口可写到win.ini,注册表,内存均可.
就拿写到win.ini举例,我该如何找这方面的资料?
...全文
38 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
Ambiter 2003-08-22
  • 打赏
  • 举报
回复
我去看了.老板也说就是这些.我还要改改,我不会的地方就问你呀.

'函数读ini的内容,参数的意思分别为,节名、字段、默认值

Public Function ReadIni(strSectionName As String, strKeyword As String, strDefString As String)

As String

Dim ResultString As String * 144, temp As Integer

Dim s As String, i As Integer

temp% = GetPrivateProfileString(strSectionName, strKeyword, "", ResultString, 144, App.Path &

"\JSsoft.ini")

'检索关键词的值

If temp% > 0 Then '关键词的值不为空

s = ""

For i = 1 To 144

If Asc(Mid$(ResultString, i, 1)) = 0 Then

Exit For

Else

s = s & Mid$(ResultString, i, 1)

End If

Next

Else

temp% = WritePrivateProfileString(strSectionName, strKeyword, strDefString, App.Path &

"\JSsoft.ini")

'将缺省值写入INI文件

s = strDefString

End If

ReadIni = s

End Function



'写ini文件,参数意义分别为,节名、段名、写入值

Public Sub WriteIni(strSectionName As String, strKeyword As String, strValue As String)

Dim res%

res% = WritePrivateProfileString(strSectionName, strKeyword, strValue, App.Path &

"\JSsoft.ini")

End Sub
Ambiter 2003-08-21
  • 打赏
  • 举报
回复
我马上去看看,先多谢你先.
viena 2003-08-21
  • 打赏
  • 举报
回复
http://search.csdn.net/expert/topic/51/5101/2002/11/27/1210945.htm
Ambiter 2003-08-20
  • 打赏
  • 举报
回复
晓琴,那里呀??
URL??
好心人帮帮忙......
上帝会关照你的.
viena 2003-08-20
  • 打赏
  • 举报
回复
写ini,就在这里CSDN能找到
Ambiter 2003-08-20
  • 打赏
  • 举报
回复
各位好心人告诉我呀, 或许告诉我那里能找到这方面的资料.

7,763

社区成员

发帖
与我相关
我的任务
社区描述
VB 基础类
社区管理员
  • VB基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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