Hi all,
Here is what I'm doing briefly,
There is a Form-A maximized on the screen, the user clicks a button and a new form comes up
'Within the buttons Click Sub I have these lines
Dim sfrm As New SettingsForm 'The new form
sfrm.ShowDialog() ' User gives values and closes it by clicking Ok on it
sfrm.Dispose() ' Doesn't seem to have an effect on what I'm trying to do
magphplot() ' Some plots are drawn on the original form - A
End Sub
The plots are being drawn on a PictureBox.
What I find is that any portion of the area where the plots are being drawn, which overlaps with the area where the SettingsForm was opened are wiped clean immediately. Eventhough plotting is supposed to be done after this SettingsForm is closed.
Also when the SettingsForm is dragged over the plot area the plots there are wiped.
How can I avoide these things ?
Is there a way of getting a snapshot of the current form before opening a new form and then restoring that snapshot-picture back when the new form is closed. Without having to write the complete drawing routine in the Paint event.
Thanks,
Saurabh
Here is what I'm doing briefly,
There is a Form-A maximized on the screen, the user clicks a button and a new form comes up
'Within the buttons Click Sub I have these lines
Dim sfrm As New SettingsForm 'The new form
sfrm.ShowDialog() ' User gives values and closes it by clicking Ok on it
sfrm.Dispose() ' Doesn't seem to have an effect on what I'm trying to do
magphplot() ' Some plots are drawn on the original form - A
End Sub
The plots are being drawn on a PictureBox.
What I find is that any portion of the area where the plots are being drawn, which overlaps with the area where the SettingsForm was opened are wiped clean immediately. Eventhough plotting is supposed to be done after this SettingsForm is closed.
Also when the SettingsForm is dragged over the plot area the plots there are wiped.
How can I avoide these things ?
Is there a way of getting a snapshot of the current form before opening a new form and then restoring that snapshot-picture back when the new form is closed. Without having to write the complete drawing routine in the Paint event.
Thanks,
Saurabh