|
I need Run Movie On Tv Using Video card
Topic Directx 9
Code In C# or vb.net
Problem Detai:
I want to run mpeg file in my form window which is design in (C# or Vb.net)
display should be simultaniusly form and TV (AV1 chanal).
Thanks
i wana script
i wana script
|
|
|
|
|
Dear Experts,
I have searched for days everywhere for an example on how to do this, and found many examples, but none of them do exactly what is needed.
I have a C# application where I need to drag files from a listview that are compressed in an archive to an Explorer window, and need to execute custom decompression code to extract the files after they are dropped. This decompression can take quite long if the files are large. There are no examples how to do this anywhere. This is currently being done in WinZip and WinRAR, so it appears to be possible.
This link shows a method that seems promising and most articles point to it:
http://blog.joycode.com/felix/articles/38825.aspx
In this article he creates a custom DataObject with an override for the GetData method. I still cannot make it work. The files get moved but are 0 length. It must have something to do with the timing of when the events and methods fire. I guess I don't fully understand the entire sequence of events.
If we can only get the path to the drop folder, but that is not possible.
This exact question was asked on EE, but the author finds out how to do it before a solution is posted and does not really share it in enough detail to help other users:
http://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/Q_21554101.html?query=drag+drop+explorer&topics=323
If anyone has implemented this, please help.
-Frank
|
|
|
|
|
more info...
The sample from blog.joycode.com should work, but I guess I don't understand the order events happen. If you look at the code below, I adapted the custom DataObject for my application based on what was in the article. When you drop the items, GetData() gets called multiple times. My custom UnzipFiles() gets called, and the files get extracted to the temp folder where the original temp files were created when I first start the drag from the list. But it seems that it copies the zero length files before the extracted versions get created. It's definitely a timing issue.
public class ShellDataObject: DataObject
{
private bool downloaded = false;
private DlgExtract _dlg;
public override object GetData(String format)
{
Object obj = base.GetData(format);
if (System.Windows.Forms.DataFormats.FileDrop == format && !InDragLoop() && !downloaded)
{
_dlg.UnzipFiles(System.IO.Path.GetTempPath(), _dlg.ZipContentsList.SelectedItems);
downloaded = true;
}
return obj;
}
public DlgExtract BaseDialog
{
set { _dlg = value; }
}
private bool InDragLoop()
{
return (0 != (int)GetData(ShellClipboardFormats.CFSTR_INDRAGLOOP));
}
}
|
|
|
|
|
Frank, the keyt here is the InDragLoop thing. You need to do your extraction while you are in drag loop. I've successfully achieved this; in my application, when the user drag/drops a file out of our .NET application, I make a connection to a remote database, get the file data out of it, and write it to disk. I accomplished this using the technique shown on the blog.
IIRC, the key is the InDragLoop. You can report to Windows that you're in drag loop, at which time you can extract the compressed data and write it to disk. Once you're done, that's when you exit the drag loop. This is all off the top of my head; it's been a long time since I coded this up.
Try that (do your file processing while you're in the drag loop) and study that example; if done correctly, it should accomplish what you're trying to do. If you still can't get it, let me know and I'll see if I can't cook up an example.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Goof around music jam with my brothers (with video)
The apostle Paul, modernly speaking: Epistles of Paul
Judah Himango
|
|
|
|
|
I finally got it to work. I sort of had it all along, but what I needed to do is modify the CreateTemporaryFileName() to store the full path. It then started working.
Thanks for the help Judah.
private String CreateTemporaryFileName(String name)
{
String path;
String fileName;
System.IO.StreamWriter file;
path = System.IO.Path.GetTempPath();
fileName = path + name;
file = new System.IO.StreamWriter(fileName);
file.Close();
return fileName;
}
|
|
|
|
|
Cool, glad you got it working Frank.
|
|
|
|
|
Hi,
I used to work with VS 2003 and it has a feature that helped you to pin point when an exception was thrown. You could set the debugger to break when an exception was thrown (1st chance) rather than when an exception was not handled in the code (2nd chance).
In VS 2005 with the exception assistance which I can't find how to configure to do the same thing.
Can someone tell me how to do it?
Till than I am using the cordbg.exe to do this.
Ami
|
|
|
|
|
Hello
Quoted from MSDN: To break execution when an exception is thrown
On the Debug menu, click Exceptions.
In the Exceptions dialog box, select Thrown for an entire category of exceptions, for example, Common Language Runtime Exceptions.
-or-
Expand the node for a category of exceptions, for example, Common Language Runtime Exceptions, and select Thrown for a specific exception within that category.
Regards
|
|
|
|
|
This is good for VS 2003, in 2005 you don't have this option
|
|
|
|
|
What?? My Visual Studio is 2005 alright, and I have the option?!! Try pressing Ctrl+D, then you press E
Regards
|
|
|
|
|
|
You are welcome.
Regards
|
|
|
|
|
i want to know how the csharp compiler comiles a project internal working ......how links....how generates exe....
|
|
|
|
|
Same as any other compiler??? (Except of course it compiles to MSIL rather than Object Code)
The Welsh will always support two teams: The Welsh, and anyone playing England
|
|
|
|
|
Ed.Poore wrote: Same as any other compiler???
I would imagine so
|
|
|
|
|
Read the book or ask your teacher for help.
|
|
|
|
|
i want to give my text box a property of changing color of words e.g when i press space after typing "happy" word its color should become red.....this should happen everytime when i type this
|
|
|
|
|
Handle the keypress event, if it wasn't a space ignore it.
If it was a space then get the current cursor index, find the last space indicating the beginning of the word. Set the selected index and length to cover this word, set the selected colour to the colour you want and finally reset the index to the original index so that you can continue typing.
E.g:
private void rtb_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == ' ')
{
this.rtb.SuspendLayout();
Random rand = new Random();
int startWordIndex = this.rtb.SelectionStart;
while ((this.rtb.Text[--startWordIndex] != ' ') && (startWordIndex > 0))
{
}
int endWordIndex = this.rtb.SelectionStart;
if (startWordIndex < 0)
startWordIndex = 0;
this.rtb.SelectionStart = startWordIndex;
this.rtb.SelectionLength = endWordIndex - startWordIndex;
this.rtb.SelectionColor = Color.FromArgb(rand.Next(255), rand.Next(255), rand.Next(255));
this.rtb.SelectionStart = endWordIndex;
this.rtb.SelectionLength = 0;
this.rtb.ResumeLayout();
}
} Hope this helps
The Welsh will always support two teams: The Welsh, and anyone playing England
|
|
|
|
|
double number1 = 1, number2 = .5;
while (number1 > number2)
{
number1 -= .1;
MessageBox.Show(number1.ToString());
if (number1 == number2)
MessageBox.Show("condition met"); // <- never
}
Please help
|
|
|
|
|
Floats are not guaranteed to be perfectly accurate because of the way they're stored. What are the numbers you get in your message box as it goes down? You may want to give Decimal a try.
Logifusion[^]
|
|
|
|
|
|
Hi
i have to multicast serialized objects through UDPClient socket but i cann't get a stream from NetorkStream constructor using UDPClient socket.moreover should i send stream or datagram using UDPClient. can anyone help me.
thanks
|
|
|
|
|
could u anybody please send algorithm/c# code for the given FROG Puzzle,,,
please click on http://www.hellam.net/maths2000/frogs.html[^]
some clues to solve the puzzle:
Call the frogs (from left to right),
Green 1, Green 2, Green 3; Red 3, Red 2, Red 1.
Click them in this order
Green 3,
Red 3,
Red 2,
Green 3,
Green 2,
Green 1,
Red 3,
Red 2,
Red 1,
Green 3,
Green 2,
Green 1,
Red 2,
Red 1,
Green 1
|
|
|
|
|
I smell HOMEWORK!!!!!!!!!
Do your own homework.
If you have a specific problem with your homework, then you can ask. Don't ask people to do your work for you, it renders you worthless.
|
|
|
|
|
Josh Smith wrote: I smell HOMEWORK!!!!!!!!!
it stinks
Josh Smith wrote: Do your own homework.
Yep. I'll be teaching a course at a local community college this fall and I hope I don't find my problems floating around here.
|
|
|
|