|
Here's the outline:
private void textBox_KeyPress(object sender, KeyPressEventArgs e)
{
if (!e.KeyChar.Equals(Keys.Enter))
{
}
else if (listBox.SelectedIndex != -1)
{
}
else
{
}
}
private void listBox_DoubleClick(object sender, EventArgs e)
{
}
Each piece should be in a private method, don't polute the event handlers.
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
Make sense to do that. Thanks to the clue that you gave me I figure that it is possible to share a event method with two or more controls. (didn't know that before). I also figured how to select the list-box items by typing in the text-box.
The only thing is, I dunno how to stop a key-command from doing its job. For example: if I press the space bar while typing on the text-box a space will be added to the text-box. Is it possible to cancel that command and when I press the space bar no space will be added?
The C# book that I have doesn't talk about it and my search in Google isn't lucky... 
|
|
|
|
|
Hi I want to know that how to divide video files into its constituent frames using c#.net
|
|
|
|
|
If I understand you correctly, you should check out DirectShow.NET which is managed wrapper, you can then create graph with some frame grabber and "run" it.
|
|
|
|
|
|
First up learn where the shift key is, it will help you.
Secondly you haven't actually asked a question.
I can infer from your message that you can't work out how to do this. But what I am not sure is if this is due to not understanding a nuance of c# that has caused you to go in circles with an implimentation problem or because you are thick.
Please can you let us know!
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
For You:
I just want to know how should i move the pixels so tht transparency between the pieces is gone.I have tried shifting the pixels row by row and also column by column but that is not working.... jus tell me any other way to do this....
|
|
|
|
|
Great, now you've asked a question and it looks like you've got spelling mastered.
If you haven't read Christian's article do so. The basic premise is that you must know the transparancy colour.
Will the blocks always move on just on plane or can they move on both?
You need to identify each block of image and move it enmase. Otherwise you will not know if you're going left/right or up/down.
Have a go and see where it's going wrong. Then come back and ask for some help at the next stage. Unfortunately, without knowing the method you are trying to employ it is rather difficult to help just yet.
Now read Christian's article (he's v. clever) then have a go at a solution. If you get, come back and ask for some help where you are not sure.
And have a Gin'n'Tonic, that helps as well.
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
You need to read my image processing articles. As the lines are not straight, you need to iterate over each row, and then build a new row using only non transparent pixels. If you can't see which are transparent, you may need to match based on color alone.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Here, I can see which pixels are transparent...
Now, if I build each row again using only non transparent pixels then there will be problem at the last rows of each puzzle piece as the transparent color there need not to be shifted as the puzzle piece below it will fill it.....
Thank you for replying...
|
|
|
|
|
Umangj wrote: heyyy pls help me...
Hey PLEASE stop begging
|
|
|
|
|
Its not begging, its called manners while asking for some help....
And it will be better if you can reply to the question asked and not how it is asked....
|
|
|
|
|
|
Hi,
if I had a single pixel with alpha=0 where I would like it to be 255, I would probably open up my toolbox and modify that pixel somehow. And if I had several, I would consider a loop, maybe even two of them.
Of course, if the information happens to be absent, I am not a magician.
BTW: your hardest problem may well be that one image is 150*106 while the other is 150*107
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
Hi, to Every one, i want to use shortcut keys for my program functions, in example when a user clicks on the specific button a function calls by the program now i want, user can access to this method by pressing a specific key (like Alt+E) instead pressing a button... how can i do this ?
--
thanks to you all --> ![Rose | [Rose]](https://codeproject.global.ssl.fastly.net/script/Forums/Images/rose.gif)
|
|
|
|
|
You need to setup keypreview for the form, and then listen to the KeyPress events. When the specified keys are pressed then call the necessary function. If I am correct some menu items can be automatically set for a key shortcut. So when the specified shortcut is pressed then the menu item click event is called automatically.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my Blog
|
|
|
|
|
Hi, I'm a C# programmer, Can anyone tell me how can i take control to the system's hardwares ? and enable or disable them in Microsoft windows? by c# coding ?
---
thanks to U All ![Rose | [Rose]](https://www.codeproject.com/script/Forums/Images/rose.gif)
|
|
|
|
|
You could emulate everything by going through the Device Manager, but why would you want to do this? Shouldn't this be done by the end-user and not a computer program?
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my Blog
|
|
|
|
|
Hi, im using a program called EES for calculating purpose. It supports using ones own compiled code, but requires specific header in the DLL file, and the file need to be renamed from .dll to .dlf.
When the program checkout the .dlf file, it will look for a function call, in delphi that would be:
function FuncName (var S:charstring; Mode:integer; Inputs:ParamRecPtr):double; export; stdCall;<br />
begin<br />
..<br />
In C++:
extern "C" {<br />
__declspec (dllexport) double SUM_C(char s[256], int mode, struct EesParamRec *input_rec)<br />
{<br />
...
In C# ???
Among many i tried:
public class Globals<br />
{ <br />
public static double SUM_C(char[] s, int mode, ref EesParamRec input_rec)<br />
{<br />
...<br />
(EESParamRec is a class that handles the EES call)
Full code and so on can be found here:
Page 218 and rest of chap 6(EES integration examples)[^]
Unfortunatly no mentioning of C#
Since EES is only used by engineers working with thermodynamics, the resources on the internet is close to non existing, i know this is a long shot, but please help if you can.
|
|
|
|
|
You'll have to get ahold of the manufacturer of EES and see what you have to do, or if it's even supported. From your decription, it would appear that whatever you use has to support writing a standard library .DLL. C++ and Delphi support this. C# and VB.NET do not.
|
|
|
|
|
Thanks for the answer, the manual also says that it must be dynamic link library, but i dident know that MS removed that from C# (new to coding), so currently im at a dead end. Im goana try to make a C++ wrapper for my C# code, and call it that way, ultimately im goana have to port the whole thing to C++ ... Anyways thanks again.
|
|
|
|
|
My final year project is Video Collection system using C# and in this project i want to store videos information and videos at remote server. i want to know how information is sent to server and how these data store in database at server. I have to submit my project on 10 April. Please help me.
Thanks 
|
|
|
|
|
abhishek29 wrote: I have to submit my project on 10 April
#sings#
I'm h-a-p-p-y! I'm h-a-p-p-y!
I know I am!
I'm sure I am!
I'm h-a-p-p-y!
Your going to FAIL! That is so sweet, I love it!
After a week of utter boolacks I get to read this and think 'fank thuck! One of these cupid stunts has feally rucked-up AND THEN COME TO TELL US!'
Gotta love it, I'll give you a five for pure entertainment, thank you!
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
Bad answer - 1.00/5 (1 vote) - I don't think so.
p.s. I'm still laughing
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
You have done no work on a final year project then come to us with four weeks left? That would barely give you debugging time.
Frankly if you take that attitude to your work then you deserve to fail. Working as an engineer requires commitment which you have not displayed.
|
|
|
|