Solved

label control not appearing

Posted on 1999-01-03
4
142 Views
Last Modified: 2010-05-18
I have a label control on a form with a grid1 control. when someone requests data to fill the grid control I set the label.visible=true, because it says "Please wait" but it dosn't work. The label control is initially set to false then when a person clicks on fillgrid the first command is to make it visible, but it stays invisible. If I F8 and step thru the program, when that command is reached it works perfectly, I have tried placing the label in different places on the form, but to no avail. I also have a check to inform the user that no data is available and if that event is triggered then before the msgbox pops up the label will become visible. This has me stumped, there is no reason why it shouldn't work. I have used this in other programs and it has worked fine the only difference is the grid control.
I am using VB4-16bit.
Any thoughts?
0
Comment
Question by:dtucker
4 Comments
 
LVL 3

Expert Comment

by:a111a111a111
ID: 1453671
one thought without looking at your code:

place exit sub just after you call the lable to be visible.

like this:

lable1.visible = true
exit sub


now you should see the lable visible and continue from there.

you can also email me your code or post it here.

shayplace@hotmail.com
0
 
LVL 2

Expert Comment

by:trillo
ID: 1453672
You're probably executing a lot of code (or time consuming code), and you don't give a chance to the label to paint itself... try something like:

label1.Visible = True
label1.Refresh
. next code statements...

Trillo
0
 

Expert Comment

by:Ajoy
ID: 1453673
dtucker,
as far as my exp with grid, it should cause u no problems.
try what Mr.shayplace has  written and if that works then check ur code for filling the grid.
regards,
ajoy
0
 
LVL 1

Accepted Solution

by:
jeffcameron earned 30 total points
ID: 1453674
use the doevents command, it will allow windows to repaint.

label1.Visible = True
doevents

0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Mysql vs Oracle 10 119
DIR issue 7 46
VB6 Compile Compatibility Issue 4 26
Spell Check in VB6 13 42
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now