|
annie_bel wrote: but resultant shows garbage value.
That's because the file is in RTF format: read this[^].
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
Hi,
I'm using visual studio 2010.
And when i run the project on debug mode from the visual studio - and some exception is appear i see strange message box that tell me that some exception appear ( the message is "external exception e043..." ).
I cant see the line in the code that make the problem and i don't know in this way what i need to fix in the code.
I think this is something with my debug option - but i don't know how to fix/solve it.
The try...catch block does not help - and this message appear in any case.
I also heve problem to kill the process thru the task manager on some cases
Someone can help here ?
Thanks.
P.S: how can i add screenshot to my new message ?
|
|
|
|
|
You will need to step through the code, one line at a time until it blows up. Do you have an idea of where it might be falling apart? Is there a point in the process of the app that it all starts to go wrong? Start from there.
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
In the pass ( visual studio 2008/2005 ) when i run on debug mode - i could see that the code stop and the IDE show me the line that cause the exception.
This is what i want to see in the visual studio 2010 ...
Step into the code using step by step is something that can take a lot of time.
|
|
|
|
|
Yanshof wrote: In the pass ( visual studio 2008/2005 ) when i run on debug mode - i could see that the code stop and the IDE show me the line that cause the exception.This is what i want to see in the visual studio 2010 ...
This is not completely correct, because the IDE only switches to the line if the exception is not caught anywhere (or you changed the settings under Debug->Exceptions).
I do not have much experience with VS2010 but I think it behaves the same.
I think your problem is, that somewhere this exception gets caught and a message box is displayed.
Greetings
Covean
|
|
|
|
|
As digital_man said, single step is one way to find it. The other is: on the VS Menu bar, "Debug...Exceptions..." tick every single box on the resulting dialog, press OK.
Now VS will trap exceptions for everything, whether they are handled or not. This is a right PITA so you will want to reset them when you have found the problem, but sometimes it is teh only way to find a proper c**k-up.
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
|
|
|
|
|
Hi,
I wish to create an unattended automated installation for MSMQ component with no http support for both of the mentioned OS.
As i have never done this before, kindly if anyone can help, i will be most thankful.
|
|
|
|
|
hi! friends,
i have .txt file. from this file, i retrieve the information contain it, and display in another page.
my problem is that, i am not retrieve multiple lines from the page.
because i have coded multiple
sr.readLine() , which is not good.
please guide me, how am i retrieve all the information from the page.
StreamReader sr = new StreamReader("c:\..\abc.txt);
string strline = "";
strline = sr.ReadLine();
strline = sr.ReadLine();
sr.Close();
thanx and regards
|
|
|
|
|
use sr.ReadToEnd() to get all the data in the txt file as a string.
I bug
|
|
|
|
|
Hi,
one solution:
const string f = "TextFile1.txt";
List<string> lines = new List<string>();
using (StreamReader r = new StreamReader(f))
{
string line;
while ((line = r.ReadLine()) != null)
{
lines.Add(line);
}
}
|
|
|
|
|
Thanx a lot all of u. really it's very easy. Actually i just started dotnet. so, i was worried.
again thanx
|
|
|
|
|
Another solution:
string[] lines = File.ReadAllLines(@"c:\MyFile.Txt");
There are nearly always multiple ways to do anything in .NET!
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
|
|
|
|
|
hi,
how create a multi file assembly in .net 3.5
|
|
|
|
|
amit sahu20 wrote: how create a multi file assembly in .net 3.5
1) Install VS
2) Run VS
3) From the file menu, select "New...Project"
4) Select your project type, name it, etc.
5) Code your project, making sure to store the code in several files.
6) Hold down CTRL and SHIFT , then press the "B" key.
If this is not helpful, then try giving a little information on what it is you actually want to do.
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
|
|
|
|
|
I used the custom Rendering Ink to build a custom brush. I create a customized dynamic renderer that derives from the DynamicRenderer and override the OnDraw method. In OnDraw method, i need to do a lot of drawEllipse(). After that, the computer becomes very slow. Guys, do you have any solutions about that?
Thanks a lot!
|
|
|
|
|
Since you didn't provide much to work on, and haven't shown any code, all I can do is suggest you read this little article[^] and check the rules outlined there.
|
|
|
|
|
protected override void OnDraw(DrawingContext drawingContext,
StylusPointCollection stylusPoints,
Geometry geometry, Brush fillBrush)
{
// Create a new Brush, if necessary.
if (brush == null)
{
brush = new LinearGradientBrush(Colors.Red, Colors.Blue, 20d);
}
// Create a new Pen, if necessary.
if (pen == null)
{
pen = new Pen(brush, 2d);
}
// Draw linear gradient ellipses between
// all the StylusPoints that have come in.
for (int i = 0; i < stylusPoints.Count; i++)
{
Point pt = (Point)stylusPoints[i];
Vector v = Point.Subtract(prevPoint, pt);
// Only draw if we are at least 4 units away
// from the end of the last ellipse. Otherwise,
// we're just redrawing and wasting cycles.
for (int j=0; j<1000, j++)
{
// Set the thickness of the stroke based
// on how hard the user pressed.
double radius = stylusPoints[i].PressureFactor * 10d;
drawingContext.DrawEllipse(brush, pen, pt, radius, radius); That's the problem...
prevPoint = pt;
}
}
}
|
|
|
|
|
My graphics tablet has 512 pressure levels, and a point resolution of 1016 dpi and reports approx 100 times a second. How many ellipses do you think you are drawing?
And you are wondering why it is slow?
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
|
|
|
|
|
Each stroke i will draw 100 points around it.
I know the reason why it's slow. I want to avoid this situation. So ask all whether you have other solutions.
|
|
|
|
|
Tony Honter wrote: Each stroke i will draw 100 points around it.
Your code draws ten times that!
Tony Honter wrote: for (int j=0; j<1000, j++)
You are aware that compilers don't turn comments into code, aren't you?
Tony Honter wrote: // Only draw if we are at least 4 units away
// from the end of the last ellipse. Otherwise,
// we're just redrawing and wasting cycles.
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
|
|
|
|
|
I hope others have or will give a solution. I didn't study all that, for obvious reasons.
I did notice an interesting comment ("Only draw if...") but did not see its implementation.
|
|
|
|
|
Graphics may use up a lot of resources. Sometimes it may help to explicitly call the Garbage Collection:
GC.Collect();
GC.WaitForPendingFinalizers();
|
|
|
|
|
hi guys
i want to read sms with gsmcomm from nokia phone but i cant read and get error
whats problem ?
from gsmcomm or phone?
thanks
|
|
|
|
|
What's the error and what's the code?
|
|
|
|
|
DecodedShortMessage[] messages = CommSetting.comm.ReadMessages(PhoneMessageStatus.All, storage);
foreach(DecodedShortMessage message in messages)
{
Output(string.Format("Message status = {0}, Location = {1}/{2}",
StatusToString(message.Status), message.Storage, message.Index));
ShowMessage(message.Data);
Output("");
}
Output(string.Format("{0,9} messages read.", messages.Length.ToString()));
Output("");
error:Phone reports generic communication error or syntax error.
of curse i get this code from this site mean codeproject
|
|
|
|