Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I have a form, and one class

on the form, there is text field to display the messages

 

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim a As  myClass
a.DisplayMessage
End Sub

 

in the class


Public Class myClass

Sub DisplayMessage()
form.msg = "hello.. this is message from myClass"
End Sub

End Class

how can I display message on the form from the class function

Posted

no.. I've should clearify about my class before

here what I want to do.

I have Form1 and Class myClass

 

instead of having and calling myClass methods like

 

myClass.DisplayMessage()

myClass.DoFirst()

myClass.DisplayMessage()

myClass.DoSecond()

myClass.DisplayMessage()

myClass.DoThird()

 

I want to call myClass.DoSomething() from Form1.

 

Let's say DoSomething() have to display messages on the Form1 several times within scope of its method.

 

what i want DoSomething() to do is

display the message on the form, like "about to do....1".

then.. do whatever have to and display another message on the Form again like "about to do ..2"

because doing second is depending on first one... and the third one to do is depending on second one..

So if I take your advised, I have to devide everthing into pieaces which will be really painful for me..

If I know the way to display the message to the Form from myClass that would be really really useful.

 

Thank you

  • *Experts*
Posted
It sounds like you need to use Response.Write().

"Being grown up isn't half as fun as growing up

These are the best days of our lives"

-The Ataris, In This Diary

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...