|
Ed.Poore wrote: In .NET 2 I think there's a SoundPlayer [^]component that you can drop onto a form.
Looks like link is bad or something
Page not Found<br />
<br />
An error occurred:<br />
The file '/script/comments/msdn2.microsoft.com/en-us/system.media.soundplayer.soundlocation.aspx' does not exist.<br />
<br />
This error has been recorded.<br />
|
|
|
|
|
Just do a google for SoundPlayer +msdn.
I have no idea what I just said. But my intentions were sincere.
|
|
|
|
|
How do I trap the event that is fired when the column header of a Datagrid is clicked?
Thanks!
I am a SysAdmin, I battle my own daemons.
|
|
|
|
|
This is from MS Help file example.
It might be usable to your occasion.
//===================================
private void sortButton_Click(object sender, System.EventArgs e)
{
// Check which column is selected, otherwise set NewColumn to null.
DataGridViewColumn newColumn =
dataGridView1.Columns.GetColumnCount(
DataGridViewElementStates.Selected) == 1 ?
dataGridView1.SelectedColumns[0] : null;
DataGridViewColumn oldColumn = dataGridView1.SortedColumn;
ListSortDirection direction;
// If oldColumn is null, then the DataGridView is not currently sorted.
if (oldColumn != null)
{
// Sort the same column again, reversing the SortOrder.
if (oldColumn == newColumn &&
dataGridView1.SortOrder == SortOrder.Ascending)
{
direction = ListSortDirection.Descending;
}
else
{
// Sort a new column and remove the old SortGlyph.
direction = ListSortDirection.Ascending;
oldColumn.HeaderCell.SortGlyphDirection = SortOrder.None;
}
}
else
{
direction = ListSortDirection.Ascending;
}
// If no column has been selected, display an error dialog box.
if (newColumn == null)
{
MessageBox.Show("Select a single column and try again.",
"Error: Invalid Selection", MessageBoxButtons.OK,
MessageBoxIcon.Error);
}
else
{
dataGridView1.Sort(newColumn, direction);
newColumn.HeaderCell.SortGlyphDirection =
direction == ListSortDirection.Ascending ?
SortOrder.Ascending : SortOrder.Descending;
}
}
Jamestown
|
|
|
|
|
Thanks Jamestown48,
I saw this too but it's not quite what I wanted. When a user clicks on the header of a column, I expect that an event is fired and datagrid processes it by sorting the rows accordingly. What I have in mind is that after this event is fired and datagrid does what it has to do, I will do my own processing (i.e. add an extra row to the bottom of the newly sorted rows).
I dunno if my question is too simplistic but I just couldn't find any resource for it.
regards
I am a SysAdmin, I battle my own daemons.
|
|
|
|
|
I want to translate data from one language to other in one of my .Net Web application. Say for instance from English to Chinese and vice versa. Any idea on how to do this. Are there any free source translation libraries available.
Thanks
sj
|
|
|
|
|
There is no translation library. There is multi-language support but people have to author all the data in all the different languages. The multi-language support provides mechanisms for the application to use different assemblies containing the string tables (authored by people) in different languages based on the users PC language settings.
led mike
|
|
|
|
|
I have a question that I am sure has been answered many times but I have been unable to find any references on the internet and my attempts to program the situation keep failing and I am running out of time.
In designing ASP.Net Web Applications with c# and VB.net I have been able to deploy these applications with only the contents of the bin directory. When I have included third party or in-house class library in the Web app I only needed to include the assembly file (dll) of the class library I am referencing.
Now I am trying to analyze alternative designs for a Web service which references a C++ DLL. We want to redesign the DLL as a Visual C++ 2005 DLL, and to reference that assembly in the Web service project. One of the alternatives is to create a visual C++ 2005 ASP.Net web service that references the DLL. I want to report in my evaluation of this alternative that creating a refereence to this Managed assembly of the class library eliminates the need for including the header files in your Web service project. I also want to say that deployment would only require copying the Web service's assembly and the class library's assembly into the bin. (In addtion to the disco, the web config, the asmx, the asax, etc.) But it occured to me I had never actually tested that. Nor had I seen anything written on that. So I tested it first for a c# web service which of course verified my second point. However, when I tested a C++ Web Service I was either unable to successfully compile the Web service, (Error kept reporting the DLL had no copy constructor (which it didn't) when attempting to instantiate object using gcnew:
TestDLL::clsPerson^ Me = gcnew TestDLL::clsPerson;
or else it would compile successfully but error in the invoke method of the debug when I declared it with out instantiating it.
TestDLL::clsPerson^ Me;
(note I did not use it at all in the return from the Web service.)
At this time I really do not care why it failed I just want an answer to my question.
Is it necessary to include the header files from a Managed class library in the Web service when the assembly is referenced using VS 2005 "add reference"?
Please help me as this is VERY time sensitive. I need to have this information by Friday 1/12/2007 3:00 PM EST. After that I will have failed in my mandate and it will be of no importance to me as I will be looking for work. Thanks in advance.
Edward R. Joell
MCSD MCDBA
|
|
|
|
|
Is it possible to use Visual C# to design a form identical or extremely similar to the Visual C# start page? You know how the start page is laid out graphically, is it possible to design a form like that using what ships with Visual C#. I am new to Visual C# and I am trying to get a grasp of its abilities. I am also trying to decide about whether or not to upgrade to Visual C# 2005 Professional from my Express Edition.
Thanks,
BP
|
|
|
|
|
It is possible, all you have got to do is use the controls which are shipped with C# and probably you may have to import images and templates
|
|
|
|
|
BlitzPackage wrote: Is it possible to use Visual C# to design a form identical or extremely similar to the Visual C# start page?
Yes
BlitzPackage wrote: is it possible to design a form like that using what ships with Visual C#
Yes!
|
|
|
|
|
How do you actually create float panels that can dock, auto hide (and be listed as tabs, etc.)?
|
|
|
|
|
Um , I'm going to have to have a look at the start page to see what you mean, it's the first thing I turn off.
|
|
|
|
|
It's not about start page at all (it only differ it self by showing one tab with html like interface for recent files and some web news)... but floating containers in VS how to achive that?
|
|
|
|
|
There's no out of the box support for docking windows. Is that what you mean ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
So say we want to do program that have interface like VS 2005 we wouldn't be able to do it right (without much coding)?
Anything of that show up after 3.0 upgrade, and can express edition use 3.0 (.net of course), and does some new controls show up in tool bars (for visual form builder)?
|
|
|
|
|
There are plenty of controls which can provide this support, both commercial and open source.
Commercial:
Divelements
Devexpress
Infragistics
Telerik
ComponentOne
MagicUI
Free:
Weifen Lufo (I think that's how you spell it)
Numerous implementations on this site.
Just search for the name in Google or try "docking site:codeproject.com", that will search for any hits of "docking" within the codeproject.com domain.
|
|
|
|
|
TrooperIronMan wrote: Anything of that show up after 3.0 upgrade,
No, .NET 3.0 is all WPF. As someone else said, you need 3rd party components.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Can you give me quick reference to some good read source on it...
....so basically we are not getting new controls to play with right?
Can I install 3.0 and use it with EE?
BTW I downloaded some examples on this and some resource kit so I'll try that now...
|
|
|
|
|
Hi,
I have to paste a string value to remote application powered by Citrix. I tried using SendKeys with "(^V)". Then I used the following,
PostMessage(handle,WM_KEYDOWN,Controlkey,IntPtr.Zero);
PostMessage(handle,WM_KEYDOWN,V,IntPtr.Zero);
PostMessage(handle,WM_KEYUP,V,new IntPtr(1));
PostMessage(handle,WM_KEYUP,Controlkey,new IntPtr(1));
This doesn't work either.
Then I tried Sending keys relavent to the pasting value usaing above PostMessage(). i.e. if I have to paste "123" I send three PostMessage calls with 1,2,3 key values respectively. It didn't work too.
Is there any other ways I can do this.
Any help would be great.
Thank you.
Regards,
Sampathg
|
|
|
|
|
Can we do polymorphism on event handlers
in the event handler the default parameters will be sender and e. Can i add more parameters to that ?
regards
hari
|
|
|
|
|
Not unless the delegate has extra parameters
only two letters away from being an asset
|
|
|
|
|
If I understand your question
No you cannot add extra parameters to system event handlers such as OnPaint or OnsizeChanged but you can on custom event handlers by adding extra parameters to the delegate.
Everybody gotta be somebody
|
|
|
|
|
Hi All,
I need to copy a subsection of an array to a List<>.
The only way i've found of doing this is to create a temporary array and do an Array.Copy(), as below:-
MyType[] srcArray = FillUpMySourceArray();
List<MyType> dstList = new List<MyType>();
int srcDataOffset, srcDataLength;
MyType[] tmpArray = new MyType[srcDataLength];
Array.Copy(srcArray, srcDataLength, tmpArray, 0, srcDataLength);
dstList.AddRange(tmpArray);
I don't like the use of Array.Copy. Surely there's a better way?
Jon
|
|
|
|
|
I think this should work:
dstList.InsertRange (srcArray.Length, srcArray); /ravi
|
|
|
|