Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I am getting confused with one thing. Here in .NET forms are working as classes. for example a form frmabout is a complete class.

 

I want to call that form from some other form object, such as in VB6 if there are 2 forms we call call each other from any other object. I want to access a method on frmabout from other form but i am unablt to do so. Frmabout is already loaded in memory

 

in case of if i write

dim frmM as new frmAbout
frmM.Show
frmM.xxxx

 

it opens a new form, and calls the method

 

if i try to call directly such as like

frmAbout.Xxx

 

it do not show my form's methods its just shows methods as like a class

 

if i try

 

Dim frmM as frmAbout = frmAbout.ActiveForm

 

it raise an error

 

Is there any way to do so ?

The one and only

Dr. Madz

eee-m@il

Posted

Make sure the method is public.

 

.. and can you please get rid of that distracting signature. I think we get the idea of what your nick is without having to go blind.

Gamer extraordinaire. Programmer wannabe.
Guest mutant
Posted

What Wyrd said abut the method and just keep one instance of the form available to the whole class so if you need it you dont have to create the form every time.

 

BTW I dont see anything very distracting in his sig :) Only 3 lines of normal size font and two of them got different color :)

Posted (edited)

Is this good if i make a module and in module i enter this

 

public frmM as new frmAbout

 

and with in code i call it;s reference.

Edited by Madz

The one and only

Dr. Madz

eee-m@il

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...