Click here to Skip to main content
15,920,576 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: clearing a combobox Pin
microuser_20009-Dec-05 0:50
microuser_20009-Dec-05 0:50 
GeneralRe: clearing a combobox Pin
Asim N.9-Dec-05 2:39
Asim N.9-Dec-05 2:39 
QuestionCheck the instance of an object Pin
biglewy8-Dec-05 21:19
biglewy8-Dec-05 21:19 
AnswerRe: Check the instance of an object Pin
Asim N.8-Dec-05 23:22
Asim N.8-Dec-05 23:22 
QuestionDataBase Checking Table Exist or Not Pin
Sasmi8-Dec-05 19:51
Sasmi8-Dec-05 19:51 
AnswerRe: DataBase Checking Table Exist or Not Pin
abhinish8-Dec-05 23:38
abhinish8-Dec-05 23:38 
QuestionUsing Store Procedure that using dblink in VB.NET Pin
lucdt8-Dec-05 19:33
lucdt8-Dec-05 19:33 
QuestionHelp with a program within Network Programming in .net Pin
Delo8-Dec-05 16:04
Delo8-Dec-05 16:04 
I'm trying to write a program out of a book called network programming in.net and currently on page 360 13.3.2 using packetX and winPCap
the language I am writing in would be Vb.net I have written this program once before and got help off this site but at that time the individual that helped me told me that perhaps this book was too advanced for me at the time and I agreed so I put it away for well not have went back through the book have gotten to this particular page number and this is the first error that I have run across because of my understanding of it where the first time I went through the book I was coming to this site with questions about every program I was writing out of this book anyway to move on I need help
I've written the code and I have no errors But the program does not work
-----------------------------------------------------------------------------
Option Strict Off
Public Class Form1
Inherits System.Windows.Forms.Form
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

With lvPackets
.Columns.Add("From", .Width / 3, HorizontalAlignment.Left)
.Columns.Add("To", .Width / 3, HorizontalAlignment.Left)
.Columns.Add("Size", .Width / 3, HorizontalAlignment.Left)
.View = View.Details
End With
End Sub

Private Sub btnstart_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnstart.Click
Me.AxPacketXCtrl1.Start()
End Sub

Private Sub axPacketXCrl1_onPacket(ByVal eventSender _
As System.Object, ByVal e As _
AxPacketXLib._IPktXPacketXCtrlEvents_OnPacketEvent) _
Handles AxPacketXCtrl1.OnPacket
Dim I As Short
Dim thispacket As String
Dim sourceip As String
Dim Destip As String
Dim item As New ListViewItem
thispacket = ""
For I = 0 To e.pPacket.DataSize - 1
thispacket = thispacket & Chr(e.pPacket.Data(I))
Next
If e.pPacket.Data(14) = 69 And e.pPacket.Data(23) = 6 Then
sourceip = e.pPacket.Data(26) & "." & _
e.pPacket.Data(27) & "." & + _
e.pPacket.Data(28) & "." & + _
e.pPacket.Data(29)
Destip = e.pPacket.Data(30) & "." & _
e.pPacket.Data(31) & "." & + _
e.pPacket.Data(32) & "." & + _
e.pPacket.Data(33)
item.SubItems(0).Text = sourceip
item.SubItems.Add(Destip)
item.SubItems.Add(e.pPacket.DataSize)
lvPackets.Items.Add(item)
End If

End Sub
End Class

-----------------------------------------------------------------------------
after the dim statements where the code looks like this me
thispacket = ""
For I = 0 To e.pPacket.DataSize - 1
thispacket = thispacket & Chr(e.pPacket.Data(I))
where it says chr(e.pPacket.Data(I))

in the book it is different it goes like this


thispacket = ""
For I = 0 To e.pPacket.DataSize - 1
thispacket = thispacket & Chr(eventArgs.pPacket.Data(I))


and does not work I can not remember who person was that helped me from this site but there was something else I added a reference and do we changed in the eventArgs. To what is now in the code I think I hope this isn't more confusing than it is helpful I will stop for now until I have a question or if I get a question Sigh | :sigh: Sigh | :sigh:

-- modified at 22:08 Thursday 8th December, 2005
QuestionCustom ComboBox Control Issue Pin
eatwork8-Dec-05 11:44
eatwork8-Dec-05 11:44 
AnswerRe: Custom ComboBox Control Issue Pin
Roy Heil8-Dec-05 13:38
professionalRoy Heil8-Dec-05 13:38 
QuestionSTARTING VB.NET Pin
Jkkenzie8-Dec-05 10:03
Jkkenzie8-Dec-05 10:03 
AnswerRe: STARTING VB.NET Pin
Christian Graus8-Dec-05 10:07
protectorChristian Graus8-Dec-05 10:07 
GeneralRe: STARTING VB.NET Pin
Jkkenzie8-Dec-05 10:13
Jkkenzie8-Dec-05 10:13 
AnswerRe: STARTING VB.NET Pin
Dave Kreskowiak8-Dec-05 11:44
mveDave Kreskowiak8-Dec-05 11:44 
QuestionCrystal Report and DataBase Login Pin
dptalt8-Dec-05 9:23
dptalt8-Dec-05 9:23 
QuestionCrystal Reports Preview Pin
projectcode18-Dec-05 8:52
projectcode18-Dec-05 8:52 
Questionhow to make dll Pin
giotis828-Dec-05 2:56
giotis828-Dec-05 2:56 
AnswerRe: how to make dll Pin
Christian Graus8-Dec-05 10:04
protectorChristian Graus8-Dec-05 10:04 
GeneralRe: how to make dll Pin
giotis828-Dec-05 20:53
giotis828-Dec-05 20:53 
GeneralRe: how to make dll Pin
Christian Graus9-Dec-05 10:35
protectorChristian Graus9-Dec-05 10:35 
GeneralRe: how to make dll Pin
giotis8211-Dec-05 21:19
giotis8211-Dec-05 21:19 
GeneralRe: how to make dll Pin
Christian Graus12-Dec-05 10:54
protectorChristian Graus12-Dec-05 10:54 
GeneralRe: how to make dll Pin
giotis8212-Dec-05 22:04
giotis8212-Dec-05 22:04 
GeneralRe: how to make dll Pin
giotis828-Dec-05 21:18
giotis828-Dec-05 21:18 
AnswerRe: how to make dll Pin
uktrips0079-Dec-05 19:18
uktrips0079-Dec-05 19:18 

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.