VB Project Form Log File

Dear Experts, What is the use of Form Log File which has the extension FormName.log? Why is it whenever I refreshed a form controls whenever I finished a process like record deletion, a prompt that say "Error in log file" will appear? Strangely, it only affects certain forms in my project. Thanks.
LVL 1
JoengAsked:
Who is Participating?
 
SmallintConnect With a Mentor Commented:
Of course there's an explanation. You have under your toolbar a little angry gnome with scissors and ... xDD

Seriously, I can't explain what happens without taking a look to your code, and with details you give me it seems a bug of Visual Studio. Try to open your .frm with notepad and look in line 73 what's there. Probably there is a buggy definition of your toolbar, you know, everyboby can make mistakes, even Microsoft's programmers..... Have you installed Visual Studio SP5?

Anyway, you have found solution to your problem.....

Regards
0
 
SmallintCommented:
Usually, this logs files are created when you are loading a project. A very normal case is e.g. you have not registered in your machine a control, or version is not correct.

What message appears in log file? You are using a control only in these forms?
0
 
JoengAuthor Commented:
Hi SmallInt, The log file contains:
"Line 73: Property Left in tlbForm could not be set.
Line 73: Property Width in tlbForm could not be set."
So this log files are created when loading project and not when running a project, is it? For your information, I have many controls in the form. So with the info in log file, how can I solve the problem. Thanks a lot.  
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
SmallintCommented:
Log files can be created at runtime, but is more usual when loading project.

You have always same message in different forms when you are setting properties left and width of a control named tlbForm?
0
 
spauljosephCommented:
When loading your form into the Project, each and every form is checked for their controls and their state. If VB founds any error in any form, it creates a log file with the list of errors. It is normal. You can view the log file for the information about the error you received. As you mentioned here, Your LOG file is saying that you cannot set the Left and Width property of a control called tlbForm.

The control tlbForm may be restricted the properties Left and Width at design time or run time or both. Please check that before using that control's Left and Width property.
0
 
JoengAuthor Commented:
Dear Smallint, I used the control tlbForm which is a toolbar in many forms, but the error log only occur in a form. Thanks.
0
 
SmallintCommented:

Properties Left and width of a toolbar can be modified in certain situations, for example if align is vbAlignNone. I can't understand why an error is not fired and instead a log is written, but solution is easy. Simply check properties of your toolbar in these forms or don't try to resize your toolbar (you are resizing a toolbar at runtime?).

Regards
0
 
JoengAuthor Commented:
Dear Smallint, No i am not resizing the toolbar at runtime. And one more thing is the toolbar is always set to follow the form's width with fixed height. I can't change the width and height of the toolbar. But in other forms, i can do it. Do u know why? TQ.
0
 
SmallintCommented:
With and position can be modified if property align is set to vbAlignNone. Check this property in your toolbars.

Please, can you show us what misterious code is in line 73 in your form???
0
 
JoengAuthor Commented:
The align property is set to vbAlignNone. Very strange, there is only a blank line in line 73. Any how when i copied a similar toolbar from other form and paste it to this form, the problem seems to be solved. No more error messages that say "See error log file". Is there any explanation? TQ.
0
 
JoengAuthor Commented:
I have installed SP5. Thanks.
0
All Courses

From novice to tech pro — start learning today.