Hi,<br><br>Is it possible to call a method of a class without creating a object of it, even if the method is not a class function in Delphi ? I wrote the below code just to test -<br><br>1. Created a simple form A and a button on it.
<br>2. Created another simple form B, written a procedure in it as -<br> FormB.Execute;<br> begin<br> ShowMessage("xyz");<br> end;<br>3. Commented out auto creation of FormB in application.<br>4. On Button Click in FormA I called the Execute of FormB and it worked perfectly okay.
<br><br>What could be the reason for this? I had the idea that either I need to create an object before calling any method or I need to declare a class function.<br><br>In the above steps when I am trying to call Show in Execute function of Form B I got Access violation which is perfectly fine according to the above statement.
<br><br>May be I am missing something simple here, but any pointers will be great. This was done in D2005 and it's win32 app.<br><br>Thanks<br>-Ani<br><br>