|
It still boils down to if the browser can support the file, though you are simply delivering binary data.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
Hi,
C#, VS2005
Is there a simple way to ftp a folder including all sub folders and files to a remote ftp site?
Thanks in advance
Chas
|
|
|
|
|
Have you tried google[^]? It has lots of code examples showing the usage of FTP classes in the framework itself and others that are avalible.
|
|
|
|
|
I have a few C# files that need to be built using hte .Net 1.1 tools, not the 2.0 tools. Usually I could do this at work using VS 2003, however I'm at home today, and I don't have VS 2003. Is there any easy way to get a build using the info in the .csproj file? Or do I need to figure this all out by hand? Alternately, is there any way to get VS2005 (standard edition) to use the .Net 1.1 compilers/tools?
¡El diablo está en mis pantalones! ¡Mire, mire!
Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!
SELECT * FROM User WHERE Clue > 0
0 rows returned
Save an Orange - Use the VCF!
VCF Blog
|
|
|
|
|
Jim Crafton wrote: Alternately, is there any way to get VS2005 (standard edition) to use the .Net 1.1 compilers/tools?
MSBee[^]
|
|
|
|
|
Thanks!! I was able to get it to build from the command line after a little bit of playing around. It was surprisingly easy to do. But I'll definitely look further at MSBee!
¡El diablo está en mis pantalones! ¡Mire, mire!
Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!
SELECT * FROM User WHERE Clue > 0
0 rows returned
Save an Orange - Use the VCF!
VCF Blog
|
|
|
|
|
Mr. Jan Dolinay has written an article, "Detecting USB Drive Removal in a C# Program" (http://www.codeproject.com/KB/system/DriveDetector.aspx[^]).
The code works well when I plug and remove a mass storage USB device.
However, when I plug/remove a non-memory storage USB device, (e.g.: a control device), it could capture a WM_DEVICECHANGE message with WParam = DBT_DEVNODES_CHANGED. It never raises DBT_DEVICEARRIVAL message or DBT_DEVICEREMOVECOMPLETE message.
Can anybody tell me how to detect the plug/removal of this kind of USB device?
Thank you.
lk
lk
|
|
|
|
|
Hi,
This might not be the best way of doing it, but it took me all of five minutes to do .... so here goes:
DriveInfo drive = new DriveInfo("F");
if (drive.DriveType == DriveType.Removable)
{
while (drive.IsReady)
{
Thread.Sleep(1000);
}
MessageBox.Show("Drive removed");
}
Regards,
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|
|
Programm3r,
Thank you for your reply.
But DriveInfo seems for drive devices, which are mass memory storage device.
For mass memory storage device, we can also use windows message to detect the device plug/remove.
What I need to detect is NOT a mass memory storage device, and hence Windows message doesn't post the device DBT_DEVICEARRIVAL/DBT_DEVICEREMOVECOMPLETE message when I plug/remove it from the USB port. It seems the windows processing is different.
Regards,
lk
|
|
|
|
|
I just did a quick google and came across this[^].
Is it of any use?
|
|
|
|
|
Hey I am looking at the same code that Jan Dolinay has posted and figured as much that it does not detect non-memory storage USB device.
I have a couple of USB Human Interface Devices like microphone, foot pedal etc which I need to detect, was wondering if you figured out how to do it.. It would be great if you would like to share it.
Thanks,
Darsh
|
|
|
|
|
Hi all,
I'm trying to bring one of the tab pages to the fore ground when a user would right click on it. And as silly as this sounds, but I'm struggling. I have tried the following without success.
tabControlMain.TabPages[tabControlMain.SelectedIndex].Show();
Thanks in advance
Regards,
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|
|
Your looking for the SelectTab[^] method on the tab control itself
i.e.
this.tabControl1.SelectTab(this.tabPage1);
|
|
|
|
|
|
ahhhh I get ya,
private void tabControl1_MouseClick(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Right)
{
for (int i = 0; i < this.tabControl1.TabCount; i++)
{
Rectangle tabArea = tabControl1.GetTabRect(i);
if (tabArea.Contains(e.Location))
{
}
}
}
}
|
|
|
|
|
|
thats odd :/
try the other mouse events ... down and up.
|
|
|
|
|
|
no probs
|
|
|
|
|
Hi,
I am guessing here but if the user uses the right mouse button the tab page would not be selected. You have to get the index of the clicked tab page.
Volker Weichert
|
|
|
|
|
Yes you are correct. This is actually the main problem I'm having, so ... how does one access the tabpage when the right mouse button was click?? How would one make use of the tab index, cause any tabpageb could be selected at any moment ....
Thanks for the response.
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|
|
If you check out the link in my above post you'll see the SelectTab method takes an index.
|
|
|
|
|
|
You might want to try something like this in your event handler:
Point p;
if (e.Button == MouseButtons.Right)
p = new Point(e.X, e.Y);
for (int i = 0; i < tabControl1.TabCount; i++)
{
if (tabControl1.GetTabRect(i).Contains(p))
tabControl1.SelectTab(i);
}
}
Volker Weichert
|
|
|
|
|