473,796 Members | 2,515 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Disappearing Listbox items...

I'm using an ActiveX Listbox control in my Windows Forms program. I
can load the listbox and have it work fine on one of my forms. But
when I add the line:

Me.MDIParent = frmMain

the form appears with the items invisible. The scrollbar shows that
the items are in the listbox--I just can't see any of them.

If I comment out the above line, the items appear normally.

Has anyone else experienced this bug?
Jul 21 '06 #1
4 1844
Kevin,

I think that few people can trace this this problem.

In my idea is normal code to create a mdichild from a mdiform by

dim mychild as new whateverform
mychild.MDIPare nt = me

Cor
"Kevin" <Ke****@nospam. cfl.rr.comschre ef in bericht
news:g0******** *************** *********@4ax.c om...
I'm using an ActiveX Listbox control in my Windows Forms program. I
can load the listbox and have it work fine on one of my forms. But
when I add the line:

Me.MDIParent = frmMain

the form appears with the items invisible. The scrollbar shows that
the items are in the listbox--I just can't see any of them.

If I comment out the above line, the items appear normally.

Has anyone else experienced this bug?

Jul 21 '06 #2
"Kevin" <Ke****@nospam. cfl.rr.comschri eb:
I'm using an ActiveX Listbox control in my Windows Forms program.
I am curious why you are not using .NET's listbox control.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Jul 21 '06 #3
Because I need to be able to change the background color of each
individual item.

I tried using the Listview control and I get the same problem only
this time it doesn't matter if the form is a child form.

The scrollbar shows the items are there, they're just not visible (see
attached picture).

On Fri, 21 Jul 2006 11:39:49 +0200, "Herfried K. Wagner [MVP]"
<hi************ ***@gmx.atwrote :
>"Kevin" <Ke****@nospam. cfl.rr.comschri eb:
>I'm using an ActiveX Listbox control in my Windows Forms program.

I am curious why you are not using .NET's listbox control.
Jul 25 '06 #4
....I meant also that I need checkboxes. I'd like to use the
CheckedListbox control, but I need to be able to change the background
color of each item. I know I can do that with an "owner drawn"
listbox, but the checkedlistbox doesn't support this.
On Fri, 21 Jul 2006 11:39:49 +0200, "Herfried K. Wagner [MVP]"
<hi************ ***@gmx.atwrote :
>"Kevin" <Ke****@nospam. cfl.rr.comschri eb:
>I'm using an ActiveX Listbox control in my Windows Forms program.

I am curious why you are not using .NET's listbox control.
Jul 25 '06 #5

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

Similar topics

1
2919
by: Vengeance | last post by:
On the parent_form.aspx I have these controls <asp:listbox id="Operators" runat="server" Width="163px" SelectionMode="Multiple" Rows="2"></asp:listbox> <INPUT class="loButton" onclick="java script:getOptionPicker('?mid=TS5 &callingcontrol=Operators');" type="button" value="+"> <asp:button id="save" runat="server" CssClass="loButton" Text="Save"> </asp:button> I also use a global.js file which adds the following functions
7
2510
by: Grant Schenck | last post by:
Hello, I have a ListBox control on a form. I add members of a class to the Items collection. They show up and I can select them. The text shown is from my classes ToString override. Now, later on I need to update this item. I find it in the Items collection and update a member used by the ToString member function. However, the text shown for the item in the ListBox does not change.
1
2272
by: yamne | last post by:
I have a problem. When I click in edit datagrid button I show two listbox and two button. I use two button to move data between two listbox. My problem is that I can't call the listbox in the button_click function because the only way to find the listbox is: (listbox)e.item.findcontrol What s the solution to this problem?
7
10068
by: 00_ChInkPoIntD12 | last post by:
Can anyone confirm there isn't a Sort() method for WebControl Listbox in Asp.net? It is rather simple to write a method to do the sorting, but just wondering I shouldn't invent the wheel if there is already one. C.P.
2
3847
by: tangokilo | last post by:
Hello and thanks for your help, I have the following Listbox created in VisualStudio 2003 designer, desiring to select multiple entries from that list: ------------------------------- ListBoxUser.Location = New System.Drawing.Point(16, 240) ListBoxUser.Name = "ListBoxUser" ListBoxUser.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended ListBoxUser.Size = New System.Drawing.Size(136, 147) ListBoxUser.TabIndex = 6
7
4539
by: Dave | last post by:
Hi all, After unsuccessfully trying to make my own dual listbox control out of arraylists, I decided to look for a 3rd party control. I've looked for over a week now and can't find anything but ASP.Net stuff when I need a Windows Form control. I've seen dual listbox populators in countless Windows applications, and have seen them run very fast, so I figured this would be extremely popular. Here's how it should work:
3
2299
by: Ali Chambers | last post by:
Hi, I have created a listbox called "dtlist1" on my VB.NET form. I call a procedure as follows: Private Sub openfile(flname As String) dtlist1.Items.Clear() etc..
4
4964
by: rn5a | last post by:
Can the items in a ListBox be sorted by the name of the items? The ListBox actually lists all directories & files existing in a directory on the server. Note that all the directories should be listed first followed by the files.
1
4031
by: Sunray | last post by:
I have a form called the sales form and i have 2 sets of listboxes So what happens is. i add items form the bottom set of list boxes which are bound to a data base to the top set of list boxes which are not bound, I select from the bottom set and add to the top set which works fine, but now i decide to remove an item from the top set. when i tried to use a remove item code it worked fine, it did delete the item form the list but it added...
0
10457
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
10231
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...
1
10176
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,...
0
10013
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
9054
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...
0
6792
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
5443
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
5576
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2927
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.