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

MaskEdBox overlapping ComboBox or DataCombo

Is there a way to control which controls appear to be "on top". For example
a MaskEdBox shows up "on top" of a ComboBox when the 2 controls overlap, but
a MaskedBox shows up "underneath" a DataCombo when 2 controls overlap.

How can I force a MaskEdBox to show up "on top" of a DataCombo when whey
overlap? Thanks.
Jul 17 '05 #1
2 4957
> Is there a way to control which controls appear to be "on top". For
example
a MaskEdBox shows up "on top" of a ComboBox when the 2 controls overlap, but a MaskedBox shows up "underneath" a DataCombo when 2 controls overlap.

How can I force a MaskEdBox to show up "on top" of a DataCombo when whey overlap? Thanks.


You can set the ZOrder for the MaskEdBox at run-time.

Rick

Jul 17 '05 #2

"Hmmm..." <bl******@blah.com> wrote in message
news:t8******************@nwrddc03.gnilink.net...
Is there a way to control which controls appear to be "on top". For example a MaskEdBox shows up "on top" of a ComboBox when the 2 controls overlap, but a MaskedBox shows up "underneath" a DataCombo when 2 controls overlap.

How can I force a MaskEdBox to show up "on top" of a DataCombo when whey
overlap? Thanks.

Provided all the controls exist within the same graphical layer, set their
ZOrder (via the ZOrder method). Controls in different layers will always
appear over or under controls in another layer. The controls you're talking
about exist in the same layer, though, so it shouldn't be a problem. Well,
I'm not sure about the DataCombo, but I would imagine it's in the same layer
as the other controls.

There are only 3 layers, and one of those is the container (it's the first,
and bottom, layer). That leaves only 2 layers for controls in the
container. Graphically-drawn controls are at another layer (the second, or
middle, layer). Such controls include the Label, Line, and Shape controls.
All "windowed" controls exist in the 3rd (and top) layer. If a control has
an hWnd property, it's a windowed control and exists in the 3rd layer, so
that's an easy way to determine the layer. A control existing in a higher
layer always covers a control existing in a lower layer. For example, a
textbox (a windowed control existing in the 3rd layer) will always cover a
label (a graphical control existing, as stated, in the 2nd layer).

A control's initial ZOrder is set, within its layer, by the order the
controls are placed on a form (or other container). IOW, if you place a
command button on a form, and then place a textbox on a form and move the
textbox so it overlaps the command button, the textbox will be on top of the
command button. Since these controls exist in the same layer, you can change
this by setting the ZOrder (at design-time, select "Bring to Front" or "Set
to Back" from the Order submenu of VB's Format menu (or just press Ctrl+K or
Ctrl+K, respectively). In code, you use the control's ZOrder method to bring
it to front or set it to back.

That's really all there is to it.

Mike
Jul 17 '05 #3

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

Similar topics

11
by: Max M | last post by:
I am writing a "find-free-time" function for a calendar. There are a lot of time spans with start end times, some overlapping, some not. To find the free time spans, I first need to convert the...
3
by: starbuck | last post by:
Hi I am moving from VB6 to ASP.NET/VB.NET. A question I have is, is there a ASP alternative to the VB6 maskedbox control, what I am trying to do is force a user into typing in a date in format...
0
by: oaksong | last post by:
I've got a data combo with about 12 rows, of which only the first two are selectable! I put a label on the page below the datacombo and selecteditem.text will populate the list when I change the...
6
by: R | last post by:
Hi, I'm really stuck here. I have a data combo called cmbHvem which I link to a recordset RS23 like this If RS23.State = adStateOpen Then cmbHvem.RowSource = Nothing RS23.Close() End If
1
by: Bookreader | last post by:
I'm using a datacombo box in an application. It works fine when someone has made a selction and I use: adodcClient.Recordset.Bookmark = dcClient.SelectedItem MsgBox "Client Selected: " &...
0
by: Akinyemi | last post by:
I am developing a database for a Payroll program. I store the names of employees in a DataCombo control. I use ADO to connect the fields to my Access Database. Instead of using a Find or Search...
5
by: zacks | last post by:
I am having a strange issue with an application written in .NET 2.0. Actually it is in VB.NET but I think my problem is not language specific, but a .NET Framework issue. On a form I have a...
1
by: hussainiyad | last post by:
Dear All, In my form i,v many tables for examples 1.(Table)supplier = SupId varchar(10) primary key,SupName(20) 2.(Table)Product = ItemNo varchar(10)Primary key,Descrp varchar(20),Price...
1
by: sunilkds | last post by:
What is difference between datacombo box and simple combo box. what is combox.itemdata @ datacombo box I want complete information with example of datacombo box
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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
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...
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...

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.