|
This is the second time you have asked this question, and even though Christian suggested using Google, you don't appear to have done it. Try searching for SAPI VOICES and see how many hits you get.
|
|
|
|
|
quadrilateral wrote: Any Suggestions?
Any and all help is appreciated.
Apparently not, because I solved it for you, and you are asking the same thing again, without any reference to the things I suggested you try. Perhaps you're just out of your depth ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
We have a requirement for the users to be able to paste data from Excel into a Data Grid View in a vb.net application.
I have constructed the following based on the post here[^] on working with the clipboard, and article here[^] on working with XML data .
If Clipboard.ContainsData("XML Spreadsheet") = True Then
Dim ms As MemoryStream = CType(Clipboard.GetData("XML Spreadsheet"), MemoryStream)
Dim b(CInt(ms.Length)) As Byte
ms.Read(b, 0, CInt(ms.Length))
Debug.Write(CStr(System.Text.UTF7Encoding.UTF8.GetString(b)))
'=====================================================
Dim m_xmld As XmlDocument
Dim m_nodelist As XmlNodeList
Dim m_node As XmlNode
'Create the XML Document
m_xmld = New XmlDocument()
'Load the Xml content from the clipboard
m_xmld.LoadXml(System.Text.UTF8Encoding.UTF8.GetString(b))
'Get the list of name nodes
m_nodelist = m_xmld.SelectNodes("/Workbook/Worksheet/Row")
'Loop through the nodes
For Each m_node In m_nodelist
'Row data code here
Next
'=====================================================
Else
MsgBox("No XML Spreadsheet data on clipboard")
End If
Am getting the error:
'.', hexadecimal value 0x00, is an invalid character. Line 35, position 1.
Line 35, position 1 corresponds to the end of the XML Spreadsheet data from the clipboard each time.
XML Data is copied from the clipboard OK but don't know if the character encoding is different maybe? Or do I need to strip some characters out?
Just can't seem to get past this error I'm sure its something obvious that I'm missing.
Any ideas?
Thanks in advance.
Alex.
|
|
|
|
|
Not sure about this particular scenario, but this error comes in case your XML contains trailing empty characters. Trimming up the values while reading might just do the trick.
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
Thanks for the reply d@nish. Had tried a straightforward trim() already with no success. Eventually tracked down a sample function here[^] to strip the illegal chars.
Public Function CleanString(ByVal s As String) As String
Dim st As String = s
For i As Integer = 0 To 7
st = st.Replace(Chr(i), "")
Next
For i As Integer = 11 To 12
st = st.Replace(Chr(i), "")
Next
For i As Integer = 14 To 31
st = st.Replace(Chr(i), "")
Next
Return st
End Function
Seems weird though that Excel would produce XML that was not able to be directly used elsewhere without some kind of 'Clean up' operation. Or am I missing an obvious easier way round this??
Cheers,
Alex
|
|
|
|
|
Hi,
I want to paste Texts and Table from RichTextBox to Email Body.
Is it possible?
Dim mm As New System.Net.Mail.MailMessage(FrmMail, ToAddress)
blah...blah...blah...
richtextbox5.copy
mm.body=richtextbox5.paste ???????????
Suppose, "mm.body=richtextbox5.text" is not displaying the table lines...
Any Ideas, Thanks
|
|
|
|
|
1. don't double post. If anybody knows, and has the time, they will answer.
2. have you tried anything or are you just wanting someone to write your code for you?
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
Hi Bob,
Sorry Bob.
If someone searched for Richtextbox to email body or msword to email body messages, those posts will help them.
Otherwise I wont create.
Anyhow thanks for the suggestion.
Iam looking for sample.
|
|
|
|
|
Well, an email body is just a string, you have to set the format in other ways. Google for html or rich text emails and you should find plenty of pointers.
Secondly, have you ever seen richtextbox.paste because haven't - its not a function. In code you paste from the clipboard, but thats not what you need to do here.
There are loads of examples for sending formatted email if you search for them, but remember, regardless of the format you create in, its the recipients email client that decides how to display, and many people choose plain text so all your efforts go out the window.
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
Hi,
1. I have a table in MS-Word Document.
Is it possible to copy that table to my Email-Body with table lines?
Any ideas ?
Thanks
|
|
|
|
|
Paramu1973 wrote: I have a table in MS-Word Document.
What version of Word?
Paramu1973 wrote: Is it possible to copy that table to my Email-Body with table lines?
Yes. The email needs be in HTML-format though, as a text-only message would need be converted to ASCII-art.
Paramu1973 wrote: Any ideas ?
Save it as RTF or HTML and grab the piece that describes the table
--edit--
Just saw an unanswered question, noticed the other thread too late. Sounds like good advice to me
I are Troll
|
|
|
|
|
Dear All
I am writing a simple program for a billing system. I use a cash drawer and a dot matrix printer. When I give a print command, I want to open that cash drawer tray. Can anyone help me to write the code for that?
Thanks
|
|
|
|
|
how do you connect to the cash drawer mechanism? maybe the SerialPort class can help you?
you are not givvin' us much info to work with.
|
|
|
|
|
First, stop what you are doing, chuck VB6 out and download VB.Net express, IT IS FREE. It may be a bit of a learning curve but at least it is a supported platform. VB6 is a DEAD platform.
|
|
|
|
|
What makes you think anyone can help you, without knowing what sort of cash register you have, how it works, and how you hope to interact with it ? As someone else said, VB6 is rubbish, you'd have to be insane to start a project with it today.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
As others have comment, VB6! history!
I would add, dot matrix printer? equally history.
In fact, a "program to open a cash drawer when you print", surely all cash registers come with that functionality built in!
If you have knowledge, let others light their candles at it.
Margaret Fuller (1810 - 1850)
www.JacksonSoft.co.uk
|
|
|
|
|
The Man from U.N.C.L.E. wrote: As others have comment, VB6! history!
I would add, dot matrix printer? equally history.
There are quite some developing countries who are still living in that history. The world isn't upgrading as a whole, and it'll take a while before everyone saved enough money to buy Windows 7 and a new dual-core.
We're talking developing countries, where the companies aren't interested in the support that Microsoft isn't giving on VB6. Think computers that run Windows 98 without automatic updates. You don't want to install .NET on such a machine
I are Troll
|
|
|
|
|
I have a friend here in UK who only upgraded from Windows 98 last year, and only then because he wanted to go to broadband.
|
|
|
|
|
In that case, they should use C++, surely ? VB6 was NEVER a good option.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Christian Graus wrote: In that case, they should use C++, surely ? VB6 was NEVER a good option.
+5
To answer; that depends on my role vs. them
I'd go for Delphi off course, and would recommend them a UI around the "cash-drawer-opening-interface" in Microsoft Access. Cheaper, easier to modify, and not much real chance of breaking important code.
Since that would need be compiled separately. Nicely decoupled from the UI, just as best practices prescribe.
But in their case? Well, VB6 is available, and there might not be that many C++ developers available o'er there.
"Where there's muck there's brass"
|
|
|
|
|
Eddy Vluggen wrote: As others have comment, VB6! history!
I would add, dot matrix printer? equally history.
Dot matrix printers still have a big share in ticket printer market.
About vb6, I agree, it is totally deprecated. For serial communications you need an OCX component, while .net has it in the Base Class Library.
Best regards,
Jaime.
|
|
|
|
|
Brand and model is always a helpful
Best regards,
Jaime.
|
|
|
|
|
Thanks for all of your comments. Only one has given a helpful word. Anyway I like to explain you. I am not a professional software developer. But I was a VB developer 10 years ago. Now it is too late to learn a new language. Because now I am in a differant field. and also I am in a developing country. These days I am developing a small software and I am using a cash drawer. But the problem is it has no serial interface. It has a cable with a RJ11 connector.
|
|
|
|
|
mwith wrote: But the problem is it has no serial interface. It has a cable with a RJ11 connector.
Which fact you did not mention in your first post.
So what protocol does it use to communicate with its host? You have also not given any clue as to what software interface is available with this machine. For example what character sequence do you need to send to the cash drawer to make it open?
|
|
|
|
|
Hello everyone,
Can someone guide me how to create a setup & deployment project in Visual Studio 2005 for my VB.net application with sqlserver 2005 express database & crystal report?
What will be the system requirement for this and what pre-requisite s/w installations are required before installing this setup?
|
|
|
|