|
Searching for 2 weeks you must have encountered Directory.GetFiles() and FileSystemWatcher many times, and have become an expert in using them.
Luc Pattyn
Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
yes came across them many times but every time i tried to use them i got errors
|
|
|
|
|
That depends on where you search.
|
|
|
|
|
Google is a great place however even that doesn't always give you what you want in a format you understand, everyone got to ask to learn
kenny
|
|
|
|
|
Well, you just have to know WHAT to ask of Google and HOW to ask it. This is where the most important skill as a programmer comes into play. It's not the ability to write code or understand the language. It's the ability to do research and teach yourself.
|
|
|
|
|
why, high and low, of course.
Luc Pattyn
Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
use
string[] files = Directory.GetFiles("path", "*.avi");
Path represents the path of the directory, in your case its C:\video
|
|
|
|
|
Hi
Being very very limited in my knowledge of this could you help me a little further as to what else i need to add to make that bit of code work, assume i'm starting with a blank form!
kenny
|
|
|
|
|
If you want a personal mentor, you'll have to earn one first. I suggest you start here[^].
Luc Pattyn
Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
Didn't think asking a simple question was such a big deal!
|
|
|
|
|
The question itself is not a problem, assuming you are willing to learn and make an effort.
And if you want to be spoon fed all your life, that is your choice. No big deal except for yourself.
Luc Pattyn
Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
Very easy.
C# 'FileSystemWatcher' object can help you.
//for example
FileSystemWatcher p = new FileSystemWatcher(@"c:\video");
p.EnableRaisingEvents = true;
p.IncludeSubdirectories = true;
p.Changed+=new FileSystemEventHandler(p_Changed);
p.Created+=new FileSystemEventHandler(p_Created);
p.Deleted+=new FileSystemEventHandler(p_Deleted);
April
Comm100 - Leading Live Chat Software Provider
modified 27-May-14 22:01pm.
|
|
|
|
|
Hello
i am reading article about data access
it have the below code
public DataServiceBase() : this(null) { }
public DataServiceBase(IDbTransaction txn)
{
if (txn == null)
{
_isOwner = true;
}
else
{
_isOwner = false;
_txn = (SqlTransaction)txn;
}
}
the autor comment than the first constructor simply calls the second constructor and passes in null for the transaction.
some can help me tranlate to vb
i test translate web but dont work
thanks for the time
|
|
|
|
|
Hope this works ...
Public Sub New()
Me.New(Nothing)
End Sub
Public Sub New(ByVal txn as IDbTransaction)
If txt is nothing then
_isOwner = true
Else
_isOwner = false
_txn = DirectCast(txn, SqlTransaction)
End If
End Sub
|
|
|
|
|
weee
thanks Abhishek Sur
thank for the time
regards,
Miguel
|
|
|
|
|
I am attempting to emulate a particularly easy to use application I used years ago which utilized standard keyboard letters or numbers without ctrl, Alt or Shift key combinations to control the menu. Thus "RPC" would take you to the "Reports, Profit & Loss, Current Month" submenu item. VS08 will not allow you to assign a standard letter key to a menu item without choosing a modifier key to use in combination.
Is there a way to accomplish this without incorporating a custom keystroke system to invoke the menu?
Thanks for your help.
|
|
|
|
|
why not use Form's key Press, key Down Event to get key's value to control them?
April
Comm100 - Leading Live Chat Software Provider
modified 27-May-14 21:58pm.
|
|
|
|
|
hello,
which event is fired when i close form with X button ? i want event that fired only with X button pressed, i know that there is a FormClosing event, but the problem is that it fires each time when form is closed... also with frm.close()
and i don't want that happen
tanx
|
|
|
|
|
Actually there is no Event exposed when Window X button is clicked. You need to handle this using Closing. What you can do is set a value when you forcefully closing the form through your program, and check it from inside the frm.closing event.
|
|
|
|
|
that's what i did so far,
bit i thought that maybe there is more elegant way to solve the problem...
thanks anyway
|
|
|
|
|
Each event handler gets two arguments, one even more interesting than the other.
Here FormClosingEventArgs.CloseReason should have gotten your attention right away.
Luc Pattyn
Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
tried that, doesnt work as i want to
|
|
|
|
|
Hi
I was wondering whether anyone could give me some hints on incorporating email functionality in my application.
I'm using WPF to create 3D models, I then have an option where the user can save an image file of the model. Now I want to include functionality where the user can email this specific picture. Is there a way to just open the default email client, but not just open it, create a new message and attach this image file automatically?
Thanks in advance
|
|
|
|
|
You can use IMAP feature to send email from .net to an email server. specially if you use IMAP it can handle https(google, yahoo, msn . ..)... or you can use smtp library to send email... for both you must have a valid email account either in google yahoo msn or of your own domain(which will have email option)...
in your imap or smtp conf you will provide your authentication details and the target email id... then you have to follow certain steps to attach an image... that could be very simple in .net cause i did it in php...
Today's Beautiful Moments are
Tomorrow's Beautiful Memories
|
|
|
|
|
using the smtp protocal to send the picture as the attached file.
you can see the smtp spec file in the Wikipedia.
|
|
|
|