473,387 Members | 1,899 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Me.Hide()


I have a dialog form, frmDetails, that is opened from the main form:

frmDetails.ShowDialog()

The only way I have provided to close this dialog is via the "X" button.

If frmDetails is just closed as normal, there is no visual problem (no repainting) with the main
form.

Now, I add this code to the the FormClosing event in the dialog, frmDetails:

If e.CloseReason = CloseReason.UserClosing Then
e.Cancel = True
Me.Hide()

End If

In this case, the dialog hides, but in the process there is unacceptable amount of repainting on the
main form. A portion of the top right client area on the main form turns transparent for an instant
showing portions of any underlying app that may be present. I gather that this transparency
business is probably causing the repainting.

Does anyone know if the Hide method has a bug? Better method? Workaround?

Gene
Aug 9 '06 #1
2 2748
Im new to vb.. but have you tried instead of doing the Me.Hide() to just try
to set the Opacity of the form to 0 first?

see if that work around solves ur display issue - then close the form?

-I have not had that happen to me at all with my Dialog forms. ( vb2003 )

Miro
"gene kelley" <ok**@by.mewrote in message
news:jl********************************@4ax.com...
>
I have a dialog form, frmDetails, that is opened from the main form:

frmDetails.ShowDialog()

The only way I have provided to close this dialog is via the "X" button.

If frmDetails is just closed as normal, there is no visual problem (no
repainting) with the main
form.

Now, I add this code to the the FormClosing event in the dialog,
frmDetails:

If e.CloseReason = CloseReason.UserClosing Then
e.Cancel = True
Me.Hide()

End If

In this case, the dialog hides, but in the process there is unacceptable
amount of repainting on the
main form. A portion of the top right client area on the main form turns
transparent for an instant
showing portions of any underlying app that may be present. I gather that
this transparency
business is probably causing the repainting.

Does anyone know if the Hide method has a bug? Better method?
Workaround?

Gene

Aug 9 '06 #2
On Wed, 9 Aug 2006 11:29:55 -0400, "Miro" <mi******@golden.netwrote:
>Im new to vb.. but have you tried instead of doing the Me.Hide() to just try
to set the Opacity of the form to 0 first?

see if that work around solves ur display issue - then close the form?

-I have not had that happen to me at all with my Dialog forms. ( vb2003 )

Miro

The Opacity value of the dialog has no effect with regards to the problem. It's the actual call to
Hide versus Close that triggers the problem.

It now appears that the problem is being caused by a 3rd party control in use in this particular
app. If I temporarily remove it, the problem goes away, so I'm now checking with the control vendor
on this issue.

Gene


>"gene kelley" <ok**@by.mewrote in message
news:jl********************************@4ax.com.. .
>>
I have a dialog form, frmDetails, that is opened from the main form:

frmDetails.ShowDialog()

The only way I have provided to close this dialog is via the "X" button.

If frmDetails is just closed as normal, there is no visual problem (no
repainting) with the main
form.

Now, I add this code to the the FormClosing event in the dialog,
frmDetails:

If e.CloseReason = CloseReason.UserClosing Then
e.Cancel = True
Me.Hide()

End If

In this case, the dialog hides, but in the process there is unacceptable
amount of repainting on the
main form. A portion of the top right client area on the main form turns
transparent for an instant
showing portions of any underlying app that may be present. I gather that
this transparency
business is probably causing the repainting.

Does anyone know if the Hide method has a bug? Better method?
Workaround?

Gene
Aug 9 '06 #3

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

Similar topics

5
by: Steve | last post by:
Visual Studio 2003 C# Windows: I have a tree view control as my main menu control down the left side of my application. This has 2 Parent Nodes on it (Jobs and Employees). beneath these 2 main...
3
by: alex | last post by:
I'd like to have a show/hide widget on my web site, kind of like "show details" / "hide details" in Google Groups. Is there a tutorial explaining how to make them? Google's is a bit complex and...
0
by: Efkas | last post by:
I have a full custom application with some widged extending Controls like Label and PictureBox. I build a menu with these widgets. When I click on one of them, it calls a function to display...
7
by: FP | last post by:
I'm new to Java Script. I'm displaying comments people have made. Below each persons' comment I want to add 2 buttons "Reply" and "Amend". Clicking "Reply" would display an empty text field...
5
by: ali | last post by:
Hello every one i need you help regarding div hide and show. i am having a link like <a href="#" onClick="expandWin()">show/hide </a> <div id=showHide> </div> within div i have lots of...
1
by: pamate | last post by:
hi, I want to show hide layers. I am able to show and hide layers but i am facing problem that, cant view the cursor in Mozilla,but i can type in input text box, its overlapping the layers. ...
6
by: Ralph | last post by:
Hi, I was reading effictive C++ and some other books again and they all tell you about hiding implementation details (proxy/pimpl/inheritance) but they never really explain when to use it. I...
6
by: Doogie | last post by:
Hi I have an img control I am trying to hide upon certain types of commands in my code behind. When to hide it is directly tied to a asp:dropdownlist control. So depending on what the user...
2
by: richard | last post by:
In using the simple code below, how do I tell it NOT to hide a division when the link is clicked on if that division is already visible? would it be as simple as using a 2nd function and setting...
0
Debadatta Mishra
by: Debadatta Mishra | last post by:
Introduction In this article I will provide you an approach to manipulate an image file. This article gives you an insight into some tricks in java so that you can conceal sensitive information...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
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,...
0
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...

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.