473,657 Members | 2,420 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Combo box question

Does anyone know of a way (using win32s perhaps) to eliminate that focus
rectangle over the selected option you see in a normal VB combo box?
Jul 17 '05 #1
6 12498
What focus rectangle?? I can't even see one in a "standard" combo box!!
Have you got it set to Drop Down List or something??
_______________ ______________
The Grim Reaper

"Arlie Rahn" <ar*******@nosp am.cox.net> wrote in message
news:AFYJc.8046 $%p4.2086@okepr ead04...
Does anyone know of a way (using win32s perhaps) to eliminate that focus
rectangle over the selected option you see in a normal VB combo box?

Jul 17 '05 #2
Yeah, I have to use the list (allowing users to enter values wouldn't work
well). And, when you load the combo on the form a little focus rectangle
appears around the selected value. It's a little annoying - esp since I
can't control the color of it.

"The Grim Reaper" <gr*********@bt openworld.com> wrote in message
news:cd******** **@hercules.bti nternet.com...
What focus rectangle?? I can't even see one in a "standard" combo box!!
Have you got it set to Drop Down List or something??
_______________ ______________
The Grim Reaper

"Arlie Rahn" <ar*******@nosp am.cox.net> wrote in message
news:AFYJc.8046 $%p4.2086@okepr ead04...
Does anyone know of a way (using win32s perhaps) to eliminate that focus
rectangle over the selected option you see in a normal VB combo box?


Jul 17 '05 #3
Are you using a ComboBox with Style=2 Dropdown List
or are you using a ListBox with Style=1 Standard?

I have used the following in a ListBox (in the _Click procedure) to get rid
of the standard blue box highlight AND the focus rectangle.

List1.Enabled = False
List1.ListIndex = -1
List1.Enabled = True

Maybe the above, or some combination of the above, would work with the
ComboBox?

Tom
"Arlie Rahn" <ar*******@nosp am.cox.net> wrote in message
news:AFYJc.8046 $%p4.2086@okepr ead04...
Does anyone know of a way (using win32s perhaps) to eliminate that focus
rectangle over the selected option you see in a normal VB combo box?

Jul 17 '05 #4
I am using a combo box with style =2 Dropdown List.

If you want to mimic this, just create a project with a combo box, put in
4-5 values into it on load and select the first one after running the
project. You will see a small rectangular box around the value selected. I
would like to find a way to remove that.

"Kiteman - Canada" <-d*************@ shaw.ca> wrote in message
news:qSEKc.5741 0$ek5.31890@pd7 tw2no...
Are you using a ComboBox with Style=2 Dropdown List
or are you using a ListBox with Style=1 Standard?

I have used the following in a ListBox (in the _Click procedure) to get rid of the standard blue box highlight AND the focus rectangle.

List1.Enabled = False
List1.ListIndex = -1
List1.Enabled = True

Maybe the above, or some combination of the above, would work with the
ComboBox?

Tom
"Arlie Rahn" <ar*******@nosp am.cox.net> wrote in message
news:AFYJc.8046 $%p4.2086@okepr ead04...
Does anyone know of a way (using win32s perhaps) to eliminate that focus
rectangle over the selected option you see in a normal VB combo box?


Jul 17 '05 #5
I could not figure out a way to remove the rectangular box around the last
selected value in the pulldown menu without
Combo1.Clear
and then rebuilding the menu each time a combobox value is selected.

As for the highlight around the item displayed in the ComboBox before the
menu is pulled down you just have to set the focus to another control. You
can create a command button or another ComboBox and hide it behind your
existing control. Whenever the Combo1 receives a Change or Click event
just run this line of code:

Combo2.SetFocus
or
Command1.SetFoc us

and the hidden ComboBox receives the focus and the highlighting disappears
from Combo1.

Hope this helps.

Tom
"Arlie Rahn" <ar*******@nosp am.cox.net> wrote in message
news:YMmLc.2554 $ml.76@lakeread 05...
I am using a combo box with style =2 Dropdown List.

If you want to mimic this, just create a project with a combo box, put in
4-5 values into it on load and select the first one after running the
project. You will see a small rectangular box around the value selected. I
would like to find a way to remove that.

"Kiteman - Canada" <-d*************@ shaw.ca> wrote in message
news:qSEKc.5741 0$ek5.31890@pd7 tw2no...
Are you using a ComboBox with Style=2 Dropdown List
or are you using a ListBox with Style=1 Standard?

I have used the following in a ListBox (in the _Click procedure) to get

rid
of the standard blue box highlight AND the focus rectangle.

List1.Enabled = False
List1.ListIndex = -1
List1.Enabled = True

Maybe the above, or some combination of the above, would work with the
ComboBox?

Tom
"Arlie Rahn" <ar*******@nosp am.cox.net> wrote in message
news:AFYJc.8046 $%p4.2086@okepr ead04...
Does anyone know of a way (using win32s perhaps) to eliminate that focus rectangle over the selected option you see in a normal VB combo box?



Jul 17 '05 #6
While certainly a creative option, the problem with that solution is you
lose the ability to scroll through the options with the mouse wheel because
of the lost focus. I was hoping that there might be some sort of Win32 call
that controls the display of that focus rectangle, but it appears that may
not be the case.

"Kiteman - Canada" <-d*************@ shaw.ca> wrote in message
news:BzwLc.7333 9$od7.64855@pd7 tw3no...
I could not figure out a way to remove the rectangular box around the last
selected value in the pulldown menu without
Combo1.Clear
and then rebuilding the menu each time a combobox value is selected.

As for the highlight around the item displayed in the ComboBox before the
menu is pulled down you just have to set the focus to another control. You can create a command button or another ComboBox and hide it behind your
existing control. Whenever the Combo1 receives a Change or Click event
just run this line of code:

Combo2.SetFocus
or
Command1.SetFoc us

and the hidden ComboBox receives the focus and the highlighting disappears
from Combo1.

Hope this helps.

Tom
"Arlie Rahn" <ar*******@nosp am.cox.net> wrote in message
news:YMmLc.2554 $ml.76@lakeread 05...
I am using a combo box with style =2 Dropdown List.

If you want to mimic this, just create a project with a combo box, put in
4-5 values into it on load and select the first one after running the
project. You will see a small rectangular box around the value selected. I would like to find a way to remove that.

"Kiteman - Canada" <-d*************@ shaw.ca> wrote in message
news:qSEKc.5741 0$ek5.31890@pd7 tw2no...
Are you using a ComboBox with Style=2 Dropdown List
or are you using a ListBox with Style=1 Standard?

I have used the following in a ListBox (in the _Click procedure) to
get rid
of the standard blue box highlight AND the focus rectangle.

List1.Enabled = False
List1.ListIndex = -1
List1.Enabled = True

Maybe the above, or some combination of the above, would work with the
ComboBox?

Tom
"Arlie Rahn" <ar*******@nosp am.cox.net> wrote in message
news:AFYJc.8046 $%p4.2086@okepr ead04...
> Does anyone know of a way (using win32s perhaps) to eliminate that

focus > rectangle over the selected option you see in a normal VB combo box?
>
>



Jul 17 '05 #7

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

Similar topics

3
2004
by: NB | last post by:
Let's say in the product table I have around 50,000 products (well, infact it has now about 2000 only, but it's growing very fast, hence the question here) In the order form, users will select the product for the order lines. They want to see the entire list of available products. You can't handle the combo the way you've heard: limiting rowsource until first few characters entered, because - the product primary key is an autonumber
3
1660
by: Marcus Canales | last post by:
Hello all, Here is my situation. I have a combo box on a form. The combo box is linked to a qry (qryCustomers) and the form is linked to tblOrders. The way I currently use the combo box is to place the CustID number in to the table tblOrders. My question arises in that I would like to know if there is a way to initiate a new record (in my customers table) when a user types a value in the combo box that isn't in the list. Let me...
8
18341
by: Lyn | last post by:
Hi, Can anyone tell me how the initial value displayed in Combo Box is determined when a form is opened? I am loading the dropdown from one field ("CategoryName") of a table, with "ORDER BY ". The values in the dropdown are loaded in the correct order, but the initial value is not the first row of the dropdown as I expected. The field "CategoryName" is not the primary key for the table -- the PK is
2
1300
by: Gerry | last post by:
I have a combo box and I can populate it with my class of dat (the class allows me to store each userid,username called - see code below I want the user to select the dropdown and see the username - but also determine the UserID from what was selected (using DisplayName from the combo box?? I can populate the combo box without problems - BUT the user sees "System.object" in each item of the combobox not the username ***here is my clas...
9
6753
by: Edwinah63 | last post by:
Hi everyone, Please let there be someone out there who can help. I have two BOUND combo boxes on a continuous form, the second being dependent on the first. I have no problem getting the second combo to change depending on what values the user selects in the first box, it's just that every time the user changes the first combobox, the second combobox FOR EVERY RECORD goes blank.
9
32616
by: Vmusic | last post by:
Hi, I'm using MS Access 2002. I have a form with a combo box built from a query that returns one column, and that one column is the bound column. How do you use VBA to programmatically change which row in the combo box is selected?? I looked at the forum and the answers aren't very clear. Of course the MS Access help file is worthless.
1
2567
by: Shawn Yates | last post by:
It has been a while since I have done anything on MS Access and I seem to be a bit rusty. I hope someone could help me solve my issue. I have a form that has multiple combo boxes on it. Each box has 4 possible answers to a question. Each of the 4 possible answers is also assigned a value: answer 1 is worth 1 point, answer 2 is worth 2 points.... What I need to do now is add togethor the points of all the combo boxes. So far I have given...
5
3231
by: Bface | last post by:
Here are the other 2 questions I have. I forgot to mention I am on Access 2003/Windows XP. The second and third question I have is on Combo box. Can a combo box be used to access several documents on the network drive (U) or any other location? For example from the drop down list there are 3 options. Weekly figures Monthly figures Quarter figures Each one of these would open the related word or excel document.
2
3139
by: Sid | last post by:
I need some help in setting up Access combo box. I am using three comboboxes in my form. Comb Box 1, Combo Box 2, Combo Box 3. The row source for each of the combo box is a seperate table. Table 1 acts as row source for Combo Box 1 Table 2 acts as row source for Combo Box 2 However for combobox 3, I was trying to use 4 different tables as row source. I am trying to set up a criteria such that row source for comb
2
7044
by: biganthony via AccessMonster.com | last post by:
Hi, I decided to install Office 2003 Service Pack 3 on my home computer to test (in full knowledge that there may be some issues with it). After installation, I have noticed that with a small database I wrote for home, the combo boxes and listboxes no longer display the bound column. For example, on a form I have a combo box based on a table called 'names'. The two columns in the combo box are ID and Surname. The combo box and list box...
0
8395
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8310
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8503
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6166
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4155
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4306
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1615
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.