473,407 Members | 2,314 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

ComboBox Paste

Hi

How can i disable Paste on ComboBox?

ComboBox DropDownStyle is DropDown.
ComboBox must accept only numbers.
I know how to handle keypress event to accept only digits, but how to
disable paste?
Best regards;
Mex

Oct 20 '07 #1
2 3190
Mex,

Well, you can subclass the ComboBox and handle the WM_PASTE message in
your overriden WndProc method. However, I would say that you shouldn't do
this.

Rather, when information is pasted, figure out if it is a number, and if
it is, allow the paste. If not, then don't change the contents.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Redivivus" <me***********@deltmar.eewrote in message
news:uS**************@TK2MSFTNGP02.phx.gbl...
Hi

How can i disable Paste on ComboBox?

ComboBox DropDownStyle is DropDown.
ComboBox must accept only numbers.
I know how to handle keypress event to accept only digits, but how to
disable paste?
Best regards;
Mex

Oct 22 '07 #2
try change DropDownStyle to DropDownList, i think its better.

-----------
Tarek M. Siala
Software Developer
http://tarksiala.blogspot.com

"Redivivus" <me***********@deltmar.eewrote in message
news:uS**************@TK2MSFTNGP02.phx.gbl...
Hi

How can i disable Paste on ComboBox?

ComboBox DropDownStyle is DropDown.
ComboBox must accept only numbers.
I know how to handle keypress event to accept only digits, but how to
disable paste?
Best regards;
Mex

Oct 24 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Susan Bricker | last post by:
I went back to read my post and found an error in my description ... here is the post, again, corrected: The following error: "The current field must match the join key '?' in the table that...
1
by: dburns | last post by:
I have an unbound ListBox and an unbound ComboBox on the same form. I have them both set up to display the values from the same field in the same table. The ListBox displays the correct values; the...
4
by: Beeeeeeeeeeeeves | last post by:
I have an ownerdrawn combo box which I am drawing with an image and some text, this is all working beautifully apart from the difference in the Brush I have to draw the background and the text with...
30
by: dbuchanan | last post by:
ComboBox databindng Problem == How the ComboBox is setup and used: My comboBox is populated by a lookup table. The ValueMember is the lookup table's Id and the DisplayMember is the text from a...
3
by: Shiva | last post by:
Hi, When you create a combobox on a form, both a label and a combobox are created. This label doesn't have the same properties as a label detached from a combobox. For example, the property...
2
by: steph | last post by:
Hi, Access 2002: We've got a DataSheet-Form with a Combobox-field that shows strange behaviour. The ComboBox is constrained to the list so if we paste a value not existing in the list we get...
3
by: sklett | last post by:
I'm changing from a DataGrid to a DataGridView and have run across a problem. The items that are bound to the DataGrid have an int Property that represents a primary key of a lookup table in my...
5
by: active | last post by:
I tried to use a datasource with a combobox and it didn't work completely so I build a small test that was much more straight forward then the app. The test was to see if the combobox dropdown...
3
by: Gerrit | last post by:
Hi, I try to learn programming in c# with databinding controls. Now I have a problem with a ComboBox with the advanced properties for databinding, I want to set the DataSourceUpdateMode to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.