dynamic_sysop
Senior Contributor
hi could someone tell me if it's possible to call a sub from 1 form when it's on another like you could in vb6?
for example on my mdi parent form i have a socket and from the child form i want to send text from a textbox through the socket, if i try something like frmMain. it doesnt show the socket obviously as it's only made on that form and not public for the whole project, so i have tried a seperate sub on the parent form ( Public Sub SendData(sndData as String)
with socket
if .connected = true then
.senddata(.StringToBytes(sndData & vbcrlf)
end if
end with
end sub
******************
now in vb6 if i put that on a form then from another form i could call it by say frmMain.SendData( strdata )
but with .net it wont work
any help on this would be appreciated ty.
for example on my mdi parent form i have a socket and from the child form i want to send text from a textbox through the socket, if i try something like frmMain. it doesnt show the socket obviously as it's only made on that form and not public for the whole project, so i have tried a seperate sub on the parent form ( Public Sub SendData(sndData as String)
with socket
if .connected = true then
.senddata(.StringToBytes(sndData & vbcrlf)
end if
end with
end sub
******************
now in vb6 if i put that on a form then from another form i could call it by say frmMain.SendData( strdata )
but with .net it wont work
any help on this would be appreciated ty.