|
For Ctrl, Alt and/or Shift, you can check the Control.ModifierKeys[^] property.
Otherwise I think you're stuck with P/Invoke on GetKeyState .
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
Thanks, that will do it!
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
If i add to my application a splitter and i try to move, it shows a transparent line following the cursor.
I would simulate this line.
I've to show this line if i click on a panel.
How could i do?
|
|
|
|
|
|
i don't need about it, sorry but i need only to show a semi-transparent line the follows the cursor when i click and move the panel (used as splitter).
Please any suggest?
|
|
|
|
|
Oh .. sorry misunderstood your qstn. Though I don't have much experience in System.Graphics, you'll have to manually implement the drawing with brush/lines.
|
|
|
|
|
I have a problem.. a strange problem.. a have an application with a picture box.. when i build it everithing is perfect.. so i build it, and i make a copy of the program, and move it to some other folder.. when i run my application, the picture looks really bad.. can anyone help? pls..
|
|
|
|
|
What dou you mean by looking really bad?.
|
|
|
|
|
I mean that other colors appear instead of the ones that were supost to.. and the contours are smudged... the really strange thing is, that if i keep the debug folder opened the picture displays correctlky (it's a picture on a form that loads on startup
|
|
|
|
|
I think you specified the value of the picturebox image at design time. Instead of that, load and set your image at run time. this will retain the quality.
- Malhar
|
|
|
|
|
OK Now, supose i don't want anybody to be able to mofify my picture, what should i do? Hope i'm not bugging you too much
|
|
|
|
|
Rename .jpg to .dll ..!!!! Just kidding!!
You can embed the image as a project resource by making image part of the project and extract the image just as you were accessing file.
System.Reflection.Assembly asm = GetType().Assembly;
StreamReader stream = new StreamReader(asm.GetManifestResourceStream("FULLY_QUALIFIED_NAMESPACE.FileName.jpg"));
|
|
|
|
|
Thank you very much . Hope I'll get it right( )) )
|
|
|
|
|
i still can't make that picturebox look good... i managed to embed it, and now i set it's value at run-time.. pls help
|
|
|
|
|
Huh .. strange .. is it a very large or a high-DPI picture? I can certainly give it a try if you dont mind uploading the image.
|
|
|
|
|
|
)
thank you verry much. I solved the problem. The problem was that the form had a transparent color... white! so.... sometimes it showed correctly, sometimes not )
thnak you again, hope i didn't boder you too much
|
|
|
|
|
Oh .. ok. I tried to reproduce the behavior but couldn't so i was researching to see if it was PNG related issue.. Anyways, glad you found the culprit.
- malhar
|
|
|
|
|
Again, sorry i have bothered you so much.. Hope you'll help me in the future too, tough.. Thank you.
|
|
|
|
|
no prob .. happy to be of help!
|
|
|
|
|
I want my application wether it Windows or web to open a given website (applet or any) and read (to file or DB ) what its displayed on it win i run it,
i just want to know haw to doit,
please HELP ASAP
Thanks Alot
|
|
|
|
|
Hi,
I'm very new to the C# application development architecture. What I am trying to accomplish is a class-system that looks a lot like the class system C++ is providing. An example of this architecture would be something like earth - an environment with animals and plants. Animals feeds the plants, and the plants lets the animals spread their seeds. They need eachother in order to function properly. What they need as well though, is a base - somewhere to walk. This is where "an Earth" come in to the picture. Earth sends parameters to the plants and animals, which handles the parameters, does what they have to do, and returns the result to earth - which continues sending requests and demands.
This is it.
I want an application where I might converse between classes without sending them as attributes all the time. Right now I'm having abstract classes which handles requests and demands from the Main Form and returns the result. It's very clumsy, since I have to send all fields that is beeing worked with as a parameter to the static function.
Is it somehow possible to set important fields to absolutly public? Or am I fishing in the wrong waters - are my idea of the optimal architecture incorrect?
I appreciate all answers I'll get. Thank you in advance,
// Leo
|
|
|
|
|
Zanathel wrote:
Is it somehow possible to set important fields to absolutly public? Or am I fishing in the wrong waters - are my idea of the optimal architecture incorrect?
Having everything public is NOT good architecture....
First the bad news - stuff C++ does that you can't do here. Two things spring to mind - no multiple inheritance and no friend classes.
You simulate multiple inheritance through interfaces, you can have a base class and impliment as many interfaces as you like. I find when I use C++ now, I tend to create classes to mimic the interface concept, it's not so bad.
No friend classes is a PITA though. There's really no way around this that I can see.
Zanathel wrote:
want an application where I might converse between classes without sending them as attributes all the time.
The good news is that you have delegates to send messages between classes now, which come in very handy, very often. You should look into using them to define communication between classes.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I have an application that I need to verify local user accounts against. I'm having a hell of a time finding information on this. I have found that the local windows account passwords are encrypted and I've got some direction on the cypher, but nothing on how to access it. So for example, I have accounts Admin, Ed and Erin. If someone tries to login as admin I need to verify their password against the local machine admin account. Any suggestions? Thanks.
Ed
|
|
|
|
|
I have an application that I need to verify local user accounts against. I'm having a hell of a time finding information on this. I have found that the local windows account passwords are encrypted and I've got some direction on the cypher, but nothing on how to access it. So for example, I have accounts Admin, Ed and Erin. If someone tries to login as admin I need to verify their password against the local machine admin account. Any suggestions? Thanks.
|
|
|
|