473,383 Members | 1,868 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,383 software developers and data experts.

Pointer on focused control

Dear all,
if I have a Form and some controls on it, how can I get a pointer to the
focused control. I what to remember focused control, do some operations and
then restore focus
Nov 21 '05 #1
3 1589
"Boni" <oilia@nospam> schrieb:
if I have a Form and some controls on it, how can I get a pointer to the
focused control. I what to remember focused control, do some operations
and then restore focus


The form's 'ActiveControl' property returns the currently focused control.
You can set the focus to a control by calling its 'Focus' method.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #2
Thank you.
Can I somehow get from the control, the form, on which it is situated? The
control is incapsulated and I have no pointer there.I would have to pass one
more parameter if it is not possible to get parent form from the control.

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> schrieb im Newsbeitrag
news:O7*************@TK2MSFTNGP14.phx.gbl...
"Boni" <oilia@nospam> schrieb:
if I have a Form and some controls on it, how can I get a pointer to the
focused control. I what to remember focused control, do some operations
and then restore focus


The form's 'ActiveControl' property returns the currently focused control.
You can set the focus to a control by calling its 'Focus' method.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #3
"Boni" <oilia@nospam> schrieb:
Can I somehow get from the control, the form, on which it is situated?


\\\
Dim f As Form = c.FindForm()
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Nov 21 '05 #4

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

Similar topics

7
by: Wolfgang Jeltsch | last post by:
Hello, say, I have a class A which is a subclass of a class B. If we look at the internal layout of a class A instance than most C++ implementations will place the members inherited from class B...
22
by: DJ WIce | last post by:
Hi, I'm looking for a script to get the hi-est z-index on a page. I want my javascript menu to be always on top of the page (moves along on top when you scroll down). Does anyone know how to...
4
by: Boni | last post by:
Dear all, is it possible to determine if a particular control (i.e. Listbox) has focus, without implementing gotfocus/lostfocus? I can't find such property. P.S I know that I can implement such...
8
by: Boni | last post by:
Dear all, is it possible to get a name of control on the form, which is currently in focus. Thanks, Boni
2
by: Anders | last post by:
Hi Im trying to develop a C# application which interacts with a Fingerprint scanner. The appliaction is going to run in the background (and as trayicon). When my applicatons catches an...
1
by: jurgro | last post by:
Hello. I am developing an Activex control to show animated gif and other images. With windowlessActivate flag the control is transparent. I want to show animated gif in a thread. Now the problem:...
0
by: Gilgul | last post by:
Hi i am trying to find the handle of the current focused control in all the running application. I tried GETFOCUS() but it gave the the handle only of the current thread There are 2 options of...
50
by: Juha Nieminen | last post by:
I asked a long time ago in this group how to make a smart pointer which works with incomplete types. I got this answer (only relevant parts included): ...
21
by: AdamOnAccess | last post by:
I am trying to set the focus on a button that sits on page 1 of my tab control. It looks like I'm successful at setting the focus because I see the highlight on the button, but when I push the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.