|
Hello Alex, the article you suggested was very helpful. However, when I downloaded the sample project I could not get it to run. I could not find the reference MsHtmHstInterop. Have you been able to get it to work? Can you let me know how?
Elie
|
|
|
|
|
I have been able to get it to work. It sure is cool.
IIRC this article can help you: http://www.codeproject.com/csharp/advhost.asp
This posting is provided "AS IS" with no warranties, and confers no rights.
Alex Korchemniy
|
|
|
|
|
Hello Alex,
I have gotten it to partially work. It works fine when the browser control loads an html file. However, when I load an xml file it does not work. Find below a sample of the xslt file I use to transform my xml files:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:include href="WordTablesSig.xslt">
<xsl:output method="html">
<xsl:template match="PARAGRAPH">
<title>Sader Law Compandiom
var elementId;
function ElementClicked(NodeElementId)
{
elementId = NodeElementId; window.external.WinFormIe(NodeElementId);
}
<xsl:if test="parent::node()/@SHOW='1'">
When the element is clicked, I get "Object does not support property of method" error inside the ElementClicked function
Elie
|
|
|
|
|
Never mind I just need to call parent object of the window before calling external.
thx
Elie
|
|
|
|
|
ok i installed directx 9 sdk and i am trying to add ref to microsoft.directx but i can find in it like it's not installed or at least csharp can't see it so i went looking in the dxsdk directory and i found it microsoft.directx.dll in a cab file but that was the only play i saw it and i can't find it anywhere else on my computer can somebody help me
thanks
chad
|
|
|
|
|
Hi,
1)
I have some problem with application project, i'll create webservice to communicate with database and at this moment client request for data and recive dataset prepared by ws, so it's not a problem when database is small but when database is large ex 30 000 records, it'll be to much data to send over internet, so i use the examle which use a stored procedure to take the part of data using page number and page size requested by client. This resolution is good but it base on a id's field (number format) and recive data in "from-to" format (ex. from 11 to 20, page size 10, page number 2), but what if you use a text format key field in data table (ex. SI342)??? so my question is it's different way to pagging dataset???
2)
second problem what i have is: when i get next page, i set new dataset as a datasource so in datagrid is not a problem because it's one line to bind all, but in contrlos like textbox i must clear binding and set the new, it's different way to rebind datasource in controls????
please help me in this problem, maybe some link to good example.
see ya,
KrisPL
krzysztofo@poczta.onet.pl
|
|
|
|
|
How can I reassign a key value in a hashtable given a condition? Eg.
foreach(DictionaryEntry E in My_HT) //[Key string]{value int}
{
if(((int)_E.Value)!=1)
((string)_E.Key)=”NOT 1”;//this line gives the error
}
this code gives me “The left-hand side of an assignment must be a variable, property or indexer” and as far as I can tell _E.Key is a property. According to intelisence it has both get and set ability. Can some one tell me why it doesn’t work.
Ronald Hahn, CNT - Computer Engineering Technologist
New Technologies Analyst
HahnTech Affiliated With Code Constructors
Edmonton, Alberta, Canada
Email: rhahn82@telus.net
|
|
|
|
|
You can't cast the left-hand side of an assignment.
The left hand side must be an variable to store the value in, not an complex expression (cast).
Or what would you think the compiler should do with an assignment like a + b = 1 ?
You need to cast the right hand side,
_E.Key = (object)"NOT 1";
but as a cast to object is always implicit, you can also use
_E.Key = "NOT 1";
But DictionaryEntry is a structure, so changing it's key property won't change the key actually used by the hash table.
|
|
|
|
|
The other reply states why, but also, you're not supposed to change the contents of an enumeration WHILE enumerating it.
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
Luis Alonso Ramos wrote:
you're not supposed to change the contents of an enumeration WHILE enumerating it.
He is modifying the content of the content, but that is a struct, so it wil have no effect, also he changes the key and if that worked, it would cause collisions. And lastly he is refering to some variable (_E , not E) outside the foreach.
top secret Download xacc-ide 0.0.3 now! See some screenshots
|
|
|
|
|
leppie wrote:
And lastly he is refering to some variable (_E , not E) outside the foreach.
You're right! I didn't see that. Sorry!
leppie wrote:
He is modifying the content of the content,
He is modifying the content of the DictionaryEntry object, not adding or removing a DictionaryEntry itself. But what I mean is that he's modifying the entry's Key property, which I believe is used to index the Hashtable (or at least is more imporant than other properties). So, if he's modifying that, to some extent he is modifying the enumeration. You mention it, what if he causes a Key collision?
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
Luis Alonso Ramos wrote:
He is modifying the content of the DictionaryEntry object,
And that is simply a placeholder struct for the Key/Value pairs, assigning to that (is it even a set property?) will make no difference to the HashTable, I'm pretty sure the IEnumerator doesnt check for changes... will have to check the code.
Luis Alonso Ramos wrote:
You mention it, what if he causes a Key collision?
Hashtables needs to have unique keys and the way he is modifying it will cause 2 entries in the hashtable to be the same (both hashcode and Equals), and cause an exception. You can get around that by creating an collection as the value and adding to that.
top secret Download xacc-ide 0.0.3 now! See some screenshots
|
|
|
|
|
Hi,
In vb I could use Exit Sub.
Is there a c# Equivalate for methods with a void return type.
Thanks
len
|
|
|
|
|
|
lenchase wrote:
Hi,
In vb I could use Exit Sub.
Is there a c# Equivalate for methods with a void return type.
Thanks
Just use "return;" (without the quotes).
Yes, even I am blogging now!
|
|
|
|
|
|
Hello,
I want to copy several huge files to a different folder while showing the progress. I use System.IO.File.Copy() right now, but couldn't find a way to implement a progress bar! Are there any such progress events in .Net?
Any help?
Cheers,
Erica
|
|
|
|
|
You can update the progress bar after every file is copied, to show the advance in number of files.
If you want to display the progress in total number of bytes, you'd have to copy the file manually (open source and destination, read from source, write to destination, and so on...)
One more recommendation: do this in another thread, so you don't block the main application window (thread).
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
Hello!
Does anyone know the code to get an autofilter in a datagrid? This feature exists in Excel and it allows successives filters to data using combobox in column header. If is not possible to code this, is there anyway to call this feature directly from Excel
I'm building a standalone app in c#.
I appreciate your help
Thanks
Rui Fernandes
|
|
|
|
|
You're going to have to code this from scratch or try and find a 3rd partyy DataGrid component that will allow you to do this. Excel will not export it's functionality to a datagrid, it only works with an Excel worksheet.
Basically, you're going to have to provide the user interface, drop down boxes to allow selections of the filters, and provide code to handle the filtering of data (using DataView objects) and binding the datagrid to the new dataviews you create.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hello experts,
I'am trying to access TabPages in a TabControl via index and not with it's name
for example
TabControl.TabPages.Remove(Tab0); as
TabControl.TabPages.Remove(0);
Who knows the way to do that ?
Thanks in advance
fracalifa
|
|
|
|
|
fracalifa wrote:
TabControl.TabPages.Remove(Tab0); as
TabControl.TabPages.Remove(0);
Who knows the way to do that ?
Use the RemoveAt() method, instead of the Remove method. Actually, a lot of collections in .NET work this way.
Yes, even I am blogging now!
|
|
|
|
|
|
Hi every one....
I 've a DataGrid...
I need to control the ScrollBars ... some Times I need To Hold them in There Place ... so I get there old value then do some code & reset there values again....
the Values is set & the Scroll Bars is moved to their old position but the DataGrid didn't sence the change in scrolls even there values was changed
I tried
Refresh();<br />
Update();
but nothing happened...
so please I need Some Help
How to make the container respond to its control Changed
A.Mohsen
C# Developer
|
|
|
|
|
Create a new usercontrol inheriting from the DataGrid and use this:
public void ScrollH(int newScrollValue)
{
base.GridHScrolled(this,new ScrollEventArgs(ScrollEventType.LargeIncrement,newScrollValue));
}
public void ScrollV(int newScrollValue)
{
base.GridVScrolled(this,new ScrollEventArgs(ScrollEventType.LargeIncrement,newScrollValue));
}
|
|
|
|