|
Notepad should be there, unless it got removed.
csc.exe is part of .NET, of which some versions are always present on Vista/Win7 AFAIK.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
Use a regex: "(?<name>[a-zA-Z]+)(?<number>\d*)" splits it into the Name and any number.
private Regex splitNameAndNumber = new Regex(
"(?<Name>[a-zA-Z]+)(?<Number>\\d*)",
RegexOptions.ExplicitCapture
| RegexOptions.IgnorePatternWhitespace
| RegexOptions.Compiled
);
I have learnt that you can not make someone love you, all you can do is stalk them and hope they panic and give in.
Apathy Error: Don't bother striking any key.
|
|
|
|
|
or use a new separator such as '#', or a fixed number of digits, or just locate the first digit using IndexOfAny(), or...
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
You can tell .NET is a Microsoft product - a dozen different ways to do the same thing (none of them that obvious when you are getting started!)
It took me ages to work out how to format a floppy in Win95, then I found about six in as many minutes...
I have learnt that you can not make someone love you, all you can do is stalk them and hope they panic and give in.
Apathy Error: Don't bother striking any key.
|
|
|
|
|
Lyuc is right in saying that's pretty much you're last option. But, what he didn't say is that this method will also get slower and slower as you add more and more ID's to scan. The solution works, but it isn't scalable. You may want to take this information back and say that "it can be done, but..."
|
|
|
|
|
I am trying to find a way to gather image data from many windows and doing mouse movements and clicks on each window to advance the windows without the need to focus on each window. Problem with my current code is that unless all the windows are viewable, it only takes an image of the top window and only sends mouse commands to the top window. Being able to do either image capturing or mouse commands on windows out of focus would be a huge help.
I could provide the code snipet of what I currently use, but I doubt it is even possible to convert what I have to something with this functionality.
Thanks for any help.
|
|
|
|
|
You can make use of the SendMessage method to send messages to the inactive window. Here[^] is thread with the similar code. Might help.
|
|
|
|
|
Hello,
I'm developing database applications in C#. Normally for small group of people. So far so good.
I like to implement security. Login plus that the application is responding on the user (group) that logged in.
What is the most practical approach to implement security?
Arjen Groeneveld
|
|
|
|
|
You can make use of role based security in your application. Have a predefined set of roles. Assign them the rights as needed. Then assign each user to a particular role.
This[^] might help.
|
|
|
|
|
Hi Danish
Can you give me some more detail about role based security.
For example, how to define the roles and how to link for example the buttons to these roles?
What I see as most difficult is how to intermix the enabling and disabling of buttons and menu options depending on the security roles in combination with the "normal" button enabling and disabling business logic.
Gr Arjen
|
|
|
|
|
When you are authenticating the user, at that point of time you should check the role the user belongs to. Once you get the role, enable/disable the controls. As far as enabling disable of the controls based on the business rules goes, that would happen on some user action after he logs in. So that would not interfere.
Here[^] is another article that might be useful.
|
|
|
|
|
This might get you started:
User Login For WinForm Applications[^]
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
I want know how to keep records of copied files to an external disk,such as USB? does anyone know how to achieve this in coding? Which kind of API s can we used to do this?
|
|
|
|
|
you could use log4net and log either to a file or a database everytime you do a copy ...
is that the sort of thing you mean ?
'g'
|
|
|
|
|
petta1000 wrote: I want know how to keep records of copied files to an external disk,such as USB?
There's no filter or event that fires for all copy-actions.
Do you want to log copy-actions initiated by your own application? If so, you'd need to write a message yourself.
Do you want to keep an eye on a folder on that external drive? A FileSystemWatcher perhaps?
Can you explain in more detail what it is that you're trying to achieve?
I are Troll
|
|
|
|
|
I want to keep and eye on all the files that are copying to a USB media. Whenever file copy operation perform, I want to check whether those are copying a USB device or not. If they are copying to a USB device, details of those file transfers should be logged.
|
|
|
|
|
petta1000 wrote: I want to keep and eye on all the files that are copying to a USB media.
Might be doable using a CopyHook[^].
I are Troll
|
|
|
|
|
Hi,
You have to write a service which will motinor USB drive. If any USB is connected to the system than watch that USB using FileWatcher class.
Regards,
Sunil G.
|
|
|
|
|
I think you are right. But is there any examples how to achieve this. And I'm not that much sure whether I can do this for file copy event using FileSystemWatcher.
|
|
|
|
|
I apologize if this post is generic and redundant, but I have not found a solution, but I have been searching the net for a good example with no luck....
I have a simple windows form app that has a windows media control, and I want to play a playlist. I have a directory that has a list of playlists and I want to select a playlist and play it.
I have all the code to select the playlist working, but I can not for the life of me figure how to set the active playlist in the control and then make it play...
Any links or direction to a place find a sample would be greatly appreciated.
|
|
|
|
|
I have to agree that information on this does seem hard to come by.
For all comments that follow I am assuming that you are talking about the WindowsMediaPlayer ActiveX control, although your question does not make it clear. If it is not this control, please let me know to save me wasting my time.
However after about 10 minutes Googling I have discovered that there is a currentPlaylist property, so far, however I am unable to determine how to start playing.
Unless you tell me that it is not WMP control I will continue investigating.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
I have just found this[^] thread which contains
this.axWindowsMediaPlayer1.Stop();
so maybe there is a
this.axWindowsMediaPlayer1.Start();
method? Give it a try, the worst that can happen is that your computer will explode!
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
OK, here is the full gen.
Go to Solution explorer.
Open the references folder.
Find the reference to the DLL you are using and right-click on it.
From the context menu select 'View in Object Explorer'.
In the left-hand pane of the Object Explorer scroll down to and select WindowsMediaPlayerClass.
In the top right-hand pane you will see all of the available members.
You will see that there is a Play method, it would seem to be what you are looking for.
Whilst you are there, have a good look through the list, there are lots of useful looking methods/properties.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hi, Thanks for the replies, all of them, good info and was helpful.. I am working on it now.
I am sorry I did not post the control, but yes your assumption is correct I am using the windows media player control.
I will post with the end result, and a code snippet in case helps others, thanks for the pointers.
|
|
|
|
|
I want to display four images from a folder in local hard drive. the latest four images should display in the form.
how do I get the latest images to display in for picture boxes?
Thank You..
|
|
|
|