Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / Win API / May 2008



Tip: Looking for answers? Try searching our database.

User control

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
vlad.ivashevich@gmail.com - 20 May 2008 12:54 GMT
Hello
please, could you help me with the such deal:
i need to create User control(Windowless) with dynamically created
Edit box within it. Edit box must be created via calling
"CreateWindowEx" function. But i can't display it on my User control.
What i'm doing wrong?

Sample:
'I call ity in UserControl_EnterFocus()

  InitCommonControls
  pTextWnd = CreateWindowEx(0, "Edit", vbNullString, _
           WS_VISIBLE Or WS_CHILD, _
           10, 60, 140, 25, _
           UserControl.ContainerHwnd, 0, App.hInstance, 0&)

  ShowWindow pTextWnd, SW_SHOWNORMAL
Dean Earley - 20 May 2008 14:21 GMT
> Hello
> please, could you help me with the such deal:
[quoted text clipped - 13 lines]
>
>    ShowWindow pTextWnd, SW_SHOWNORMAL

For a start, you are using the user controls containers hWnd rather than
the user controls hWnd itself.

Signature

Dean Earley (dean.earley@icode.co.uk)
i-Catcher Development Team

iCode Systems

expvb - 20 May 2008 20:02 GMT
> Hello
> please, could you help me with the such deal:
[quoted text clipped - 13 lines]
>
>   ShowWindow pTextWnd, SW_SHOWNORMAL

You don't need InitCommonControls, it's for the common controls.

Also, anything created with CreateWindowEx() will not participate in the Tab
order, arrow keys for navigation, nor validate event. In order to get these
to work, you have to implement IOLEInPlaceActiveObject hack to get these to
work. If someone clicked on a VB6 Control, then clicked on your API control,
the VB6 Control Validate event won't fire. Implementing
IOLEInPlaceActiveObject fixes this issue.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.