|
I dont know so mutch about XSLT, but isn't it so that it doesn't change the element names only the apperance?
Ed.Poore wrote: I'm going to be slightly annoying here but that is exactly what XSLT[^] was designed for. You can execute the transformations from .NET by using the XslTransformation (I think that's it's name) class.
|
|
|
|
|
No, basically it's a scripting language which can transform one xml document into another (text) document. You can get it to output any form of text, plain text, xml, html etc. The transformations won't affect the original file unless you overwrite it. What you may be thinking of is you can link a stylesheet into an xml file (link a css stylesheet into html) and when IE or FF go to display it they try to find the stylesheet and apply the transformation (what it'll normally output is a nice-pretty formatted html version of the xml file so that it's easier to read than a plain xml file).
|
|
|
|
|
Hi
How Can I Run A Form In External Seluotion
|
|
|
|
|
What do you mean by that?
Forms are in projects, projects are in solutions. So, what type of project is the form in? If it is a class library then that's easy to do. You can add a project to many solutions - just add the project the form is in to the solution that you want to use it in and then add the appropriate reference in project that you want to use the form in.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
* Reading: Developer Day 5
Never write for other people. Write for yourself, because you have a passion for it. -- Marc Clifton
My website
|
|
|
|
|
I Mean That I have tow projects first project Will be the menu witch Call the Other projects ? How Can I Do That My Forms Is Not in one selution or 1 project its destiputed
|
|
|
|
|
Do you mean you want to make a program that will start your other programs? Look at the Process class.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
Hey guys.
What I need to be able to do is write a back end 'renderer' that will give me a looping video in the background, with text over the top, with shadows and all that jazz, but also be able to fade not only the text, but the video as well into black or another set of video and text. The video fading makes me think I should use something unmanaged, such as C++ and DirectX. The front end of my program will be written in C#, .NET 2.0. I'm just not sure what to write my 'back end' with. At the moment I'm researching WPF, but not sure if that fulfills my needs, considering I'm Windows XP based, not vista (as is the computer I am writing this for), which would give it a performance hit.
I am not asking for the specifics of how to implement it (though they would be nice), but more of an overview.
Cheers,
Jacob.
|
|
|
|
|
Manaxter wrote: At the moment I'm researching WPF, but not sure if that fulfills my needs, considering I'm Windows XP based, not vista (as is the computer I am writing this for), which would give it a performance hit.
WPF does not take a performance hit by running on XP, if you're graphics card support's DirectX then rendering by WPF is done by the hardware so no performance hit. If the graphics card is not capable enough then rendering is performed in software.
I would try out the animation & video capabilities in WPF first, you'll be pleasantly suprised as to how easy it might be to accomplish (the performance hit over being partially managed code doing the rendering should be negligible on most modern computers since WPF does use DirectX).
|
|
|
|
|
Thanks Ed. I shall look into this.
Can anyone recommend any resource (a book perhaps) for learning WPF? There is a lot of information out there, I'm not exactly sure where to start.
Jacob.
|
|
|
|
|
Check out fellow CPian's blog at http://joshsmithonwpf.wordpress.com[^] he's reviewed a few books on WPF, bought one on his recommendation and awaiting his latest recommendation to arrive from Amazon. His latest post also points to another site which has a good list of stuff.
|
|
|
|
|
Ok,i have string word = "safdsa"; string word2 = "sdfafds"; string word3 = "asdas";
richTextBox1.AppendText(word + word2 + word3);
And i want word2 to be with different font and cursor.I mean let's say that i do something else with the application and if i decide to move the cursor over the "word2" at some moment,the cursor must be changed and "word2" to be with different font/color.Just like hyperlinks in web pages.How is that achieved in other .Net applications?
|
|
|
|
|
hi ,
The only way , according to me atleast , to do that would be to get the word the mouse pointer is on , and then change the word.
1.You get the position of the mouse by handling the MouseMove and MouseDown events from the richtxtbox.
2.The Richtextbox class has a GetCharIndexFromPosition(Point) method, which takes a point. You can suppy the mouse position there
3.Once you get the char index , use the text property and loop first backward , then forward , till you get a space , that should give you the index positions for the word. If then , the word is the one you're after , select it , and set its font and color.
struct Word<br />
{<br />
public string Text;<br />
public int StartPos;<br />
public int EndPos;<br />
}<br />
Point pt;<br />
int p = richTextBox.GetCharIndexFromPosition(pt);<br />
Word GetWordFromIndex()<br />
{<br />
int i=p;<br />
while(true)<br />
{<br />
if(richtextbox.Text[i--]==' '||i==0) break;<br />
<br />
}<br />
Word wd = new Word();<br />
wd.StartPos = i<br />
i=p;<br />
while(true)<br />
{<br />
if(richtextbox.Text[i++]==' '||i==0) break;<br />
<br />
}<br />
wd.EndPos = i;<br />
wd.Text = richtextbox.Text.Substring(wd.SatartPos , (wd.EndPos-wd.StartPos));<br />
return wd;<br />
}<br />
You could then check if the Word.Text is what you we're looking for , and if it is , you can change the Font by setting the SelectedText property to the text , then changing the selectionFont and SelectionColor properties.
Hope i helped
Gideon
|
|
|
|
|
what you need to do is selecting the apt substring and change its font:
richtextbox.Select(Length);
richtextbox.selectedFont = Font.Bla bla bla
|
|
|
|
|
Hello All,
I have a desktop aaplication in C#.NET 2005 (2.0) which uses the datagridview. In that I have two hyper link column say Edit and Delete . For that I add two column of type Hyperlink.
Now I want to merge them in a single column like Action is the colmn name and Edit link and Delete Link .. Like Belove Diagram
I have this...
-----------------------
EmpCode | Edit | Delete
------------------------
1 | Edit | Delete
2 | Edit | Delete
I want this...
------------------
EmpCode | Action
-------------------
1 | Edit Delete
2 | Edit Delete
How I Can do that...?
Regards
Pankaj Joshi
|
|
|
|
|
my apologies. i didnt catch that part on a desktop application.
-- modified at 8:16 Saturday 16th June, 2007
|
|
|
|
|
Sir I allready Mention This is not an ASP.NET Project this is Desktop Application
And also I don't use Any Datasource... I Add Lines one by one Using DataReader
into the datagridview rows and cells.
Regards
Pankaj Joshi
|
|
|
|
|
You can still try his first suggestion.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
Hello All,
I Have combo which have it'd dropdown style = dropdownlist. i.e. no body can
enter the data in it. I add some values in it on the folrm load like ....
cmbQ.Items.Clear();
cmbQ.Items.Add("A");
cmbQ.Items.Add("B");
cmbQ.Items.Add("C");
cmbQ.SelectedIndex = 0;
that means After Form Load the displayed value in cmbQ = A. Right.
Now my Problem ...
If save the values in database using cmbQ.text that means either A,B or C it is save.
But suppose the saved value is C.
when user open form again in edit mode, I want to display the selected values in cmbQ should be C.
How I can Do that...?
Remeber I Don't use DisplayMember, ValueMember property bcoz the ABC values are hardcoded.
I just to show it.
I allready tried
SelectedText
SelectedIndex
Text
SelectedValue
But unable to get desire output...?
I also Change the dropdown style before assign the values like
cmbQ.DropDownStyle = ComboBoxStyle.Simple;
cmbQ.SelectedText = ObjDS.Tables["Version"].Rows[0]["Version"].ToString();
cmbQ.Refresh();
cmbQ.DropDownStyle = ComboBoxStyle.DropDownList;
But Unable To Get Desire Output.
Please Help
-- modified at 4:47 Saturday 16th June, 2007
Regards
Pankaj Joshi
|
|
|
|
|
try:
cmbQ.SelectedIndex=cmbQ.FindStringExact(dataFromDB);
|
|
|
|
|
Thx Luc really Greate Solution
Regards
Pankaj Joshi
|
|
|
|
|
here im getting active directory users ? i want to get that user active or inactive in that..How can we know. any property to use like,,
oSearcher.PropertiesToLoad.Add("samaccountname");
here my code, to get all users...
public Hashtable GetAllUsers(string ldapServerName)<br />
{ <br />
string _ldapServerName = ldapServerName;<br />
DirectoryEntry oRoot;<br />
oRoot = new DirectoryEntry(ldapServerName);<br />
<br />
DirectorySearcher oSearcher = new DirectorySearcher(oRoot);<br />
SearchResultCollection oResults ;<br />
Hashtable RetArray =new Hashtable();<br />
try<br />
{<br />
oSearcher.SearchScope = SearchScope.Subtree;<br />
oSearcher.Filter = "(&(objectClass=user) (objectCategory=person))";<br />
<br />
oSearcher.PropertiesToLoad.Add("name");<br />
oSearcher.PropertiesToLoad.Add("samaccountname");<br />
oSearcher.PropertiesToLoad.Add("cn"); <br />
oResults = oSearcher.FindAll();<br />
foreach (SearchResult oResult in oResults)<br />
{<br />
if (oResult.GetDirectoryEntry().Properties["samaccountname"].Value != null)<br />
{<br />
RetArray.Add(oResult.GetDirectoryEntry().Properties["samaccountname"].Value,<br />
oResult.GetDirectoryEntry().Properties["userAccountControl"].Value);<br />
}<br />
}<br />
}<br />
catch(Exception e)<br />
{<br />
MessageBox.Show("Error is " + e.Message);<br />
return RetArray;<br />
}<br />
return RetArray;<br />
}
-------------------------------------------------------------------
here get log in ,...can i use that here also???
DirectoryEntry entry = new DirectoryEntry(< LDapPath>,< username >, < pwd > );
try
{
// Bind to the native AdsObject to force authentication.
Object obj = entry.NativeObject;
DirectorySearcher search = new DirectorySearcher(entry);
search.Filter = "(SAMAccountName=" + txtUserName.Text + ")";
search.PropertiesToLoad.Add("name");
SearchResult result = search.FindOne();
if (null == result)
{
MessageBox.Show("User doesn't Exit.");
}
else
{
// Update the new path to the user in the directory
MessageBox.Show("Loged Succesfully user " + (String)result.Properties["name"][0]);
}
}
catch (Exception ex)
{
MessageBox.Show("Error authenticating. \\n"+ex.Message);
}
Thnks in advance!!!
|
|
|
|
|
i am new to programming, so plz help me.
I had design a wordpad or notepad editor, in this a user can fix the number of character in line, like if he sets chracter to 65 then only 65 chracters will appear in that line and further character will starts from next line.
so, at end of line instead of bringing the whole word to next lines it cuts the word(means if 65 character completed it force rest letters to next line). The word got cut.
so, how to solve this problem. So that, the whole word come to next line.
Help me.
|
|
|
|
|
You can check out one version of the WordWrap and LIne Breaking algorithm here:
http://www.velocityreviews.com/forums/t20370-word-wrap-line-break-code-and-algorithm-for-c.html
|
|
|
|
|
you need to search first for the '/n' char which mean a new line. then you cut the word you need to transfer and put it in the apt place
|
|
|
|
|
Hi
I have a strange problem.In an application ,I have a login process and I'd like to show the progress of this process on a progress form using a progress bar and a label describing what is going on.Thus I put a progress form in my project and whenever this form is activated starts the login process and listens to a progress event that tells it to refresh the controls according to the progress.
There's a LoginFailedException in my app that is thrown whenever the username and/or the password is incorrect.I've handled this exception by showing a message box.Every time I debug my project using VS2003 IDE and provide some incorrect information It works fine and shows me the message box but when I exceute the exe file directly ,an unhandled exception is thrown just like there is no exception handler available.
What is wrong with my program?
please help me.
|
|
|
|