|
IT would have taken less time to change your code to point to an .mp3 file than it did to post the question here.
Today's lesson is brought to you by the word "niggardly". Remember kids, don't attribute to racism what can be explained by Scandinavian language roots.
-- Robert Royall
|
|
|
|
|
You may be better off embedding media player. Right click on your toolbox and select Chose Items (you may have to wait a while for the next dialog!). Click on the COM Components tab and scroll down and select Windows Media Player.
Drag and drop (& resize) a WMP onto your form. Set the URL property to point to your file and you're done.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
Sounds user hostile to me.
|
|
|
|
|
What's that supposed to mean?
|
|
|
|
|
The user may not want sound playing.
|
|
|
|
|
I have a program that allows the user to multi-select categories. The control is bound to a dataset table. When the user clicks the get data button, I have to pass the selected categories to a SQL Server stored procedure and limit products to the select categories.
The data is in a table in memory. I know I can loop through the rows of the data table and create some sort of a list and pass it as a varchar(max) parameter to the Store Procedure and parse it. Is there a more efficient method? A method that does not involve looping.
|
|
|
|
|
you are doing a your way thing i don´t imagine what it is.
i think you are using 1 varchar(max) column instead of 8 whatever columns.
you put all string in that varchar(max) and use "," to separate strings, isn´t thats right?!? so you need to loop to get them after.
i don´t use that, i add more columns and leave some empty if required, but you can do that don´t know if runs faster!
i heard of that in sql forum keep that way it´s ok to me.
nelsonpaixao@yahoo.com.br
trying to help & get help
|
|
|
|
|
************Programming Challenge**********************
Hi All
Again I have spent more than five hours but still fighting.
I just want to type underscore in my windows textbox.I am able to type characters, Hit enter key etc etc but do not yet found how to print underscore and other special characters like @,$,%,^
I have tried following code .Discovered new things but still trying to find the solution
SendKeys.SendWait(Keys.Decimal.ToString());
SendKeys.SendWait(Keys.S.ToString());
SendKeys.SendWait(Keys.A.ToString());
SendKeys.SendWait(Keys.N.ToString());
SendKeys.SendWait(Keys.D.ToString());
SendKeys.SendWait(Keys.E.ToString());
SendKeys.SendWait(Keys.Oem1.ToString());
SendKeys.SendWait(Keys.Oem102.ToString());
SendKeys.SendWait(Keys.Oem2.ToString());
SendKeys.SendWait(Keys.Oem3.ToString());
SendKeys.SendWait(Keys.Oem4.ToString());
SendKeys.SendWait(Keys.Oem5.ToString());
SendKeys.SendWait(Keys.Oem6.ToString()); // with this type of code getting Oem6 in
// textbox but i wanted 6.
SendKeys.SendWait(Keys.Oem7.ToString());
SendKeys.SendWait(Keys.Oem8.ToString());
SendKeys.SendWait(Keys.OemClear.ToString());
SendKeys.SendWait(Keys.OemBackslash.ToString());
SendKeys.SendWait(Keys.OemCloseBrackets.ToString());
SendKeys.SendWait(Keys.Oemcomma.ToString());
SendKeys.SendWait(Keys.OemMinus.ToString());
SendKeys.SendWait(Keys.OemOpenBrackets.ToString());
//with this code getting OemOpenBrackets in textbox but desired was (.
SendKeys.SendWait(Keys.OemPeriod.ToString());
SendKeys.SendWait(Keys.OemPipe.ToString());
SendKeys.SendWait(Keys.Oemplus.ToString());
SendKeys.SendWait(Keys.OemQuestion.ToString());
SendKeys.SendWait(Keys.OemQuotes.ToString());
SendKeys.SendWait(Keys.OemSemicolon.ToString());
SendKeys.SendWait(Keys.Oemtilde.ToString());
SendKeys.SendWait("{OemSemicolon}"); //givin error
SendKeys.SendWait(Keys.KeyCode== 106); //giving error
SendKeys.SendWait(Keys.E.ToString());
SendKeys.SendWait(Keys.P.ToString());
SendKeys.SendWait(Keys.U.ToString());
SendKeys.SendWait(Keys.K.ToString());
SendKeys.SendWait(Keys.A.ToString()); //working fine
SendKeys.SendWait(Keys.L.ToString());
SendKeys.SendWait(Keys.R.ToString());
SendKeys.SendWait(Keys.A.ToString());
SendKeys.SendWait(Keys.NumPad5.ToString()); //
//with this type of code getting NumPad5 in textbox desired was 5
SendKeys.SendWait(Keys.NumPad4.ToString());
SendKeys.SendWait("{Enter}"); //working fine
Any studymaterial ,sample application or anything related to this will help.I am also trying to find .
Thanks in advance
THE SK
I am the ONE
|
|
|
|
|
Hi All
Finally got it on below link
http://msdn.microsoft.com/en-us/library/8c6yea83(VS.85).aspx
The correct way is
SendKeys.SendWait("{+}"); //for typing plus
SendKeys.SendWait("{_}"); //for typing underscore
For this spent more than five hours ... great
THE SK
I am the ONE
|
|
|
|
|
Sandeep Kalra wrote: I just want to type underscore in my windows textbox.
Try using Fire_Fox. See it works I just_did_it. Oh wow, I did it again _ and again! Only took me like 5_seconds!
led mike
|
|
|
|
|
Hey led mike
U have used Fire_Fox.I think u should use Fire_Lion now.It will take 50 years to you
|
|
|
|
|
Programattically... Using C#...
|
|
|
|
|
You can't just append the character to the text?
|
|
|
|
|
Hi all,
I'm testing an application by writing bitmaps to a temporary file. I thought it would be neat to have an application that monitors this file and updates its picture whenever the file changes.
I use FileInfo to get the last write time, and if it's changed, I make a new Bitmap with the file's contents and display it. The file is never opened. Sounds simple.
The problem is the system thinks the file is in use, and won't let me overwrite it. It says: "The process cannot access the file because it is being used by another process." But I never open the file, and just use it temporarily to get the last write time and make a bitmap.
How can I make Windows realize the file isn't being used in between samples?
Here's the relevant code:
public void monitorFile()
{
while (!Form1.done)
{
fi = new FileInfo(fname);
DateTime dt = fi.LastWriteTime;
if (lastWrite < dt)
{
lastWrite = dt;
parent.showBitmap (new Bitmap(fname));
}
fi = null;
Thread.Sleep(3000);
}
}
Thanks!
Alan
|
|
|
|
|
Alan Balkany wrote: The process cannot access the file because it is being used by another process.
Maybe this "another process" is you! Always make sure you closed all opened files in your project.
While (true) { Human.isLearnable = true; }
|
|
|
|
|
But the file is never explicitly opened. It's hard to close a file that was never opened.
|
|
|
|
|
Maybe you have some problem with Vs and/or Windows or even vise versa!
While (true) { Human.isLearnable = true; }
|
|
|
|
|
Hey, you didn't close your file!
<blockquote class="FQ"><div class="FQA">Alan Balkany wrote:</div>public void monitorFile()
{
while (!Form1.done)
{
fi = new FileInfo(fname);
DateTime dt = fi.LastWriteTime;
if (lastWrite < dt)
{
lastWrite = dt;
parent.showBitmap (new Bitmap(fname));
}
fi = null;
Thread.Sleep(3000);
}
}</blockquote>
Add fi.Close(); before fi = null;
While (true) { Human.isLearnable = true; }
|
|
|
|
|
Your Bitmap object keeps the file open.
Try disposing the Bitmap object after you're done working with it.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Yes! You solved it! I just copied the bitmap to a new one and disposed the old one, and it worked! Thanks Mark!
|
|
|
|
|
Oh, you're right. My mistake! Thanks Mark
While (true) { Human.isLearnable = true; }
|
|
|
|
|
I have a C# application which creates Excel Workbooks. To date I have added reference to the Excel version installed on my machine. I now need to do something which will read the Excel version installed on a user's machine and call the appropriate library.
Does anybody know how to do this? Many thanks
Angus
|
|
|
|
|
Use Type.GetTypeFromProgID and Activator.CreateInstance to instantiate the object. Then you can use Reflection for further operations.
"If you had to identify, in one word, the reason why the human race has not achieved, and never will achieve, its full potential, that word would be 'meetings'." - Dave Barry
|
|
|
|
|
AngusOAP wrote: I now need to do something which will read the Excel version installed on a user's machine and call the appropriate library.
Loading an assembly at runtime is not the same thing as adding a reference to a project.
If you are using the Primary Interop Assembly there is no guarantee that the users machine has it installed. You might be needing to study the Microsoft information[^] about using the Primary Interop Assemblies.
led mike
|
|
|
|
|
Thanks, but having read the Microsoft information I fear I may be debarred - it says that I have to have Microsoft Visual Studio .NET for developers, whereas all I have is the miserablt C# Express Edition (2005 version plus Service Pack 1, at that). Do you know if it is it worth trying with that?
Thanks again.
Angus
|
|
|
|