|
Well, I'm not sure what you're suggesting. The event works, whenever I've used it ( or anyone else )
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Probably, as in the case of selectedIndex changed, i think we cannot get the selected value.
As of my code, i use the selected value property in the selectedvalue changed event.
Parimala
|
|
|
|
|
The SelectedText is "" but the text is correct
|
|
|
|
|
Hello everybody.
I want to write Byte to Hex format in file.
For example:
If byte = 5;
Write 05
If byte = 29;
Write 1D
Thanks for all.
|
|
|
|
|
Use a binary file instead of one that's for writing text.
This [^]looks like a good resource
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
I'm using VS.NET 2003. I wanna get the table in a HTML page through WebBrowser object. I can't use the HTMLElement (available in VS2005 only?). I tried the getElementsbytagname but it didnt work.
Pls give me some help
|
|
|
|
|
The only other option is string mashing. Why does getElementByTagName not work ? What is the source HTML ?
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
This is what i did:
HTMLDocument myDoc = new HTMLDocumentClass();
myDoc = (HTMLDocument)axWebBrowser.Document;
HTMLElementCollection ecol = (HTMLElementCollection)myDoc.getElementsbyTagName("Table"); <-- Invalid Cast Exception
the HTML source code:
tên sinh viên | : nguyễn hoàng tuấn | mã số sinh viên | : 10360127 | ngày sinh | : 07/01/1985 | hệ đào tạo | : đại học chính quy | ngành học | : tin học (đh) | khóa học | : 2003- 2007 |
Is there anyway simpler to retrieve the data of a table cell in C#? If yes, can i have some sample?
|
|
|
|
|
Why do you cast the return value of the GetElementsByTagName method? According to the docs it already returns a HtmlElementCollection .
Maybe it is just a typo in your posting but your looking for elements with the tag name "Table" (uppercase T), but your HTML only contains elements in lower case namely "table".
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
teeboss wrote: (HTMLElementCollection)myDoc.getElementsbyTagName("Table");
OK, have you tried removing the cast and seeing what comes back ?
Can you control the HTML ? Because I've never used 'getElementsByTagName', getElementById always works fine for me, but this table has no Id. It's also not XHTML, which sucks.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
yeah That table was not done by me so I cant control the HTML code.
SO like i asked, is there anyway I can retrieve data of a table cell?
And Christtian, I'm on Yahoo Messenger now! My ID is mrhoangtuan. If u dont mind add me so we can chat more. I have something to ask u 2.
|
|
|
|
|
Sorry, I don't use yahoo.
The other obvious method is string mashing, just take the text and search for the table directly. It's not pretty, but it would work
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Sry but i'm not good at string mashing. Can u give me some sample?
|
|
|
|
|
Did you try removing the cast to see what that object was returning ? It's a better option.
I'd probably try pulling stuff out with regex, rather than the find methods on the string class, if I had to go that way
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
hi
i'd like to compare 2 instances of the same class. i've used the XmlSerializer to save an instance
of a class into a Xml-File. after the deserialization from the file, i'd like to compare the original instance of the class and the one i've deserialized to see if the two instance are the same.
i've ask a friend and he told me that i have to use Reflection, but he didn't told me how exactlly i have to do that.
pls help
greets
pdluke
|
|
|
|
|
pdluke wrote: i'd like to compare the original instance of the class and the one i've deserialized to see if the two instance are the same.
Be careful. The two objects will not be the same. What you mean is that you are testing to see if they are equal.
You can do this without reflection. You can override the Equals method:
public override bool Equals(object obj)
{
bool isEqual = base.Equals(obj);
if (!isEqual)
return false;
return isEqual;
}
Only you can determine what constitutes equality.
|
|
|
|
|
if you have unit tests for your object you could use them instead of the equals method. It depends whether you are interested in them being functionally identical or having the same state or both.
Russell
|
|
|
|
|
Use this.GetType().GetProperties() to get an array of the properties, then us the GetValue method of each to get the value of the property for this and obj2 to compare the values. If you're not exposing all your data as properties, use GetMembers instead.
--
Rules of thumb should not be taken for the whole hand.
|
|
|
|
|
Hi I'm using ZedGraph Version 4.5.1.24865
I've two problems(questions):
I've a problem with the Xaxis scale, my Xaxis has following configuration:
Xaxis.Type = AxisType.Date;
Xaxis.Scale.MajorUnit = DateUnit.Second;
Xaxis.Scale.MajorStep = 0.2F;
Xaxis.Scale.MinorUnit = DateUnit.Second;
Xaxis.Scale.MinorStep = 0.001F;
Xaxis.Scale.Format = "mm:ss:fff";
When I zoom into the graphpane and the label with the value 25:00:00 is outside the visible area, then the next labels(example: 25:01:525; 25:02:455) aren't shown, but values like 26:00:00, 26:01:438, 26:13:389 are shown until the label 26:00:00 is outside the visible area.
This is what i get:
Xaxis__________________________________________________________
Labels 26:00:00 26:01:438
This is what i want:
Xaxis _________________________________________________________
Labels 25:01.525 25:02:455 … 26:00:000 26:01:438
What am I doing wrong, how can I fix this problem?
Is it possible to set the language default to english? Because when i use the german contextmenu the menuitem "Punktwerte anzeigen" appears twice (once for the function "point values" and once for "undo zoom step" .
Thanks
Best regards
|
|
|
|
|
hi all, i wish to use a delay of time = 1msec. is there a function can help me?
thank u.
|
|
|
|
|
delay of time = 1msec? nvm
u can use timer:
public System.Timers.Timer aTimer = new System.Timers.Timer();
aTimer.Interval = 1;
aTimer.Enabled = true;
aTimer.Elapsed += new ElapsedEventHandler(OnTime);
public void OnTime(object source, ElapsedEventArgs e)
{
//... do something
}
|
|
|
|
|
System.Threading.Thread.Sleep(1);
|
|
|
|
|
There is no way you can count on a 1 msec delay, it's just not going to happen. That's the lowest value you can set on a timer, it's always going to be more than that.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
As Christian said, the delay you get from a timer will exceed 1 msec, no matter what you ask
for. (If you ask for small values, you probably will get around 10 to 16 msec). This holds
true for Form.Timer, Threading.Timer and Timers.Timer
There are ways to obtain shorter delays, e.g. by using a multimedia timer.
I have just finished an article on this, I expect it to appear in the coming days.
Title will be "Timer surprises...".
Luc Pattyn
|
|
|
|
|
Using C# in VS.NET 2003, I included the system.windows.forms namespace but i can't find the HTMLElement. It should be available. How come?
Any suggestion pls?
|
|
|
|