|
But i have Visual Studio 2003.
Vasildb
|
|
|
|
|
Well, if you're using an out of date version, you need to make this clear.
I believe there's a PLaySound API you can p/invoke for waves, you can use the Windows Media Player as a control for anythin that WMP can play.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
|
See here[^] maybe its some helpful for you
|
|
|
|
|
hi
i want to use CrystalReports XI in VS2005 and print my form . how to do ??
thanks
|
|
|
|
|
Hi, I am doing this website where I am suppose to LOCALIZE the web contents according to the user's language preference. Labels and buttons can be LOCALIZED easily using ASP.NET's LOCALIZED:LOCALIZEDLITERAL & LOCALIZED:LOCALIZEDBUTTON to grab the content from the respective language resource files.
But for tooltips, I need to create a function to grab the content in the resource file. The following are the code I found on the web and tried to implement on my website:
XmlTextReader resourceReader = new XmlTextReader(@"language\\ja-JP\\Resource.xml");
XmlNode resourceNode1;
public string readXML()
{
XmlDocument resourceXML = new XmlDocument();
resourceNode1 = resourceXML.SelectSingleNode("//Resource/item[@name = 'login_emailAddOfModerator']");
return resourceNode1.InnerText.ToString();
}
private void LoadToolTips()
{
this.txtUserName.ToolTip = readXML();
}
The following are the XML code:
<?xml version="1.0" encoding="utf-8" ?>
<Resource>
<item name="login_emailAddOfModerator">調整器のEメールアドレス。</item>
</Resource>
The tooltip didnt appear. Please advise me on how to make the code work, thankz
|
|
|
|
|
Well, have you stepped through the code ? Does the XML file you want exist ? What does the method return ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
yltoh wrote: But for tooltips, I need to create a function to grab the content in the resource file.
What makes you think that? Given a resource string with name "txtUserNameToolTip" exists in the resource file of the current page the following will create a textbox with respective tooltip
<asp:TextBox id="txtUserName" runat="server" ToolTip="<%$ Resources: txtUserNameToolTip %>" />
Furthermore the Page class provides the GetLocalResourceObject and GetGlobalResourceObject methods that allow you to access resources without the need to deal with XML.
"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
|
|
|
|
|
Hello
I am doing windows mobile application using compact framework 2.0
Application very slow.One screen to another screen taking 4 to 5 min.sometime application hanging...
How to improve performance? Anybody help me.
Thanks&Regards
|
|
|
|
|
An SDK is just a class library. Why do you need to write one ? Who is going to use it ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
OK, so you wrote a program, and they want you to turn it into an SDK ? You just want to create a class library that exposes the functionality.
Did they pay you to write it, or are they taking advantage of you ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hey all. I have been fooling around with Excel and can create Worksheets, files, etc, however, when I try to modify the contents of a cell, I get the following exception:
An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in mscorlib.dll
Additional information: Exception from HRESULT: 0x800A03EC.
The code is:
Excel.Application excel = new Excel.ApplicationClass();
Excel.Workbook workbook = null;
Excel.Sheets sheets = null;
Excel.Worksheet currentSheet = null;
workbook = excel.Workbooks.Add( Excel.XlWBATemplate.xlWBATWorksheet );
sheets = workbook.Worksheets;
currentSheet = (Excel.Worksheet)sheets[ 1 ];
((Excel.Range)currentSheet.Cells[ 0, 0 ]).Value2 = "text";
I have researched this on the net but to no avail. My code seemed to have worked before, but it doesn't now and it's ticking me off. I have tried several variations to modify the contents of the cell, but nada.
Any help would be greatly appreciated!
Thanks,
Josh
|
|
|
|
|
Hi,
((Excel.Range)currentSheet.Cells[ 0, 0 ]).Value2 = "text";
cell[0,0] is an readonly cell , you cant modify value in it.
use ((Excel.Range)currentSheet.Cells[ 1, 1 ]).Value2 = "text";
hope this works.
Nitin...
|
|
|
|
|
Thanks for the response. Interesting that you can't modify 0,0. Perhaps they should mention that somewhere. Anyway, I tried using different Cell coords, however, no data appeared, but I am not that concerned since I didn't receive an error.
I ended up using this to modify cell contents:
Excel.Range r = currentSheet.get_Range( "C1", Type.Missing );
r.Value2 = "Some Text";
r = currentSheet.get_Range( "D1", Type.Missing );
r.Value2 = "Some Text";
This seems to work fine.
Thanks!
|
|
|
|
|
Hi,
can anyone offer some opinions on the best method for creating a wizard style form. To clarify, I mean having Back/Next buttons in the bottom right, and displaying different options and information as you progress.
In VB6, you could do that array thing with controls, which wasnt so bad. But what about in .Net?
The solution Im thinking of at the moment is, having several panels, and just hiding them, and moving off screen at runtime. So when a user clicks Next, the current panel is turned invisible, moved to maybe -10000, 0 location. The next panel would then be made visible and moved to 0,0 location. But its just soooooo clunky.
Is there something easier? For instance, is it possible to use a tabcontrol, but hide the tab markers at the top for example? And then just manipulate which tabpage is selected?
What is the preferred method of doing this? Or other ways?
Any response gratefully appreciated.
Mark
|
|
|
|
|
Hello
I go for the hide/show pattern, but why moving your panels to extreme locations?!! Make all your panels in the designer beside each other -just for designing-, then you got to options:
1- If you are sure that you finished designing all your panels pile them up on top of each other and resize your form to a "fit all" size.
2- If you still want to make adjustments to your panels, keep them apart, and then in your forms constructor move all the panels to Location(0,0) programatically, and resize your form to the "fit all" size.
Now the last line of your constructor would be hide all except first. When the Next/Back buttons are clicked Hide/Show panels accordingly.
About the TabControls you can do that is you make your custom control. Inherit it from the TabControl, and in your custom draw event, don't draw the tab headers. I still prefer the above method.
One more less graceful way is to make a form for each step. It would make your life with the designer easier, but I strongly don't recommend it due to poor performance and memory wasting.
Regards
|
|
|
|
|
The way that I create Wizards in my applications is to put a "placeholder" panel at the location that I want all of the wizard pages to appear. Then I "supersize" my form so that I can place each of the individual wizard pages (also panels) side by side at the bottom. At run-time, I add the template page and each of the wizard pages to an ArrayList, make them invisible and resize the form back down to the appropriate size. Create your Back, Next, Finish, and Cancel buttons and in each of the click event handlers, I manipulate an index (simple int.)
On a Next click:
if(wizardPageIndex < (WizardPages.Count-1)
{
wizardPageIndex++;
btnBack.Enabled = true;
if(wizardPageIndex == WizardPages.Count-1)
{
btnNext.Visible = false;
btnFinish.Visible = true;
}
else
{
btnBack.Enabled = true;
btnBack.Visible = true;
}
DisplayWizardPage(wizardPageIndex);
}
...do something similar for the back click. (It's simply reverse logic of the Next click) ...Easiest way to get it done without creating a custom control. I've been planning on making one for a while, but this way has worked well for every application I've needed a Wizard for,so there's been no need to.
|
|
|
|
|
Hello Alaric_
Would you kindly repost this answer to the guy who asked the question instead of me.
Regards
|
|
|
|
|
This is not the most elegant way -- but cheaper than buying a wizard control:
Create a form and make sure the border style is fixed.
Add a tabbed control and create as many tabs as you need pages.
Subscribe to the tab index change event.
Add buttons to a panel positioned below the tabbed control.
Add a panel above the tabbed control and stretch it down to hide the tabs.
As the next button is clicked determine which tab index to move to based on the current tab index.
|
|
|
|
|
hi everyone,
i want to populate a treeview from an xml message i'm sending or i recieved. now i want that xml message (all the elements and attributes in that element) to be displayed in a tree view. the problem is, if the element has alot of attributes, not all of the attributes will be displayed. is there any way for me to display all the attributes? i tried adding levels for each attribute of an element but i'm not getting the right order. any advice, sample code , or anything...i'll really appreciate it. thanks.
|
|
|
|
|
Hey guys,
Suppose you have a textbox and you have "Hello World" inside it. How do I parse this string so that I can add each word into a text file (sort of like creating a dictionary)? Also, how can I keep adding or appending words to the file without deleting the previous words there? Do I just not close the streamreader/streamwriter? I'm confused about that... so any answer will do... thanks a lot I appreciate it.
Roberto
|
|
|
|
|
You can open a file in append mode, so stuff gets added to the end and the file not overwritten.
You can remove the .'s from a string and then use the Split method to turn a string into an array of words ( split on a space ).
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
To avoid duplicates you'll need to load your file into a dictionary.
Then when the event to save comes time use:
string[] words = textBox1.Text.Split(' ');
Then take each word in the array and add it to the dictionary.
Finally you persist by just feeding your stream with the dictionary values.
|
|
|
|
|
Hi,
I have very peculiar problem regarding GZipStream class under System.IO.Compresion namespace.
The problem is like this:
I have an ArrayList with large amount of data. I want to serialize it after compressing it. I used the following algorithm:
1. Create a MemoryStream
2. Serialize the ArrayList into that stream.
3. Compress the memorystream
4. Write the compressed stream into a file.
this runs ok without any error. but problems occur when I want to deserialize it after decompression as follows:
1. Create a file stream from the file.
2. Decompress it into a memorystream
3. Deserialize the stream into an ArrayList
exception is thrown here, it say somesort of like this: Binary header broken cannot deserialize from the stream. This is a peculiar problem, the compression process is not reversible! I don't know how to get rid of this problem. Anyone please help me.
Thank's in advance.......
With regards,
Anindya Chatterjee
|
|
|
|
|
hi
i have CrystalReports XI and VS2005.
i want to print my form with CrystalReports .. but i don't know how to do .. Please help me !!
thanks ..
|
|
|
|