473,769 Members | 1,805 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 4972
> 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******** **********@nwrd dc03.gnilink.ne t...
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
4679
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 events into a list of non overlapping time spans "meta-spans". This nice ascii graph should show what I mean. 1) --- 2) ---
3
2393
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 dd/mm/yy. Thanks in advance
0
238
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 selection combo for either of the first two items, but not for any of the others. I'm using database objects to populate the Datacombo. The code is:
6
3867
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
1896
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: " & dcClient.SelectedItem client = adodcClient.Recordset.Fields(0).Value clientID = adodcClient.Recordset.Fields(1).Value When there is no client, the code generates an error as should.
0
1828
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 Button to look for an employee name in the database , I want to use a DataCombo control so that when the user clicks on the name of an employee or selects an employee name in the DataCombo, all the fields in respect of the employee selected shoud be...
5
7740
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 Combo Box populated with two items. There are two Group Boxes on the form with different sets of controls in each. They both are the same size and are located at the same place. Which Group Box is visible depends on the item selected in the combo box....
1
1841
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 float,Qty int 3.(Table)Pinvoice=InvoiceNo int primary key, Pdate datetime,SupId varchar(10),SupName varchar(10),ItemNo varchar(10),Descrp varchar(20),Price int,Qty int
1
4193
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
9423
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,...
0
10212
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10047
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9863
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8872
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7410
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
5304
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
5447
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2815
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.