473,405 Members | 2,415 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,405 software developers and data experts.

Getting the hwnd property of a control

mshmyob
904 Expert 512MB
Is it possible to get the hwnd property (ie: long number) of a control on a form.

For instance I would like to get the hwnd property of a text box that has focus. I can get the form hwnd property but I need an actual control on the form.

Can this be done in VBA and if so can someone show me an example syntax.

cheers,
Oct 8 '09 #1
8 12210
mshmyob
904 Expert 512MB
Actually I may have found a solution thanks to Dev Ashish the Access Guru.

This may be my solution.

He explains why it cannot be done directly in VBA but a nice work around.

I will let you know if this works so nobody wastes time responding to this post.

cheers,
Oct 8 '09 #2
NeoPa
32,556 Expert Mod 16PB
It depends on what you want to do with it. I expect the facilities are limited, but it's the best you'll get. If you can't do what you need with this, then I doubt there'll be a way.
Oct 8 '09 #3
ADezii
8,834 Expert 8TB
@mshmyob
Just for curiosity, mshmyob, what in the world are you going to do with the hWnd for an Access Control?
Oct 9 '09 #4
FishVal
2,653 Expert 2GB
Hi, mshmyob.

I guess the following tool could be helpful in your research.
Winspector - Ultimate Windows Message Spy
Oct 9 '09 #5
mshmyob
904 Expert 512MB
@ADezii
Top Secret :).

If you must know it is to give ChipR a solution for his memo field scroll bar position problem.

I currently have it almost working using API's. I am just testing and fine tuning it now and will upload it to ChipR when I am finished.

I have it changing the scrollbox position whenever regaining focus to his memo field. Now all I need to do is actually reposition the data in the control.

But since I am a complete novice when it comes to API's it is taking me time but I am learning alot.

cheers,
Oct 9 '09 #6
mshmyob
904 Expert 512MB
@FishVal
Thanks Fish. The getfocus API works like a charm for me but I will look into this tool to see if I can learn anything from it.

cheers,
Oct 9 '09 #7
NeoPa
32,556 Expert Mod 16PB
@mshmyob
LOL. Good for you Mshmyob :)
Oct 9 '09 #8
mshmyob
904 Expert 512MB
You can see why I wanted this info here. Post #9.

cheers,
Oct 10 '09 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Curtis | last post by:
I am having some trouble getting my common compenent to be able to refresh and I am hoping someone will be able to tell me what I am missing. To simply things I have created a solution with a...
1
by: Fei Li | last post by:
Hi, I want to make a control like the property control in VS .net 2003. Who can tell what is it. Is it a Datagrid, TreeView, ListView or somthing else?
2
by: Steve Bottoms | last post by:
Hi, all! Using VB as code-behind in asp.net page... I have a TABLE control which I'm building dynamically. After the table is built, I'm trying to retrieve the HEIGHT property of that table...
2
by: Fabiano | last post by:
Please, i have a ASPX that contains two usercontrols, TOP.ASCX and CENTER.ASCX. The first one has a dropdown list inside of it and the second one has a Datalist. When user changes the...
2
by: VB User | last post by:
What type is it? How do I set it to that of a form?
2
by: =?Utf-8?B?SmFu?= | last post by:
I could use a property control like the one in Visual Studio shown in designer mode. The grouped mode is not absolutely necessary for me - but would be nice to have. Anybody know one? - or...
1
by: shapper | last post by:
Hello, I am creating a control which I will compile in a class. I am having problems when I use a property in the View State: ' Items <Bindable(True), Category("Data"), DefaultValue(""),...
4
by: neovantage | last post by:
hey all, I am developing a website and i am making website the w3c comliant. i am trying to make css document valid. But i am getting errors Property behavior doesn't exist : ...
0
by: ikbel borcheni | last post by:
Hi,I want to use the function MessageboxA(hwnd,LPCTSTR,LPCTSTR,UINT) but how can I get the hwnd of a dialog(which function can I use in VC++ ) I'm working with MFC. Thanks for help
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.