|
-
Sep 22nd, 2002, 06:01 PM
#1
Thread Starter
Junior Member
Accessing FORM components from a module
How do I access components from a module.
e.g.
I have Form1 with that uses AxInet1 component.
In a module I want to access that component. In VB6 all you did was:
With Form1.Inet1
.cancel
.Protocol = icFTP
.URL = "myURL.net"
.UserName = "username"
.Password = "password"
End With
The FORM1.INet1 doesn't exist in .NET so how do get it?
Thanks for your help!
-
Sep 22nd, 2002, 08:52 PM
#2
yay gay
VB Code:
dim mform as new form1()
mform.inet1.
-
Sep 22nd, 2002, 08:56 PM
#3
Thread Starter
Junior Member
Yup ....gotta get used Classes in VB.NET
Yup Gotta get used to Classes in .NET....thanks that worked!
-
Sep 22nd, 2002, 08:57 PM
#4
yay gay
ah...but u shouldnt use iNET in .NET! use system.net.sockets instead...!
-
Sep 22nd, 2002, 09:14 PM
#5
Thread Starter
Junior Member
Ok I will read up on that.....why is it more reliable?
Is this a more reliable feature of .NET?
-
Sep 22nd, 2002, 10:19 PM
#6
PowerPoster
It is a general rule with .Net to try to use the existing classes if possible. Using COM interop only when necessary. Your adding an extra layer that doesn't need to be there.
If MS decides to port the .Net framework on other platforms besides Windows, then your code will more than likely work if you are using .Net classes and not COM components. I find the chances that .Net will be on other platforms is highly unlikely, but the possiblity is there, and if it happens, you want your code to work.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|