Click here to Skip to main content
15,885,278 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to make Excel Cell as NumericUpDown. I make excel cell as ComboBox but dose not any idea about NumericUpDown.
Posted
Comments
[no name] 5-Mar-14 0:33am    
Please try it yourself. If you face any problem then give error with question.
Thanks
SachinSutar 5-Mar-14 1:17am    
I tried it but didn't get any exact solution.

1 solution

I didn't know exactly whats you are developing behind on your question. But I guess the following code may useful to you.

C#
//In Declaration 
[DllImport("user32")]
private extern static int GetCaretPos(out Point p);

Call the function and set the bounds of numeric up and down control as follows.

C#
//In Event Method
GetCaretPos(out cp);
numericUpAndDown1.SetBounds(cp.X, cp.Y + 50, 100, 50);


Thanks.
Anand. G
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900