|
-
Oct 17th, 2007, 10:11 AM
#1
Thread Starter
Fanatic Member
[2005] Showing a OnPaint Overrrided Form
Hi!!
I added a new form to my project and called it Tip. Then in its Designer i added a code that overrrides the OnPaint Sub, this codes changes the background of the form, its region and it also draws a custom border.
Then I added a Sub under Public Class Tip, named PutText, with some parameters. This sub changes the text property of a label contained in the form, andalso the width, height and location of the form, and in the end shows the form with the line Me.Show()
The PutText Sub is called throw the MouveEnter event of a label in the "main" form. So when i move the mouse above the label on the main form it shows the form Tip with the "correct" paint, but the height is wrong.
Has i said the PutText sub changes the height property to a fixed value of 24. But when the form Tip is showed the height is bigger, but if i set the height to a value of for example 54 it shows it correctly. If i put the line Me.Show() on the start of PutText the height in shown correclty, but as the form is showed first and then the property location changed we breifly see the form tip in the upper left corner before we see it in the right place.
I want to have the line Me.Show() on the end of the sub and the height appear right. But its like under a certain value he doesnt show it correct but above that value he does.
Can u help me?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|