|
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.
|
|
|
|
|
PaulC1972 wrote:
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.
why? some cheaters are inevitable, given the choice I'd prefer ones that are easy to catch.
|
|
|
|
|
dan neely wrote: given the choice I'd prefer ones that are easy to catch
Yep. When I was a graduate student, there was once some class that was exiting the room where my class was entering. The teacher had caught this kid cheating and was telling him that he was going to get him expelled from the university. I thought the teacher was going overboard, but when I think of it, I'd probably do the same.
|
|
|
|
|