|
Hi
Is there a way to convert .flv to .WMV/.WMA/.MPEG file using C#? Please advise.
Thanks
Pankaj
|
|
|
|
|
It is not natively supported in .NET. You will have to use a third party utility.
Regards,
Thomas Stockwell
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.
Visit my Blog
|
|
|
|
|
I have written a Windows Form Application that updates a MS Access DB. I want to be able to install this application on a server and then allow my clients to create shortcuts to the .exe. When I try to do this I get an error:
System.Security.Permissions.FileIOPermissions, mscorlib? How do I fix this.
Thanks!
|
|
|
|
|
Google for Code Access Security (CAS) and you'll find out why and solutions.
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)
|
|
|
|
|
Ok I tried to send keystrokes to msn with sendmessage but I Can't get it to work what I did:
IntPtr hwnd_Main = FindWindow(null, "name <someone@hotmail.com>");
IntPtr hwnd_imwindowclass = FindWindowEx(hwnd_Main, IntPtr.Zero, "IM Window Class", null);
IntPtr hwnd_child = FindWindowEx(hwnd_imwindowclass, IntPtr.Zero, "DirectUIHWND", null);
SendMessage(hwnd_edit, WM_KEYDOWN, Char.ConvertToUtf32("abc", 1), 1)
SendMessage(hwnd_edit, WM_CHAR, Char.ConvertToUtf32("abc", 1), 1)
SendMessage(hwnd_edit, WM_KEYUP, Char.ConvertToUtf32("abc", 1), 1)
I also tried using postmessage but all dont work.
And no I dont want to call settoforeground and use sendkeys cause the window needs to stay minimized.
btw also tried using this
string s = "hello";
for (int i = 0; i < s.Length; i++)
{
PostMessage(hwnd_child, WM_KEYDOWN, VkKeyScan(s[i]), 1);
PostMessage(hwnd_child, WM_CHAR, VkKeyScan(s[i]), 1);
PostMessage(hwnd_child, WM_KEYUP, VkKeyScan(s[i]), 1);
}
modified on Wednesday, January 28, 2009 2:53 PM
|
|
|
|
|
Schoolmelk wrote: but I Can't get it to work
You'll have to be more specific.
Are you checking the return values of any of your calls?
/ravi
|
|
|
|
|
yes I get all things I need it goes wrong with the sendmessage / postmessage part those return 0.
|
|
|
|
|
You may want to check the value returned by GetLastError() to see what went wrong. If you're running on Vista, a value of 5 indicates "Access denied".
/ravi
|
|
|
|
|
GetLastError() returns 0. Is there no other way to send keystrokes to a minimized window? I don't think it is possible anymore to use sendmessage to msn live convo's
|
|
|
|
|
Hmm, that would lead me to believe the message is getting through. Perhaps DirectUIHWND is not the correct target window?
/ravi
|
|
|
|
|
Must be.
I used Spy+ to detect where my key input was send to while typing. These all where send to DirectUIHWND . Also when I check if my commands with PostMessage and SendMessage came trough and yes they did but won't show up in the edit box.
|
|
|
|
|
If I have a class as below:
public class Employee
{
private Boss _boss;
public Boss Manager
{
get { return _boss;}
}
}
Although the property "Manager" is read only, however a programmer can still do this:
_employee.Manager = null;
How do I ensure programmers can access the Manager object but not allow them to set the reference to null?
|
|
|
|
|
That shouldn't be possible. Your property name is different in the class (Mananger) than in the assignment (Manager), perhaps you have another property or public field called Manager?
|
|
|
|
|
Just a typo. They should both be Manager.
CodingYoshi
Visual Basic is for basic people, C# is for sharp people. Farid Tarin '07
|
|
|
|
|
Ok, but still this shouldn't be possible. Made a little test:
static void Main() {
Employee e = new Employee();
e.Manager = null;
}
public class Employee {
private string _boss;
public string Manager {
get { return _boss; }
}
}
And the compiler said:
Property or indexer 'Test.Employee.Mananger' cannot be assigned to -- it is read only
Just in case, select the _employee.Manager = null; and right click on the Manager word. Then from the menu, select "Go to definition". Does it end up to the place you posted?
|
|
|
|
|
Great, thanks.
CodingYoshi
Visual Basic is for basic people, C# is for sharp people. Farid Tarin '07
|
|
|
|
|
|
i want to catch the exception for the network failure what is the exception for this ?
|
|
|
|
|
There is no single exception. There can be a mariad of problems causing different exceptions at different stages of connecting and executing a query.
|
|
|
|
|
yrkl wrote: what is the exception for this ?
Did you try this one?[^]
|
|
|
|
|
Network failures usually get TCP exceptions. Usually when I want to test a network failure adequately I yank the cable in debug mode.
Need software developed? Offering C# development all over the United States, ERL GLOBAL, Inc is the only call you will have to make.
If you don't ask questions the answers won't stand in your way.
Most of this sig is for Google, not ego.
|
|
|
|
|
Definitely; there's no data like emperical data.
|
|
|
|
|
I'm working on a program for some of my coworkers that take inventory with hand held scanners. I've been able to download the text file from the scanner and play around with that, but now I'm to the part where the users need to be able to view, edit, and update the records because sometimes the data isn't always accurate. I'm trying to set this up where the records are saved in an excel file. Using an OleDB data adapter I can access the xls file and place it nicely into the gridview, and I'm sure with a little bit of elbow grease I'll be able to wire up the events to update and save the modifiled cells back. My question here is, is there a better way to do this? For example, is there a way in which I can just start excel.exe and embed it into my windows form instead of using OleDB?
Thanks everyone!
"You're damned if you do, and you're damned if you dont" - Bart Simpson
|
|
|
|
|
Might you not use some sort of database at the back end instead of Excel?
Regards,
Rob Philpott.
|
|
|
|
|
Hi Rob,
I thought of just using a SQL server at first, but one of my objectives is to give the users the ability to export everything to an excel document. That's why I figured It would make the most sense to just read and write straight to the xls file rather than first importing everything into SQL to then turn around, read it all back out and then write it to the xls.
I think what I will eventually do is just use System.Diagnostic.Process to start up excel opening the file after I've done what I need to do with it.
"You're damned if you do, and you're damned if you dont" - Bart Simpson
|
|
|
|