|
ahhh yeah what i forgot to write was
in the first message it shows:
I need you to program...
I didn't mean you as in YOU GUYS
it's an E-Mail from my boss and he was referring that YOU to ME
|
|
|
|
|
Hi,
you would need File.OpenText, and String.StartsWith, and String.Substring, and many more.
I would stay away from Regex as this seems simple string manipulations.
Is this your first VB.NET app? Buy and study a book then.
Luc Pattyn
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
Hawkster18 wrote: If you want to contact me through MSN Messenger (homedog6@hotmail.com) or Yahoo messenger (g_size18@yahoo.de) please ADD ME!
First, this is never going to happen. Noone cares about your email addresses unless they're a spam bot.
Second, this is simple string manipulation. You can either look for those keywords and seperation characters in the line you get from the file or use a Regular Expression to do some of the parsing. Using a RegEx is MUCH harder to do if you don't know how to do simple string manipulations though. You know those functions, Mid, Left, Right??? Start with those to see what you can do.
This reeks of either homework or paid work. If it's paid work, refund the customers money and tell them you're not qualified to do this. If it's homework, you have to write the code. Noone here is going to write it for you.
|
|
|
|
|
I'm just asking for some help, since to chat online in a messenger is faster.
and I've been on yor site and haven't found what I've been looking for
|
|
|
|
|
You start by reading the file, line by line.
|
|
|
|
|
I just don't know how to parse, can't you like send me an example how to parse so I atleast have a start?
|
|
|
|
|
I don't have any examples.
All you're doing is grabbing a section of the line and comparing it to what you're looking for, like:
If Left(lineFromFile, 9) = "Something" Then
|
|
|
|
|
Hi All,
Can any one help me in how to format the command for Run method in script ?
i have tried different way in giving input for Run method but it doent work , can any one look into below code
Below code is doing a XCopy for source to destination .
Set oShell = CreateObject("WScript.Shell")
RetVal = oShell.Run("""C:\Program Files\XYZ\ABC\XCopy.exe"" ""C:\Program Files\XYZ\ABC\staging\Advance NDC\utility\vvv.txt"" ""C:\Program Files\XYZ\ABC\utility\vvv.txt"" / s / q / y", 2, True)
|
|
|
|
|
IT doesn work because you're putting spaces between the forward slashes and the commands.
You've got: (BTW: I hope you have XCOPY.EXE in that folder you specified!)
"...XCopy.exe" "C:\..." "C:\..." / s / q / y"
When it should be:
"...XCopy.exe" "C:\..." "C:\..." /s /q /y"
|
|
|
|
|
Thanks for pointing out .
|
|
|
|
|
Well this is my third post resulting from this project I'm working on, which is taking me right out of my comfort zone!
I'm trying to replicate the behaviour of a server application we have which controls various display screens around the building over the network. The application itself is overly complex for our admin staff to use and I want to make my own which replicates just one small function of the original with a very simple UI. I think the networking side is fairly simple but although I'm quite experienced with vb.net I've never delved into the networking side of things before and it's a whole new scary world.
Up until now I've successfully got my version to broadcast a UDP packet with the required data, to which the display screens respond with an ICMP echo request. My server automatically replies to the echo (I didn't code that, the machine just does it). After that the client starts sending TCP packets in attempt to register itself with the server, and now that's where I'm stuck.
The client is sending a packet which apparently has no data but does have the SYN flag set to 1 and contains various 'options' (I'm getting this from a packet sniffer). When the real application receives that packet it responds with its own packet with the SYN flag as 1 and the ACK flag as 1, as well as the same options. However, because I haven't got the real application running my server machine just responds with a TCP packet with ACK=1 and RST=1, and no options.
My question is how do I code in vb.net the receipt of these packets from the client and respond with the correct flags and options? There are some good tutorials online for coding client/server communications using the Sockets class and I've got as far as I have by following these but none of them explain how to set flags and such. I suspect what I'm trying to do is at a lower level. Do I even need to manually create these packets?
I'm a bit out of my depth so any help would be very gratefully received!
|
|
|
|
|
Without seeing anything else in those packets, I'm guessing that the client is opening a TCP connection with the server on a certain port.
|
|
|
|
|
Yes, I think it is. But how do I get my application to respond in the same way as the one I'm copying does and allow the connection to be made? Once the server has returned a packet with the syn=1 flag it sends another packet telling the client that it was registered successfully.
|
|
|
|
|
I have no idea. But, what you describe sounds exactly like the client opening a connection to the server using TCP. What port number is used would be in the packet. Without seeing the packet data, it's almost impossible to say what's going on. You really can't look at one or two packets, but at a group of packets in the conversion to figure out what is really happening.
|
|
|
|
|
Alright, well it seems as if the TCP connection is being established now. The next packet that the client sends contains 26 bytes of data, which I've intercepted and read with a packet sniffer. My VB code receives this package and I've written it to display what's received, but it doesn't show the whole lot, for some reason. While the packet sniffer shows that the packet data contains the client name I only get the first four or five bytes of data displayed from my VB code. The rest seems to be ignored, even though a line I've written in to count the number of bytes indicates that the whole lot is being received. I've used a 'Do While' loop to make sure that the buffer is empty before displaying the data but still I only get those few bytes. Any idea why the packet sniffer is intercepting data in the packet which my application isn't receiving/displaying?
|
|
|
|
|
hi,
i have data grid view with 4 column the second and third combobox column type its bounded to different table related between them (it like category in 2nd column and subcategory in 3rd column).
my question: how to get value of Column third from main in second column?
|
|
|
|
|
BiGBoy9 wrote: my question: how to get value of Column third from main in second column?
Uhhh, what? This makes no sense at all.
|
|
|
|
|
What the OP is trying to do is when the user makes a selection from the combobox in column 2, the combobox in column3 should only show the options for that selection.
I'm not sure that it is possible though, as, for columns, the data source is set for the whole column, not just for one cell/combobox. So any change to the datasource for column3 will change any previous selections.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
If that is indeed the case, I would normally break editing a single record like that out to a seperate form. It's a lot easier that way.
Come to think of it, I just about never let users edit directly in the grid...
|
|
|
|
|
Dave Kreskowiak wrote: I would normally break editing a single record like that out to a seperate form.
Me too.
The problem with the Windows Forms DataGridView, although correctly named, is that it just looks too tempting for newer programmers, or those converting from non-.Net environments. It really should be limited to just viewing.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hi all.
Can anyone tell me that is it possible to record output sound through VB.Net programming (VS2005)??
I am creating a project in which I want to record output sound.
So if you have any idea then suggest me.
Thanks.
Gagan
|
|
|
|
|
Hi all,
I would like to convert my existing c/c++ .net project into vb.net.
Could anyone guide me?
Is there any reference/ step-by-step tutorial or guide I could follow?
Please do help me.
Thanks.
|
|
|
|
|
There is no easy way to do this. You should understand C++ and VB syntax and start writing each functionality of the C++ application in VB. However, if you have a DLL created in C++, you can reuse it without rewriting. Take a look at P/Invoke[^].
|
|
|
|
|
|
I'm developing a POS solution and my problem is:
I have a Keyboard Wedge Ibutton reader that is connected to the ps/2 port.
It handles login and logoff for the users.
it sends 6 chars to a textbox when plugged in and 6 when plugged out.
It works fine with a textbox when it has focus.
But when i want to capture these strings without a textbox with the keydown, ProcessCmdKey event
i only get the codes that the reader sends extra.
MenuLMenuRightUpClearMenuLMenuHomeClearMenuLMenuEndClear
MenuLMenuInsertMenuLMenuLeftUpClearMenuLMenuClearEnterLButton
I have tried the GetAsyncKeyState API ( as a test application )
sample below
Private sr As New StringBuilder
<DllImport("user32.dll")> _
Public Shared Function GetAsyncKeyState(ByVal vKey As Int32) As Short
End Function
Private WithEvents timer1 As New Timer
Sub New()
Me.KeyPreview = True
' This call is required by the Windows Form Designer.
InitializeComponent()
' Add any initialization after the InitializeComponent() call.
End Sub
Private Sub timer1_Tick(ByVal sender As Object, ByVal e As EventArgs) Handles timer1.Tick
For Each i As System.Int32 In [Enum].GetValues(GetType(Keys))
Dim x As Integer = GetAsyncKeyState(i)
If x = 1 Or x = -32767 Then
sr.Append([Enum].GetName(GetType(Keys), i))
End If
Next
If Not sr.ToString.Length = 0 Then
Textbox1.Text = sr.ToString
End If
End Sub
after the ibutton is inserted in the textbox1 appears:
MenuLMenuRightUpClearMenuLMenuHomeClearMenuLMenuEndClear
MenuLMenuInsertMenuLMenuLeftUpClearMenuLMenuClearEnterLButton
No security code.
What am i missing here?
|
|
|
|