关于memo的显示问题!(20分)

T

tobat

Unregistered / Unconfirmed
GUEST, unregistred user!
我想用一个memo控件来显示IE的右键菜单,这需要读取注册表!因为这个注册表键下有
好几个子键,每个子键还有各自的数值,我想在memo中一条算一行的列出来,于是这样:
memo1.lines:=regist.getkeynames('')
可是显示什么“Incompatible types:"Tstrings"and "String”
但是memo是tstrings,getkeynames也是tstrings啊!这应该如何改呢,或者如何实现?比如
说用listbox什么的!
 
不知道,只好UPUP
 
我考,这个也问。
memo1.lines:=regist.getkeynames('')
改成
memo1.lines.Add(regist.getkeynames(''));
顺便说一句,确实该好好看看书了,基本知识欠缺。
 
明白一半了,memo是这样用的啊,那么getkeynames()的括号里怎么填呢?填一个键还是
几个键值,我这样flatmemo1.Lines.add(registe.getkeynames('menuext'));
还是上面那个提示!谢谢plaw,再帮一把,我看书一般看不进去的!
 
//我看书一般看不进去的!
话都说到这份儿上也真是够可以的。哪天一觉起来就变高手了。
不会看书会查资料也好哇。
用关键字getkeynames查找,得到
http://www.delphibbs.com/delphibbs/dispq.asp?lid=360125
http://www.delphibbs.com/delphibbs/dispq.asp?lid=634551
http://www.delphibbs.com/delphibbs/dispq.asp?lid=690174
 
procedure GetKeyNames(Strings: TStrings);

Description

Call GetKeyNames to determine the names of all subkeys belonging to the current key. Determining the names of subkeys is useful in an application that iterates through a set of keys.

Strings is a variable of type TStrings into which to return the list of subkey names.
 
我个人认为LISTBOX比MEMO好得多
listbox.items.add(regist.getkeynames(''));
 
顶部