|
Yes, you posted that... Now look through all of those errors when you try to compile, and find the error that occurs inside VMS.Library. That'll point you toward the real problem.
Just like the old kids shows... "One of these things is not like the other"
|
|
|
|
|
I chenged the Target Framework to .Net3.5 because as I said before it has no incompatibility with .Net3.5 but there is a new error:
Could not load file or assembly 'System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified
It is so clear why it doesn't compile in this new situation but I did my best.
Meysam
|
|
|
|
|
If you're getting that error when compiling for .NET 4.0 too, it would explain things. A .NET 2.0 control is going to be based on WinForms, whereas a .NET 4.0 project is probably using WPF and won't load the WinForms libraries (System.Drawing among them) unless you specifically add them.
|
|
|
|
|
Hello everyone
I need to generate a PDF417 bar code and do the reverse operation.
but the problem is that the text I need to encode is in Arabic like "أ ب ت ث ... "
I found a lot of SDK and online programs that help generating and reading pdf417 bar codes, but non of them support the Arabic language.
could anyone help me with that? and do I need to build a program for the whole pdf417 encoding which needs time?
|
|
|
|
|
Well, I haven't done any PDF417 processing in about twenty years, but if you've already found libraries to convert the Latin (English) alphabet, then why not just convert? Just build a quick mapping table to translate each Arabic character to a Latin character... There are more than 26, but they don't seem to use upper or lower-case, so you've got 52 items to map to.
|
|
|
|
|
thank you Ian for your reply
It's a good idea when the bar code is decoded by only my decoder,
but I want it to be also decoded by any decoder that supports Arabic if exists
|
|
|
|
|
Well, after some quick googling, it seems PDF417 was never updated to support Unicode (Even the much newer QR codes don't do it), so it only does single-byte characters. As there doesn't seem to be a widespread standard for encoding them, you might be out of luck there.
Looks like most people are using Base64 encoding to get Unicode data in there, though, so if anything later becomes standard, that'll probably be it.
|
|
|
|
|
I'm trying to update a portion of a byte array with modified data and for some reason it's always unchanged. Any input would be appreciated.
Right now, I have a temporary array that I'm trying to do an array copy for part of the array to update the data. This isn't working. Before that, I didn't have a temporary array and was doing basically the same thing with the destination array. The data locations I'm writing to are 0 after the update, but I am seeing the correct data in my tempStrings and convertStringToBytes method.
private void updateDatWithData()
{
int returnCode = 0;
byte[] tempByteArr = new byte[Dat.Length];
String tempString = (configNum[0].ToString() + configNum[1].ToString());
byte tempByte = 0;
returnCode = convertStringToByte(tempString, ref tempByteArr[index + 4]);
...
Array.Copy(tempByteArr, (index+ 4), Dat, (index + 4), 5);
}
private int convertStringToByte(String theString, ref byte theByte)
{
int returnCode = 1;
try
{
theByte = System.Convert.ToByte(theString);
}
return returnCode;
}
|
|
|
|
|
You have a try without a catch or finally, so I don't see how your code is compiling. Simplifying your problem:
private int convertStringToByte(String theString, ref byte theByte)
{
theByte = System.Convert.ToByte(theString);
return 1;
}
public void RunSnippet()
{
byte[] tempByteArr = new byte[]{1};
convertStringToByte("3", ref tempByteArr[0]);
Console.WriteLine(tempByteArr[0]);
}
The above code works, so the basic logic of what you have is OK, just an implementation problem.
I'd suggest a different methodology. It looks like you are trying to implement Byte.TryParse method, you may want to look at it. If you need more information than a plain boolean, implementing your own is easy:
public static int ConvertStringToByte(string s, out byte result)
{
try
{
theByte = System.Convert.ToByte(theString);
}
catch
{
return 0;
}
return 1;
}
|
|
|
|
|
My code actually has a catch for my try. I just didn't include it here to simplify.
So it works for you basically as-is?
|
|
|
|
|
It is working. Given what you have said, the problem could well be in the catch . You need to step through your code to determine what is happening exactly, unless someone here come up with a full solution.
|
|
|
|
|
Ok. I figured it out. I was constructing one of my strings wrong and wound up with one that was 282, so it was throwing an exception when it tried to convert to byte and never got to copying the temp array to my final Dat array.
|
|
|
|
|
|
Lesson learnt: Never write an empty catch block.
|
|
|
|
|
void GetNameChangedToProtectTheInnocent()
{
try
{
...
}
catch
{
}
}
There you go - not empty! Written by yours truly, only 10mins ago . In my defence, it's important that the site doesn't throw errors and this is what the rest of the site does.
|
|
|
|
|
Fair enough, but it should at least be logged for investigation. If it's unimportant and not worth logging then it should be handled in code so the exception never arises.
|
|
|
|
|
I was being a bit (OK, very) toungue-in-cheek. 99.99% of the time I really wouldn't do this. In this case he exception is very unimportant, for various reasons I'd have to write my own logging infrastructure (which would take longer than the rest of the change, and my code is slated for replacement by an MVC app very soon) and I can't handle in code as the try-block is calling out to an asmx service and I'm guarding against technical errors. I could, I suppose tighten which errors are being caught.
|
|
|
|
|
Actually, my catch block had a lot in it. It was just not included in my post!
|
|
|
|
|
In Visual Studio, You can enable breaking at an exception even when it is caught and handled. This will be very useful during debugging.
|
|
|
|
|
I wonder if it's my data. My strings are "00", "55", "20", "00", and "99".
|
|
|
|
|
plz i need link of proggrams in c# concern with panorama images (stitching image)
help me
|
|
|
|
|
Please read the top message on this board ("How to ask a question") otherwise people will down-vote your question. Asking for code like this is unlikely to get a response as we are pretty much all volunteers here. Everyone will assume you have tried nothing even if, in reality, you have spent hours figuring it out - we can't tell. Stitching photos isn't a facile task, and unlikely to be answered in a forum post.
It is better to ask a specific question, outlining what you have tried to achieve, or, what the exact problem is you are having getting started. Oh and a title of "hello isn't very descriptive"
|
|
|
|
|
|
See this[^] excellent article that uses the Accord and AForge frameworks.
/ravi
|
|
|
|
|
Hi,
I want to know how to store data in excel using VC# 2010.
i.e.) i will enter the values in UI say name and age, and i want those values to reflect in my Excel sheet without using any database.
Can anyone please share me the code for this.
|
|
|
|