|
Thanks for the reply
Fair enough... yes I would like to retrieve it programmatically, perferrably with VB code. I suppose that an activex control would not work in firefox in this case, but is there any way of doing this even with a program that the user could simply download and run?
Thanks again for any assistance
|
|
|
|
|
Hi,
I need a Visual Basic .NET source which can capture network traffic in packets. I have found a lot written in C/C++ but i need a Visual Basic .NET version of that.
I already got a version made in Visual Basic 6, but im not able to find a free version to VB.NET!
Please help me!
|
|
|
|
|
|
Oh yea thank you.
But i dont know much about how to implement or call functions, and if you could catch a link where it is made through vb.net that would be great!
|
|
|
|
|
This is my first time with VB.NET and XML, so feeling my way through. In VB6, you could get the text of the xml into a string using the dom.xml. Is there an equivalent in .NET using the XmlTextWriter? I am basically building 2 xml documents, then I need to concatenate them in a string. Is the XmlTextWriter the best way to go to build xml?
Thanks
|
|
|
|
|
I have the above problem figured out. However, my output is odd. Using the following code:
xws = New XmlWriterSettings
xws.Indent = True
xws.CheckCharacters = True
xws.IndentChars = " "
xws.NewLineOnAttributes = True
xws.Encoding = System.Text.Encoding.UTF8
xws.CloseOutput = False
Dim test As New System.Text.StringBuilder
'Create the access request portion
Using xw As XmlWriter = XmlWriter.Create(test, xws)
xw.WriteStartDocument(False)
xw.WriteStartElement("AccessRequest")
xw.WriteAttributeString("xml", "lang", Nothing, "en-US")
xw.WriteElementString("AccessLicenseNumber", "LicNum")
xw.WriteElementString("UserId", "UID")
xw.WriteElementString("Password", "PW")
xw.WriteEndElement()
xw .WriteEndDocument()
xw.Flush()
xw.Close()
End Using
Return test.ToString()
And the output is as follows:
<?xml version="1.0" encoding="utf-16" standalone="no"?>
<AccessRequest
xml:lang="en-US">
<AccessLicenseNumber>LicNum</AccessLicenseNumber>
<UserId>UID</UserId>
<Password>PW</Password>
</AccessRequest>
I set the encoding version in the xmlWriterSettings, so why is it putting in utf-16? Also, I dont understand why there is a line feed between the AccessRequest and its attribute. Is this normal?
Thanks
|
|
|
|
|
Use XMLTextWriter as posted above, but be carefull joining two XML docs, a well-formed xml doc must have a single root. You can create a XMLDataDocument from the XMLTextWriter and using XPath Functions (like selectnodes) you can join the docs easily. Once joined, get xml-string. XPath functions return nodes by using expressions (i.e. Select("\ROOT\SECOND_LEVEL\") returns all nodes under <root><second_level>. With the property InnerText u can access to tag value.
Hope it helps
-----------------
Solo hay 10 tipos de personas, las que saben binario y las que no
|
|
|
|
|
That helps yes, thank you. But I am still not understanding why I am getting the utf-16 encoding attribute when I tell it to use utf-8.
|
|
|
|
|
I've tried setting the encoding for TextWriters,
Dim test As New System.Text.StringBuilder()
Dim twriter As StringWriter = New StringWriter(test)
'twriter.Encoding = Encoding.UTF8 -- Readonly
Dim twriter2 As TextWriter = twriter
'twriter2.Encoding = Encoding.UTF8 -- Readonly
Dim xmlWriter As XmlWriter = New XmlTextWriter(twriter2)
...no success...
It seems that VB Strings do not allow other than utf-16 encoding (mmmm, strings are stored that way...) for "memory-string-writers"
Using files and encoding "utf-8" OK.
"I dont understand why there is a line feed between the AccessRequest and its attribute. Is this normal?"
take a look to xws.NewLineOnAttributes = True
-----------------
Solo hay 10 tipos de personas, las que saben binario y las que no
|
|
|
|
|
"take a look to xws.NewLineOnAttributes = True"
Thanks, that was stupidity on my part. So I'm stuck with utf-16 unless I switch away from a string builder/writer. Thanks for the help.
|
|
|
|
|
In VB 6.0 they used the Printer.Print command to be able to print directly from the form to the printer. I am trying to do that same thing by using code to print from the form to the default printer directly using VB .Net. Any thoughts?
Underwood
|
|
|
|
|
I am trying to print a formatted layout from multiple textboxes to the printer.
Underwood
|
|
|
|
|
I need to have the Source code of a programe about “ sending message, picture, sound, video” through the Lan and wireless”, which is written by VB.net. Please send it to my email: ….. Thanks for your reading and replying
i am pham quang dan
|
|
|
|
|
The only way you're going to get the soruce code for an app like this is if you write it! This isn't Rent-A-Coder. Noone here is goign to write an entire app for you, and certainly not for free.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Come on Dave. Surely YOU have plenty of time for a volunteer project!
Nathan Lindley
|
|
|
|
|
Funny you should mention that! I just got notified that I'll be running my ENTIRE site (2 buildings) on generator power only for an entire day. Extension cords running all over the place keeping the network running because the outage will last much longer than the battery power will...
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi All,
I am having one doubt ,is there anyway to draw only vertical lines(not gridlines)
between each column in listview of windows forms.If any one have Idea please guide me how to handle this.
thanks.
Rama
venkat
|
|
|
|
|
The ListView control doesn't support this. There are two ways of doing this. Either finding a control library that has a ListView control that does support what you're looking for, or ownerdrawing the ListView control yourself and supplying the drawing code to draw the entire control.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Is it possible to create a regular win32 DLL using VB? I do not want a ActiveX/COM dll.
|
|
|
|
|
No as I know.
In VB6 you can only create ActiveX/COM Dll's.
In VB.NET you can create ActiveX/COM and .NET dll's.
|
|
|
|
|
But, you can use the dll's you created in VB.NET in other Visual Studio Languages such C#,C++,Java.NET,ASP.NET.
You also may use Dll's you made in the above language in the VB.NET.
This sharing ability build on the CLR(Common Language Resource) of Microsoft that using a helf-native code compiled from the projects and in the CLR runtime compiling it to a native code according to the device CLR setup on (Movile, CE, Microwave, PC, etc.).
|
|
|
|
|
No, it's not. VB6 cannot create anything other than a COM-based DLL.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
hello,
u can create native dlls with a tool from remotsoft(www.remotesoft.com)
|
|
|
|
|
dear all
if i have :
dim s as string="Welcome"
and i need to print s, but i need to change the size(18p) and color(Red) of string , but i dont know how
please help me to change the format of string
kilany
|
|
|
|
|
Mr kilany wrote: and i need to print s, but i need to change the size(18p) and color(Red) of string , but i dont know how
This is nothing to do with the format of the string. It is all to do with where you want to display the string. So, in order to answer your question we need to know where you want your string displayed.
|
|
|
|