By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,258 Members | 1,316 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,258 IT Pros & Developers. It's quick & easy.

Integrating modules into application

P: n/a
Hello - I'm finishing my VB class - and working on a project - I am using
Microsoft Technet Article 828993 on Ping an IP address by using sockets in
visual basic .net.
(http://support.microsoft.com/default...b;en-us;828993) What i'd
like to do is modify this application to graphically ask for IP address,
pass it to the module, and return the value to the application - OK - I know
passing values between forms is very popular here and I understand how to do
that - but is there a difference passing info to a module?

Don't have to be explicit - I want to learn this - but a link would be
helpful, just that the module uses Sub Main () so I modified the module and
added

Dim objIPUpdateForm As New frmIPUpdate
objIPUpdateForm.ShowDialog()

Set the property pages to launch Sub Main( ) and I have my form loaded
waiting for data. I tried methodologies for standard form to form data
transfer, but no soap.

Sorry if this is beat to death, just we haven't gone into much Module detail
other than using it as a Mainline to open forms, splashscreens and whatnot.
Nov 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Patrick wrote:
Hello - I'm finishing my VB class - and working on a project - I am using
Microsoft Technet Article 828993 on Ping an IP address by using sockets in
visual basic .net.
(http://support.microsoft.com/default...b;en-us;828993) What i'd
like to do is modify this application to graphically ask for IP address,
pass it to the module, and return the value to the application - OK - I know
passing values between forms is very popular here and I understand how to do
that - but is there a difference passing info to a module?

Don't have to be explicit - I want to learn this - but a link would be
helpful, just that the module uses Sub Main () so I modified the module and
added

Dim objIPUpdateForm As New frmIPUpdate
objIPUpdateForm.ShowDialog()

Set the property pages to launch Sub Main( ) and I have my form loaded
waiting for data. I tried methodologies for standard form to form data
transfer, but no soap.

Sorry if this is beat to death, just we haven't gone into much Module detail
other than using it as a Mainline to open forms, splashscreens and whatnot.


Something like this is what I think you are looking for:

Sub Main()
Dim objIPUpdateForm As New frmIPUpdate
objIPUpdateForm.ShowDialog()
Dim IP as String = objIPUpdateForm.GetIPProperty

'Do Ping Stuff Here

End Sub

Class frmIPUpdate

.....
Public Property ReadOnly GetIPProperty as String
Get
return m_FormsIPAddress
End Get
End Property
.....
End Class
So, we added a public property to the form that exposes the ip address
from the form. You will have to do some checking to make sure a valid
IP was returned, but that's the basics

Chris
Nov 21 '05 #2

P: n/a
Thanks for your help - sometimes all I need is a simple answer or yes or no
answer to confirm I'm on the right track. Thanks!
Nov 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.