|
In VC++ 6, I thought there was a way to accomplish this at compile time in the Project Settings menu by optimizing the code. I could have been wrong though. However, at run time will do just fine. Accoustic, showed me a function to call to set this level. I am just not sure if this goes inside the thread that I called or if it goes inside the function that spins the tread off.
|
|
|
|
|
It depends on if your prgram is mult-threaded.
If it is not MT, add Accoustic's code to your program's constructor.
If it is MT, then just change the priority of the thread doing the conversion.
|
|
|
|
|
Thanks guys. I am going to try this out.
|
|
|
|
|
Hello All,
I hope this is a question with a simple solution that I've overlooked. I am loading an image reference (URL) into a ASP.NET image control when the page loads. The problem is that I'm loading a reference from an MLS system and the image link is occasionally broken.
Is there a simple way to reference a property of the image control to tell if the image sucessfully loaded? If so, I can't find it. Currently I'm using code to detect if the URL is valid before setting the property of the image control. This requires a round trip to the image host server to detect a 404 response. It works, but is SLOW when there are more than a dozen pictures. I hate slow...
Any help is appreciated.
Cheers,
Will
|
|
|
|
|
First, this really belongs on the ASP.Net board, but I'll take a whack at it anyway...
I don't know your reasons for caring why/when an image doesn't load, so I'm not sure how useful I can be, but the image loads on the client. You could add attributes to the Image (or HtmlImage) control to execute javascript on a load failure (OnError I think), but that would only work in IE.
In general, could you not just check the image dimensions (still on the client side)? I think the width and height would be zero if the url was not available, and that should work on almost any browser.
Hope this helps.
The most exciting phrase to hear in science, the one that heralds the most discoveries, is not 'Eureka!' ('I found it!') but 'That's funny...’
|
|
|
|
|
can we parse eml file... as in is there any way apart from taking the data as text and getting data out of it by Regular Expression...
|
|
|
|
|
Hi, all.
I'm a bit of a newbie to C# and .NET. I want to create an on-screen keyboard for a touchscreen. They keyboard itself is easy enough, but I'm not sure how to "stuff" the keystrokes into the keyboard buffer. There's probably a better way than "stuffing" to begin with...
I want to be able to pop up a keyboard, and have keystrokes entered into the control that had focus before the keyboard appeared.
Any suggestions, or pointers to useful articles would be appreciated.
Thanks.
Len
|
|
|
|
|
Almost every tochscreen ive ever seen has come with onscreen keyboard software bundled in with them - is there some reason why that or a 3rd party app will not do (ie, is this a leaning excercise?)
|
|
|
|
|
That it a good point. I haven't received the monitor yet, and the product info doesn't say if it comes with a utility to do this. However, having said that, I'm using this in a machine automation application, and would still like to be able to customize the user interface... probably not possible with a third party tool.
So, if anyone knows how to do this, I'm still very interested.
Thanks.
Len
|
|
|
|
|
Can anyone please help me to use Highlighter.net.
my requirement is as follows:
when i click on the filename which is in a listbox, the file content should be displayed in a textbox, and the search words should be highlighted.
|
|
|
|
|
Hi
I got following function. When I debug the code '"+Name+"' is
Name="System.Data.DataRowView".
Does anybody knows why?
private void menuItem1_Select(object sender, System.EventArgs e)
{
string Name = this.listBox1.SelectedItem.ToString();
OleDbConnection conn = new OleDbConnection(connString);
OleDbCommand dbCommand = new OleDbCommand("SELECT Beschreibung FROM tbl_T5 WHERE (Rechner = '"+Name+"')", conn);
conn.Open();
OleDbDataReader dbReader;
dbReader = dbCommand.ExecuteReader();
dbReader.Read();
if (dbReader.HasRows)
{
this.menuItem2.Text = dbReader["Beschreibung"].ToString();
}
dbReader.Close();
conn.Close();
}
|
|
|
|
|
That's quite easy:
Name is set at exactly one location, so the value you see is the result of this.listBox1.SelectedItem.ToString(); .
That means the selected item in your listBox1 is a DataRowView . DataRowView doesn't have an overloaded ToString method, so you simply get the type name.
But what's the question? Obviously you expect Name to be something else. Could it be that you don't want one of listBox1's items?
Without further info we can only guess...
mav
|
|
|
|
|
Try replace this.listBox1.SelectedItem.ToString(); by this.listBox1.SelectedItem.Text;
|
|
|
|
|
got it..
DataRowView dv =(DataRowView)this.listBox1.SelectedItem;
this.menuItem2.Text = dv["Beschreibung"].ToString();
Thank you
|
|
|
|
|
Hi,
Can I use c#.net to automate Outlook Express ?
Btw, are there any C# based MAPI for communicating with Outlook Express ?
Many Thanks
|
|
|
|
|
|
Thanks for ur reply.
So it means I need to access outlook express with MAPI ?
And do you know any c# based MAPI component or code reference for MAPI with outlook express ?
|
|
|
|
|
Automation does not work with Express. MS wants you to pay for Outlook to do automation.
|
|
|
|
|
Hi Geeks,
I am quite new to creating skinnable applications.
Could anyone tell me how to approach this work in C# .Net.
I checked out some links but most of them are commercial.
Basically i want to add a new feature to my application,
so that custom skins can be used as required.
Thanks,
know THE WAY,
-SimSan
|
|
|
|
|
Hi buddies,
I had an xml like "<Pu><Name>Joe&&&&&&&</Name><Age>redroom</Age></Pu>"
when i am tried with the code in c# as,
1.
tmp_Message = "<Pu><Name>Joe&&&&&&&&&&&</Name><Age>redroom</Age></Pu>";
XmlDocument xXD = new XmlDocument();
xXD.LoadXml(tmp_Message);
it is throwing error.
2.
can i get any function to check, if a given string is a proper xml or not in C#
please..... help me ..!!!! in solving this error.
regards,
vinu
|
|
|
|
|
Of course is XmlDocument.LoadXml() throwing an exception, because of all the ampersands in your string.
They must be escaped as &
Using LoadXml() in a try/catch is a way to check for proper XML.
Regards,
mav
|
|
|
|
|
hi mav,
it is not throwing error if i escaped with a single & if i use like &&&&&&&&&& then it is throwing error.
i think its not a good way, if i use try/catch to check.
please help with a solution.
vinu
|
|
|
|
|
hi mav,
it is not throwing error if i escaped with a single & if i use like &&&&&&&&&& then it is throwing error.
i think its not a good way, if i use try/catch to check.
please help with a solution.
vinu
|
|
|
|
|
Of course you have to escape every & as & .
If you do this, the xml string is correct and no exception is thrown.
AFAIK there's no ValidateXml method available, so trying to load the string and looking for an XmlException seems to be a reasonable way.
Regards,
mav
|
|
|
|
|
Thanks mav.
Regards,
Vinu
|
|
|
|