For those new to message boards please try to follow a few simple rules when posting your question.
Choose the correct forum for your message. Posting a VB.NET question in the C++ forum will end in tears.
Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
Keep the subject line brief, but descriptive. eg "File Serialization problem"
Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.
Be careful when including code that you haven't made a typo. Typing mistakes can become the focal point instead of the actual question you asked.
Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.
If you are posting source code with your question, place it inside <pre></pre> tags. We advise you also check the "Encode "<" (and other HTML) characters when pasting" checkbox before pasting anything inside the PRE block, and make sure "Use HTML in this post" check box is checked.
Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.
Please do not post links to your question into an unrelated forum such as the lounge. It will be deleted. Likewise, do not post the same question in more than one forum.
Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.
If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
No advertising or soliciting.
We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.
I'm writing software for Intermec CK3X mobile barcode collector, I use the Intermec reference dll files (Intermec.DataCollection.CF2.dll). When a barcode is read the bcr_BarcodeRead method is executed. The problem is that when some error appear inside this method, for example format exception in line:
int x = Convert.ToInt16("some text");
then in Visual Studio 2008 in debug mode I get "No symbols are loaded for any call stack frame. The source code cannot be displayed". But when I put those line in onButtonClick() method then VS can show me exactly a line with the error.
Why VS can't show me error line in bcr_BarcodeRead method?
I was looking for a way to write unicode characters to an INI file. I stumbled upon some solutions which were not satisfactory: they involved ANSI/UTF-8 files. So here is a workaround.
Private Declare Ansi Function WritePrivateProfileString _
Lib "kernel32.dll" Alias "WritePrivateProfileStringA" _
(ByVal lpApplicationName As String, _
ByVal lpKeyName As String, ByVal lpString As String, _
ByVal lpFileName As String) As Integer
Private Declare Auto Function GetPrivateProfileString Lib "kernel32" (ByVal lpAppName As String, _
ByVal lpKeyName As String, _
ByVal lpDefault As String, _
ByVal lpReturnedString As StringBuilder, _
ByVal nSize As Integer, _
ByVal lpFileName As String) As Integer
Public Function GetPrivateProfileStringUnicode(ApplicationName As String, KeyName As String, FileName As String) As String
Dim sb As New StringBuilder(500)
GetPrivateProfileString(ApplicationName, KeyName, "", sb, sb.Capacity, FileName)
Dim Value As String = sb.ToString
If InStr(Value, "#") = 0 Then
'No #-character found, so there is nothing to convert back
Dim i As Integer
Dim Parts() As String = Split(Value, "#") 'Split value to array
For i = 1 To UBound(Parts) Step 2'If i is an odd number Parts(i) always contains a integer which should be converted back
Parts(i) = Trim(ChrW(CInt(Parts(i))))
Return Join(Parts, "") 'Return the joined array Parts
Public Sub WritePrivateProfileStringUnicode(ApplicationName As String, KeyName As String, Value As String, FileName As String)
'First escape the #-character
Dim NewValue As String = Replace(Value, "#", "#" & Asc("#") & "#")
If IsUnicode(NewValue) Then
'Value has unicode characters; we convert them to integer value preceded and followed by a #-character
Dim i As Integer
Dim ValueUnicode As String = ""
For i = 1 To Len(NewValue)
Dim strChar As String = Mid(NewValue, i, 1)
If AscW(strChar) > 255 Or AscW(strChar) < 0 Then
strChar = "#" & AscW(strChar) & "#"
ValueUnicode = ValueUnicode & strChar
'Write converted string to INI file directly
WritePrivateProfileString(ApplicationName, KeyName, ValueUnicode, FileName)
'No unicode characters, so write to INI file directly
WritePrivateProfileString(ApplicationName, KeyName, NewValue, FileName)
Private Function IsUnicode(input As String) As Boolean
Dim asciiBytesCount = Encoding.ASCII.GetByteCount(input)
Dim unicodBytesCount = Encoding.UTF8.GetByteCount(input)
Return asciiBytesCount <> unicodBytesCount
If you are so easily offended by people POLITELY telling you this is the wrong place, especially after you being a member for over 7 YEARS and you have apparently not read any of the posting guidelines in that time, then you really need to grow a much thicker skin.
Speed of sound - 1100 ft/sec
Speed of light - 186,000 mi/sec
Speed of stupid - instantaneous.
I need help for sign an XML files with (signature tag). Nothing problem if the platform is a standard PC but in .NET COMPACT FRAMEWORK for windows mobile 6 I have problems. First .. exist Systems.Security in .NET CF? 2.0 or 3.5? Where are?
this is my code for Pc ..:
PublicFunction Firma(ByVal XmlFile asString) AsBooleanDim signedXML asString = "c:\signedXML.xml"' setup the document to sign
Dim doc As XmlDocument = New XmlDocument()
Dim signer As SignedXml = New SignedXml(doc)
'setup the key used to sign
Dim key As Security.Cryptography.RSA = New Security.Cryptography.RSACryptoServiceProvider()
signer.KeyInfo = New Security.Cryptography.Xml.KeyInfo()
signer.SigningKey = key
'create a reference to the root of the document
Dim orderRef As Security.Cryptography.Xml.Reference = New Security.Cryptography.Xml.Reference("")
orderRef.DigestMethod = "http://www.w3.org/2001/04/xmlenc#sha256"
'add transforms that only select the order items, type, and
'compute the signature, and add it to the document
For my school, I developed a small Access database application using Visual Studio 2010 (VB). The application installed just fine on the laptop I use and on another teacher’s laptop, too. The application runs on my laptop, but the other teacher receives the following error message when she tries to run the application: “The feature you are trying to use is on a CD-ROM or other removable disk that is not available. Insert the program disk and click OK.”
Please point me in the right direction. Is this a setup project/installation design problem, or is it something that can be fixed in Windows?
I'd be glad to provide more details if that would help ... just didn't want to write a book.
That error is as generic as it gets. It could be from Windows where a feature your code used is set to "install on first use" or it be from a missing pre-requisite that your application needs to run.
Given that you're using Access as a database, any machine that runs your code either needs the version of Office installed that you wrote the code against (Access is part of Office) or you need to install the appropriate Access Runtime for whatever version of Access you targeted.
On my home (development) PC I had the same problem if I logged in to my Family account rather than my Admin account. Even though the application (and Access) were installed for both accounts, the error occurred. Strange ... but I could at least duplicate the problem again here at home.
So I tried launching the application again from the Family account. This time when the error message appeared, I just plugged in the flash drive containing the .MSI file and pointed the dialog to it. The application then proceeded to launch normally. As a further test, I then unplugged the flash drive, logged out, and logged back in. This time I was able to launch the application without getting the error message at all. So apparently something was “fixed” by pointing the dialog at the .MSI file the first time.
I wish I understood why this was necessary. Then maybe I could do something to prevent it in the future. I don't want to waste your time trying to track down the source of such a generic error, but if you have any more quick-and-easy insight I'd appreciate it.
Meanwhile, at least I know the work-around. Thanks again for your help!
I have designed a Component that has a property which is a list of a different Component, which I need to be able to populate at design time or runtime. I have the property designer popping up a collection editor fine when I want to add the children to the parent. The problem I am having is that the children are being added to the Form's ComponentCollection, rather than the parent Component's ComponentCollection.
I figure I am missing something pretty basic here, but how do I get the children added to the parent's ComponentCollection rather than the form's? I've just spent the last 6 hours searching google and MSDN, to no avail.
It doesn't matter how often or hard you fall on your arse, eventually you'll roll over and land on your feet.
Last Visit: 31-Dec-99 18:00 Last Update: 27-Oct-16 7:56