dynamic_sysop
Well-known member
hi could someone tell me if its possible to call a sub from 1 form when its 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 its 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 its 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.