|
IceWater42 wrote: your answer seems arrogant and condescending
Good, I had hoped that had come across.
What you were describing just sounds kludgey to me. Like using the clipboard to do a screen capture.
|
|
|
|
|
LOL ... kludgy? ... no KIDDING! It does to me too. I would LOVE to have an alternative solution.
What i don't think i need is your admitted arrogance. Please feel free to NOT help me in the future.
Sorry to have wasted your time.
|
|
|
|
|
IceWater42 wrote: btw ... your answer seems arrogant and condescending. I didn't realize that it was important to get your approval of my method before asking for help on how to do it ... shame shame.
Well, since Windows is a shared system, your app has to work and play nice with others. Since your solution is grabbing the mouse away from the user rather violently, and completely unreliably, I'd say it's your solution that's arrogant and condescending, to the user. There is no way for you to know that your've about to grab the mouse away from the user in the middle of a double-click, or some other operation. The user is liable to think there is a problem with the mouse. You don't see other application doing this at all, do you?? Maybe there's a reason for that...
|
|
|
|
|
My solution is arrogant and condescending? ... rofl
I would LOVE to have a conventional solution if i had one. And i would love to explore ideas of the bright people here. But tell me how "I don't see why you'd need the mouse to do that; find a better way." helps in ANY way. How is it worth the electrons wasted to say it?
I know it is a terrible approach but i was hoping the more knowledgable people here would offer a bit more than ridicule.
Why would anyone EVER want to come here for help if THAT is the quality of the help they are going to get?
The jerk owes me (and everyone else he talks that way to) an apology. Unbelievable.
|
|
|
|
|
Your use of the mouse and the clipboard is, obviously, not advised at all, since you're overwriting values on the clipboard that the user may need after your operation.
From your description, you're only option is to get the window handle to the TextBox and send a WM_GETTEXT message to it, retrieve the pointer that may be returned, and copy the string it points to to your own memory location. No mouse, no copying to clipboard, and no pissing off the user.
Google for "C# WM_GETTEXT[^]" for examples.
|
|
|
|
|
I'm told the 32-bit XP program used:
... int nRet = SendMessage(hWndC.ToInt32(), WM_GETTEXT, cap, buffer);
but the original programmer does not recall why that did not work on the 64-bit Vista machine.
Thanks Dave, I'll give WM_GETTEXT another try.
|
|
|
|
|
IceWater42 wrote: int nRet = SendMessage(hWndC.ToInt32(), WM_GETTEXT, cap, buffer);
It fails on 64-bit machines because window handles in 64-bit Windows are 64 bits wide. Look at what you passed in the first parameter. A signed, 32-bit integer, instead of a 64-bit wide IntPtr. Change that so hWndC returns an IntPtr and it should work.
|
|
|
|
|
i want to create one window service for watching a file. whenever file content change i want to get new data, which is just comes to file.
how can i do this. there is any way to do this??
yogesh
|
|
|
|
|
Need more information. Is it a text file to which additional data is added at the end, like a log file? I've written a Windows Service to do that.
|
|
|
|
|
yes that is a text file. whenever new data comes to file, i want to perform some action through window service. please help me sir,
yogesh
|
|
|
|
|
I had the service running on a thirty* second cycle; on each cycle it would:
0) Open the file
1) Seek to the position where it had read to on the last read
2) Read to the end of the file
3) Close the file
4) Store the new position
There were a number of other challenges to overcome, including being sure that it read only complete lines.
Your requirements may vary.
* Configurable.
|
|
|
|
|
could u give me code for that????
yogesh
|
|
|
|
|
It wouldn't be much use to you; it's very specific to one situation.
But with what I've said so far and an article on writing a Windows Service you should have a working version by the end of the week.
|
|
|
|
|
Create a Windows service and use the FileSystemWatcher class. You will get an event every time your file has been changed.
Patrik
|
|
|
|
|
That might be suitable for the OP's requirements, but not mine.
|
|
|
|
|
I have a app that list users that are locked out but it shows this in my combobox
billy-Noel Schmitlin,OU=Quality-Labo,OU=Users,OU=Soultz,DC=jacob-wonder,DC=com
i just want it to show "Billy-Noel" just the users name
what i have searched removes the CN= but thats it
<br />
strName = strName.Remove(0, 3); <br />
Thank you for your time.
|
|
|
|
|
Hi,
Split() on the first char you don't want, I guess that is a comma.
And read up on string class.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Some mupet-numb-nuts gave you onesy, so I've dropped a five on top to make it better.
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
or you could try:
int i = yourString.IndexOf(",");
string s = yourString.SubString(0,i);
|
|
|
|
|
Thanks for the help ill give that a go.
-Summey
|
|
|
|
|
Good people,
We have created a .NET application that will include several MP3 music files. We have approximately 12 MP3 files. These files are quite large (some are around 11MB). Therefore, our installable executable file is also quite large.
We plan on reducing the size of the MP3 files, however, I was wondering if there was some sort of best practice or common way to include music files in your .NET software application? If I zip up all the MP3 files, how do I tell .NET installer to unzip the files into the correct directory?
Thanks,
Blitz
|
|
|
|
|
Zipping MP3's generally doesn't help
|
|
|
|
|
MP3 is a compressed format, and it's lossy, hence it gives a quite good compression rate. Zipping MP3s won't usually reduce their size enough to make a difference.
2+2=5 for very large amounts of 2
(always loved that one hehe!)
|
|
|
|
|
Hi! You have seen programs like TeamViewer. How can I monitor the desktop of another computer and send the information to a client using C#. How can I film the desktop and send it like a stream video?
Can you give some directions on what approach to take?
Still learning...
|
|
|
|