|
You will as the controls are private - which is as they should be.
Better to create your own public properties and in the setters, validate the value if neeeded and uptdate the controls from there.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
Hema Bairavan wrote: form2 newform = new form2();
newform.label1.text = this.textbox1;
newform.label2.text = this.textbox2;
WOW! That's really bad.
|
|
|
|
|
1. Properties
2. Parameterized constructors
Is this much hint enough?
|
|
|
|
|
I am developing program of C#,the windows are inherit from another library,such like the propty of the EnableBackgroundImage of buttons,it works well,but now I want to developing the multilanguage of the window,when I change the language of the window,some auto sources will be add to the designer.cs files,suck like "button.EnableBackgroundImage = null; " Is it the bug of the microsoft?is it because the project can not inherit propty of the EnableBackgroundImage well,and consider the EnableBackgroundImage is set nothing?
|
|
|
|
|
yuwenxiang wrote: Is it the bug of the microsoft?
I believe it is not a "bug", but done on purpose. Pictures can be dependant on the current culture, just as text.
Quoted from this[ ^] site; A magic feature of the Windows Forms designer is started when we set the Localizable property of the form from false to true : this results in the creation of an XML-based resource file for the dialog box that stores all resource strings, properties (including the location and size of Windows Forms elements), embedded pictures, and so on.
I are troll
|
|
|
|
|
I know what you said,but the picture is saved in another project,so that the property was null.
|
|
|
|
|
I am using AT command CNMI to enable forward incoming message to computer. But how can I receive incoming message? I need an example in C#
|
|
|
|
|
AT commands for read SMS
AT+CMGL="ALL" Get the total SMSs.
AT+CMGL="REC UNREAD" Get Un-read SMS
AT+CMGL="REC READ" Get Read SMS
AT+CMGR=3 Get 3 position SMS.
Actually These commands are used to read the SMS , After Landing on your Phone/Modem. But if you want to get a alert in your application while SMS landing on your Phone/Modem, u have to write a handlers. on port receive data , and check for the specific indication of SMS Landing."
phone/modem will give a indication when SMS lands on your phone/modem.
Ex:
SM: CNMI : 3
+CMTI:”SM”,3
Rajesh B --> A Poor Workman Blames His Tools <--
|
|
|
|
|
Thank you Rajesh.
There is a event handler named 'DataReceived' of SerialPort object. But I don't know what will be the parameter and how to handle the parameter to receive the message.
Could you please send a sample 'DataReceived' function?
|
|
|
|
|
|
I have a simple windows form app in C# using VS2005. I have a pointer in a pictureBox which I move round the form in response to the arrow keys on the keyboard (using the KeyDown handler). The problem is I have some read-only textBoxes and when I press the arrow keys I end up with a cursor moving along the text in my textBox. How do I stop this. Also the response to the keypresses is very slow at times - I'm not sure if it is related to the textBox issue. Can anyone suggest a solution please.
|
|
|
|
|
You will need to override the ProcessCMDKey method. This way:
protected override bool ProcessCmdKey(ref Message msg, Keys keyData) {
if (this.ActiveControl.Name == "textBox2" &&
(keyData == Keys.Up || keyData == Keys.Left ||
keyData == Keys.Right || keyData == Keys.Down)) {
return true;
}
else {
return base.ProcessCmdKey(ref msg, keyData);
}
}
|
|
|
|
|
Thanks for the reply. I pasted it into my form and changed the name of the textBox, but I get a NullReferenceException in the if statement. I'm not sure why!
I have added "e.Handled = true;" to my KeyDown event handler and that stops the cursor moving about and the slow response, but I still have the following problem:-
After I have opened the form, the first arrow key press seems to do nothing, the second selects all the text in one of my textBoxes and the third and subsequent presses move my pointer. How do I make all the arrow key presses just move the pointer?
|
|
|
|
|
Richard W Allen wrote: I have added "e.Handled = true;" to my KeyDown event handler
Oh yes...that alone is enough.
What are you expecting when arrow key is pressed? Focus should get to the next control instead of cursor moving through the text?
जय हिंद
|
|
|
|
|
Thanks. Its good to know I did something right.
d@nish wrote: What are you expecting when arrow key is pressed? Focus should get to the next control instead of cursor moving through the text?
I don't want to change the focus or move the cursor, I just want the arrow keys to move the pictureBox (pointer). First time and every time.
|
|
|
|
|
In Setup phase, I have a radio button page which have option read from text file.
For Ex: A Language choices with radio button in which language option is read from text file.
Please let's me know, How to customize radio button page.
Thanks so much.
|
|
|
|
|
Hi everybody,
I am developping application on Mobile Devices, using Compact FW. And I need to produce a unique string to ensure the licance managemant, preventing our application being copied and run in other mobie devices without licance password.
So I how can I get unique ID in Mobile devices ?
Or how can I get network adapter card MAC Address ? Since all device I am working on have their own embedded network card.
|
|
|
|
|
I don't know how to generate the Unique ID from MAC address in Mobile Device.
but every mobile device have it's IMEI (International Mobile
Equipment Identity) no has unique ID. U can use that.
Rajesh B --> A Poor Workman Blames His Tools <--
|
|
|
|
|
Thank you for your help.
And how can I get this IMEI number then?
|
|
|
|
|
to get IMEI No
See here
Rajesh B --> A Poor Workman Blames His Tools <--
|
|
|
|
|
sorry to message here.. actually i m n very much urgent to solve on problem..
i have one question in WPF, and i have posted there.. it seems peoples going there s very rare.. so i m requesting u people to please see my question and help me
|
|
|
|
|
You only posted it 18 minutes ago. You barely even waited.
You shouldn't cross post like that, it's considered rude and will put people off helping you.
Simon
|
|
|
|
|
yes mr Simon..
i accept wat u r telling..
but, did u see the previous post.. it was answered after one and half hour,,
as i m in urgent i told like that..
|
|
|
|
|
Hema Bairavan wrote: the previous post.. it was answered after one and half hour, as i m in urgent i told like that..
One and a half hours is pretty fast considering you are getting help for free. If you want an instant response Microsoft have a support helpline that you can phone and pay for support.
Simon
|
|
|
|
|
Hema Bairavan wrote: as i m in urgent i told like that..
Discussion forums count on the voluntary time of experts helping out peers out of their own time and effort. If you would need a timely response along with service guarantees, I would recommend you should dial up the service provider/vendor of the product and get started from thereon.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
The woods are lovely, dark and deep,
But I have promises to keep,
And miles to go before I sleep,
And miles to go before I sleep!
|
|
|
|