|
Sorry, I didn't realize DesignMode is protected, not public.
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.
|
|
|
|
|
|
I found that after posting, it pukes if you're using something other than visual studio (eg sharpdevelop), and while I us MSVS and this is an internal app, I dislike that sort of thing on general principles.
It is a truth universally acknowledged that a zombie in possession of brains must be in want of more brains.
-- Pride and Prejudice and Zombies
|
|
|
|
|
Ok. How about checking EntryAssembly == YourApp?
Nick
----------------------------------
Be excellent to each other
|
|
|
|
|
Wouldn't that cause it to fail if I renamed the app/used the control for a second app in the future?
It is a truth universally acknowledged that a zombie in possession of brains must be in want of more brains.
-- Pride and Prejudice and Zombies
|
|
|
|
|
You could test against Application.ExecutablePath.
This is getting complicated = would need some testing
Nick
----------------------------------
Be excellent to each other
|
|
|
|
|
no, this is getting complicated = add comment about MS stupidity and move code out of constructor.
It is a truth universally acknowledged that a zombie in possession of brains must be in want of more brains.
-- Pride and Prejudice and Zombies
|
|
|
|
|
I found a solution not exactly what i was looking for, but it did help me someway.
My next question is How do I create a dynamic copy of datagridView only those row I am interested in. For example, I have a dataGridView it has 15 rows they are all not the same. So, I want to get only
dataGridView1.rows[i].cells[0].value are same.Means collects only those rows first cells has "x".
thanks again.
|
|
|
|
|
That would depend on where you are getting the data for your DataGridView from.
Is it from a database, a text file or where?
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.”
|
|
|
|
|
Hello friends
I want to create a chat room where people will be able to chat.
Users will also be able to Voice chat there just like a messenger.
If there is any code or example or any sort of thing that will help me making this please let me know.
I need to do this asap.
Thanking in advance
Johnny
|
|
|
|
|
Here[^] is a good example.
Basically, you can create a server application and a client application. Search 'client server applications', sure there are loads of samples. But, it wont be as easy as you want it to be
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
Saiyed Alam wrote: I want to create a chat room where people will be able to chat.
Users will also be able to Voice chat there just like a messenger.
Yep, you and about 3 Million others.
You want to have a guess, how many of them actually manage to do it?
I estimate less than 0.005%. Why? Because it is exceedingly difficult thing to do a) properly and b) securely.
Good luck!
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.”
|
|
|
|
|
FYI
Saiyed Alam wrote: I need to do this asap.
It's comments like that that get people's back's up. Just because you need it dosn't mean I ned to do it for you ASAP!
|
|
|
|
|
Of course. You simply need to use a console application. Don't worry about writing code, the resonant harmonics of your brain will cause a temporal back-ripple, encoding your intentions onto the relevant sectors of the hard drive in the necessary patterns. This is the true essence of coding; that of making the difficult, possible and the possible, beautiful
Between the idea
And the reality
Between the motion
And the act
Falls the Shadow
|
|
|
|
|
Computafreak wrote: Of course. You simply need to use a console application. Don't worry about writing code, the resonant harmonics of your brain will cause a temporal back-ripple, encoding your intentions onto the relevant sectors of the hard drive in the necessary patterns. This is the true essence of coding; that of making the difficult, possible and the possible, beautiful
Damn, I have to upgrade to this version of VS!
Also, on the keyboard, where is the "Do What I Mean" button?
|
|
|
|
|
It's more of a cable. Take the power cable from the back of the computer, switch on the power at the mains and suck on it
Between the idea
And the reality
Between the motion
And the act
Falls the Shadow
|
|
|
|
|
Computafreak wrote: encoding your intentions onto the relevant sectors of the hard drive in the necessary patterns
Yes but how do I communicate that essence to others?
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
The link in my sig contains all the info you need.
Christian Graus
Driven to the arms of OSX by Vista.
Please read this[ ^] if you don't like the answer I gave to your question.
|
|
|
|
|
|
The keypress event will only be triggered if the form has focus. if you want other controls to perform the same function then you must use there keypress events too.
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
And if you have some 30 controls on a form?? Your solution doesn't sound like a good method to me.
|
|
|
|
|
Yeah I see your point, I was thou more concerned on saying why it wasn't working rather than giving a solution, yet one made its way in
Thou I suppose it depends on the usage, perhaps two different text boxes need to do two different things when the 'Enter' key is pressed. Sure you can check focus on the form's preview event, but then what if you want to process a textbox after input, to validate its contents for example (although I already thought you can calculate new value from key press) anyway, is circumstantial, that' all i'm saying
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
The form has a KeyPreview property. Set that to true and you form Key handlers will get first crack at the keystrokes before any controls on it do.
|
|
|
|
|
|
Before I can ask the question I'll have to describe the situation:
There is a server and there are some clients, but the only thing server does is remembering which clients there are and then giving that information to clients which ask for it. So far so good, except that the clients are listening on some port (which is fixed on the inside of their NAT, say 1000). But obviously this information won't do anyone any good - they'd need the outside port. But how can you get it? I tried binding the socket that talks with the server to the same inside port (so that the server would see the correct port) but then it fails to connect. And the client itself seems to have no way to detect what outside port it is using..
So, what can I do about this? Do I need to throw the entire design into the bin (if so, what should it be like?)
|
|
|
|