Click here to Skip to main content
15,915,742 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Loop Question Pin
Dave Kreskowiak15-Mar-05 9:11
mveDave Kreskowiak15-Mar-05 9:11 
GeneralRe: Loop Question Pin
Makniteasy17-Mar-05 7:15
Makniteasy17-Mar-05 7:15 
GeneralHTA and IsConnectible Ping Pin
pn199515-Mar-05 3:32
pn199515-Mar-05 3:32 
GeneralRe: HTA and IsConnectible Ping Pin
Dave Kreskowiak15-Mar-05 6:22
mveDave Kreskowiak15-Mar-05 6:22 
Generalneed help: deserialise Pin
Dahoolio15-Mar-05 3:14
Dahoolio15-Mar-05 3:14 
GeneralRe: need help: deserialise Pin
Dave Kreskowiak15-Mar-05 6:17
mveDave Kreskowiak15-Mar-05 6:17 
GeneralRe: need help: deserialise Pin
Dahoolio16-Mar-05 20:17
Dahoolio16-Mar-05 20:17 
GeneralRe: need help: deserialise Pin
Dahoolio15-Mar-05 20:40
Dahoolio15-Mar-05 20:40 
addendum, i really wanna serialize the whole class in 1 command( and deserilze too)
So, As asked for: The serialazation process


Dim io As MemoryStream = New MemoryStream<br />
Dim SdServerSend As SerialClass.SerialDataPack = new SerialClass.SerialDataPack<br />
<br />
'-- set .plcname in serialized packet<br />
SdServerSend.PLCname = Form1.stTelemeOut.PLCname<br />
<br />
Dim Bf As BinaryFormatter = New BinaryFormatter<br />
            <br />
'-- convert the file to send to a byte array<br />
Dim Br As New BinaryReader(File.OpenRead(filepath))<br />
Dim bytes() As Byte = Br.ReadBytes(Br.BaseStream.Length)<br />
Br.Close()<br />
<br />
'-- copy array to .file<br />
SdServerSend.File = bytes<br />
<br />
'-- serialize class to IO stream<br />
Bf.Serialize(io, SdServerSend)<br />
          <br />
'-- writes IO to hdd<br />
Dim BW As New BinaryWriter(File.OpenWrite("C:\PLC\Listener\Received\temptest " & SdServerSend.Reason.ToString & " " & EventCounter & ".bin"))<br />
BW.Write(io.GetBuffer, 0, io.Length)<br />
BW.Close()<br />
<br />
'-- reset io.postion to 0<br />
io.Position = 0<br />
<br />
'-- send serialized data to listener<br />
Form1.ClientSocket.Send(io.GetBuffer, io.Length, 0)


If you make something idiotproof, someone else will make a better idiot.....
QuestionHOW TO: populate Menus at runtime Pin
azam31614-Mar-05 19:39
azam31614-Mar-05 19:39 
AnswerRe: HOW TO: populate Menus at runtime Pin
rwestgraham14-Mar-05 21:38
rwestgraham14-Mar-05 21:38 
GeneralHide Tabpage Pin
Mohamed Ishak14-Mar-05 19:27
professionalMohamed Ishak14-Mar-05 19:27 
GeneralRe: Hide Tabpage Pin
rwestgraham14-Mar-05 21:04
rwestgraham14-Mar-05 21:04 
GeneralRe: Hide Tabpage Pin
Mohamed Ishak15-Mar-05 2:59
professionalMohamed Ishak15-Mar-05 2:59 
GeneralDetecting CD drive media change Pin
thebox211214-Mar-05 17:16
thebox211214-Mar-05 17:16 
GeneralRe: Detecting CD drive media change Pin
thebox211214-Mar-05 17:52
thebox211214-Mar-05 17:52 
GeneralRe: Detecting CD drive media change Pin
Dr_Lomax16-Mar-05 14:38
Dr_Lomax16-Mar-05 14:38 
GeneralRe: Detecting CD drive media change Pin
Dr_Lomax16-Mar-05 14:42
Dr_Lomax16-Mar-05 14:42 
GeneralVB and Matlab Pin
Anonymous14-Mar-05 17:10
Anonymous14-Mar-05 17:10 
QuestionValidating ? Pin
Progzz14-Mar-05 16:16
Progzz14-Mar-05 16:16 
AnswerRe: Validating ? Pin
Christian Graus14-Mar-05 16:45
protectorChristian Graus14-Mar-05 16:45 
GeneralRe: Validating ? Pin
Progzz14-Mar-05 16:48
Progzz14-Mar-05 16:48 
GeneralRe: Validating ? Pin
Christian Graus14-Mar-05 17:00
protectorChristian Graus14-Mar-05 17:00 
GeneralRe: Validating ? Pin
Progzz14-Mar-05 17:04
Progzz14-Mar-05 17:04 
GeneralRe: Validating ? Pin
Christian Graus14-Mar-05 17:11
protectorChristian Graus14-Mar-05 17:11 
AnswerRe: Validating ? Pin
Dave Kreskowiak15-Mar-05 6:13
mveDave Kreskowiak15-Mar-05 6:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.