TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
yuyestar
NA
1
0
how to trigger dropdown automatically in combo box in windows form
Jul 26 2006 4:49 AM
hi all,
i would like to trigger a selection of drop down in combo box without user selection.
my method seem no able to work. Please advise.
[
DllImport
(
"user32.dll"
, EntryPoint =
"SendMessage"
)]
public
static
extern
int
SendMessage(
int
hWnd,
uint
Msg,
int
wParam,
int
lParam);
private
void
dlSCustName_KeyPress(
object
sender,
KeyPressEventArgs
e)
{
DataTable
objCustInfo = objCust.GetCustNameID(strCompanyName,strCustomerId);
// get the customer records
if
(objCustInfo.Rows.Count > 0)
{
objForm.PopulateComboBox(dlSCustName, objCustInfo);
//call to trigger the drop down in combo box
ShowDropDownList();
}
}
private
void
ShowDropDownList()
{
SendMessage((
int
)dlSCustName.Handle , 273, 1,0);
SendKeys
.Send(
"{TAB}"
);
}
Reply
Answers (
0
)
windows controlbox
reportview control