作者A1pha ([αλφα])
看板Visual_Basic
标题[VB6 ] 表单的BUG?
时间Sat Mar 24 17:15:11 2007
我设计了一个表单,
是提供使用者输入一些设定用的。
但是出现了一个奇怪的BUG。
只要表单开启之後关闭,
所有的设定就会重置变成预设值@@"
把他分成几种状况:(假设设定表单上,原本text1=200)
1.
开启设定表单,
将text1改为 100,
关闭设定表单,
执行form1上的命令扭,
跑出text1=200时的数据。
2.
开启设定表单,
将text1改为 100,
不将表单关闭,
执行form1上的命令扭,
跑出text1=100时的数据。
3.
开启设定表单,
将text1改为 100,
不将设定表单关闭,
执行form1上的储存设定,
关闭程式、重开程式,
载入刚刚储存的设定,
直接跑form1上的命令扭,
跑出text1=100时的数据。
之後打开设定表单,
会发现text1=100,
但是关闭设定表单,
再跑一次form1上的命令扭,
又变回text1=200时的数据.....
总之,只要关闭过设定表单,
设定就会被重置....
搞不懂问题在哪....囧
--
"Every kid who has dreamed of being a baseball player has stood in his front
yard with a bat and said to himself, "Bottom of the ninth, Game 7 of the
World Series, the bases are loaded," and then envisioned hitting a home run
to win the game. My job is to shatter that dream."
By Huston Street
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 124.8.72.164
1F:→ nobody1:值在表单读取时都会始化 所以值要另外放或传值进去 03/26 11:39