|
You could use the RichTextBox[^] control. It supports formatting.
|
|
|
|
|
But would RichTextBox control be as slow as label control?
Someone suggested using paint control. Do you know how to do that?
|
|
|
|
|
The rtb should be much faster than dynamically creating a mess of labels.
Paint isn't a control, it's an event for your form. It's more flexible, but if you're a beginner the price in increased effort needed to use is probably not worth it.
|
|
|
|
|
I managed to displayed text by using graphic object.
g = tabPage1.CreateGraphics();
g.DrawString(text, fnt, brsh, x, y);
g.Dispose();
I used labels before and the tabPage was scrollable (tabPage.AutoScroll = true). But now it is not scrollable any more and thus those text at the bottom are missing from the tabPage. Do you know why?
-- modified at 11:48 Tuesday 30th May, 2006
|
|
|
|
|
how to use atan2()? please help and show some example of it...thanks alot
|
|
|
|
|
Why do you want to use a function, that you dont know what it does?
|
|
|
|
|
char s[7];
long x,y,z;
float rad2;
sprintf(string,"%c", buffer1[0]);
x=atol(string);
printf(lcd_putc,"X=%ld", x);
sprintf(string,"%c", buffer1[9]);
y=atol(string);
printf(lcd_putc,"Y=%ld", y);
rad2 = atan2(x,y);
printf(lcd_putc,"%3.2f", rad2);
This is my program. I wanted to use the arc tangent formula to calculate the degree. I would really appreciate if anyone can tell me what's wrong with my program and what can i do to solve it. Thankx..
|
|
|
|
|
|
Then where should i post this?
|
|
|
|
|
|
i need help urgently..can someone point out the mistake in that code? thanks alot
|
|
|
|
|
hi all,
is it possible to search (parsing source of site) jpgs in a web-site and save them in a folder on my computer ?
let's say website is : www.blablabla.com i want to give this address as the url and get all the images in that site ?
any suggestions ? or a document explaning this source code searching methods ?
thanks in advance,
bye.
|
|
|
|
|
|
Hello Mehmet
You could write a program that access the folders of the site directly, enumerate its content and choosing jpg files to download. The problem is that you'll get an "unauthorized access" thrown at your program, and to get around it this will be hacking, and you may get busted for this.
Another more complicated and less effecient way -which is used by almost all site downloader programs-, is to parse the source code of the page as html text. search for jpg files in the text, and extract the link and download it. the algorithm may look like this:
1- IndexOf("jpg")
2- GoBackToIndexOF("<ahref>") -or whaterver is the begining of the image link-
3- Read what's between as ImgLink
4- Download ImgLink
If you want to download images in subpages do the same algorithm to access these pages and parse them.
|
|
|
|
|
Hi,
You can use this web crawler:
Web Crawler
And when the NewPage event is fired, check out the contenType, and if it is a jpeg then save it.
The buffer of the image can be found in the WebPage object.
Eran Aharonovich (eran.aharonovich@gmail.com )
Noviway
|
|
|
|
|
Hello CP,
I have following code to test if a textbox (by a clicking event) has only number-values:
<br />
double parsed;<br />
if (double.TryParse(textBoxPrijs2.Text, out parsed))<br />
prijs = parsed;<br />
Now,
when I enter 50 and click the button it works fine.
when I enter 50.5 and click the button it works fine (it parses 505).
when I enter 50,5 and click the button it doesn't work the way I want (it parses 50.5)
but I want it to add the exact value (containing the comma) to "prijs".
Can somebody help?
Tnx!
|
|
|
|
|
The meaning of , and . in a number depends on the culture of the current thread (default is set with regional settings). If you want to force it, use a specific IFormatProvider (or whatever it is called, writing from memory and due to IntelliSense the memory is quite bad), for example:
new CultureInfo("en-US", false);
It is quite common people forget adding the "false" parameter - and the program still works great.... until it run into changed regional settings.
|
|
|
|
|
TNX!
See reply, second post
Again tnx!
|
|
|
|
|
I do not know how you count posts so I can't really see what you mean with this. But if the question is where to place the code, take a look at TryParse - there is an overloaded version of it.
|
|
|
|
|
You might need another parameter NumberFormatInfo.CurrencyDecimalSeparator set to ","
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
TNX!
But where can i copy this code to?
Again: Tnx!
|
|
|
|
|
MessageBox.Show(System.Globalization.NumberFormatInfo.CurrentInfo.CurrencyDecimalSeparator.ToString());
This code returns a "," in the messagebox ..
|
|
|
|
|
Hello JelleM.
Why don't you implement the following loop to test your text char by char?
string temp = "";
foreach(char c in textBoxPrijs2.Text.ToCharArray())
{
if(char.IsDigit(c))
temp += c;
}
Prijs = temp;
|
|
|
|
|
Hi,
I am having great difficult trying to set properties from C# using late-binding to a Delphi COM application.
I am using the following code from c#:
private static void SetProperty(object objectToUse, string property, object oValue)
{
object[] oParam = new object[1];
oParam[0] = "TES";
objectToUse.GetType().InvokeMember(property, BindingFlags.SetProperty, null, objectToUse, oParam);
}
However whenever I call this method I get System.Reflection.TargetInvocationException exception.
I can use the following happily (for the same method):
private static object GetProperty(object objectToUse, string property)
{
return objectToUse.GetType().InvokeMember(property, BindingFlags.GetProperty, null, objectToUse, null);
}
The delphi code for the declaration is as follows:
property QuoteNumSuff: widestring read GetQuoteNumSuff write SetQuoteNumSuff;
Does anyone have any ideas or suggestions at all? (BTW - I need to use late binding).
I am completely stuck
Cheers in advance.
|
|
|
|
|
As seems to always be the way - as soon as I ask for help I find the answer.
If I use "BindingFlags.PutDispProperty" instead of "BindingFlags.SetProperty" it works.
Any idea what the difference between them is? I cannot figure it out from the MSDN...
|
|
|
|