# Re: To: C.T.Wang, 谢谢您回答有关Set FormName = Nothing之问题！再请教......

Posted by Fai on August 13, 1999 at 11:07:53:

In Reply to: To: C.T.Wang, 谢谢您回答有关Set FormName = Nothing之问题！再请教...... posted by 新手 on August 12, 1999 at 23:49:55:

: 请问 Dim F1 as form1, Dim F2 as form2要在何处宣告？我试过了，好像只有在一般模组中用Public才不产生错误。另外如原程式码中的form1.show or form2.hide等等是否要改成F1.show or F2.hide？还是保持原名仍不会产生不可预期的错误？

The method to declare form is wrong!
If you want declare some variable to use, you should declare as follow:
Dim F1 as Form
Dim F2 as Form

The following code is set the value of F1,F2.
If the value is object, that you must add "Set" at the front of declaration
Set F1=form1
set F2=form2

Then, you can use
F1.show
F2.show

if you only want to show Form1 or Form2, then you no need
to declare, just use
Form1.show
Form2.hide
is OK

Follow Ups:

- 非常感谢您！练习过了！为确定使用正确请告知...... 新手 12:09:51 8/13/99 (2)
  - Re: 非常感谢您！练习过了！为确定使用正确请告知...... Fai 14:11:36 8/13/99 (1)
    - 因为是在练习各种方法，并不是一定要这样宣告。谢谢！ 新手 22:09:11 8/13/99 (0)