Click here to Skip to main content
15,914,322 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionHelp On Forms and threads Pin
RG_SA19-Sep-06 23:36
RG_SA19-Sep-06 23:36 
AnswerRe: Help On Forms and threads Pin
Christian Graus19-Sep-06 23:45
protectorChristian Graus19-Sep-06 23:45 
GeneralRe: Help On Forms and threads Pin
RG_SA19-Sep-06 23:53
RG_SA19-Sep-06 23:53 
GeneralRe: Help On Forms and threads Pin
Christian Graus19-Sep-06 23:56
protectorChristian Graus19-Sep-06 23:56 
GeneralRe: Help On Forms and threads Pin
RG_SA20-Sep-06 0:06
RG_SA20-Sep-06 0:06 
GeneralRe: Help On Forms and threads Pin
Christian Graus20-Sep-06 0:11
protectorChristian Graus20-Sep-06 0:11 
GeneralRe: Help On Forms and threads Pin
RG_SA20-Sep-06 0:20
RG_SA20-Sep-06 0:20 
GeneralRe: Help On Forms and threads Pin
Christian Graus20-Sep-06 0:22
protectorChristian Graus20-Sep-06 0:22 
Sure:

Dim NewForm As Form


Private Sub Hideloggin()

if not NewForm is Nothing NewForm.Dispose() ' Delete it if it's already been created before

Try
'Application.DoEvents()
NewForm = New Form2
NewForm.Show()
Me.Refresh()
'Me.WindowState = FormWindowState.Maximized
'Me.FormBorderStyle = FormBorderStyle.Fixed3D
'Me.MinimizeBox = True
'GroupBox1.Visible = False
'GroupBox2.Visible = False
'lblErr.Visible = False

Catch ex As Exception

End Try

End Sub

Basically, NEwForm becomes a member, and I add some code to clean up memory if it's called more than once. You may want to play with that part of it, but broadly, it should work like that, even without the 'if not newform...' line.

Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog

GeneralRe: Help On Forms and threads Pin
RG_SA20-Sep-06 0:33
RG_SA20-Sep-06 0:33 
GeneralRe: Help On Forms and threads Pin
Christian Graus20-Sep-06 0:41
protectorChristian Graus20-Sep-06 0:41 
GeneralRe: Help On Forms and threads Pin
RG_SA20-Sep-06 0:47
RG_SA20-Sep-06 0:47 
GeneralRe: Help On Forms and threads Pin
RG_SA20-Sep-06 0:35
RG_SA20-Sep-06 0:35 
AnswerRe: Help On Forms and threads Pin
RG_SA20-Sep-06 2:50
RG_SA20-Sep-06 2:50 
GeneralRe: Help On Forms and threads Pin
Dave Kreskowiak20-Sep-06 4:53
mveDave Kreskowiak20-Sep-06 4:53 
Questioncreate link on datagrid column Pin
mellvincent19-Sep-06 22:43
mellvincent19-Sep-06 22:43 
QuestionIndependent Application Instances Pin
hrodberaht19-Sep-06 22:11
hrodberaht19-Sep-06 22:11 
AnswerRe: Independent Application Instances Pin
Marco Turrini19-Sep-06 22:46
Marco Turrini19-Sep-06 22:46 
GeneralRe: Independent Application Instances Pin
hrodberaht19-Sep-06 22:53
hrodberaht19-Sep-06 22:53 
QuestionDLL Problem Pin
Sasmi19-Sep-06 21:46
Sasmi19-Sep-06 21:46 
AnswerRe: DLL Problem Pin
Christian Graus19-Sep-06 21:49
protectorChristian Graus19-Sep-06 21:49 
GeneralRe: DLL Problem Pin
Sasmi19-Sep-06 21:58
Sasmi19-Sep-06 21:58 
QuestionDLL Problem Pin
Sasmi19-Sep-06 21:10
Sasmi19-Sep-06 21:10 
AnswerRe: DLL Problem Pin
Christian Graus19-Sep-06 21:19
protectorChristian Graus19-Sep-06 21:19 
Questioncomma delimited text file Pin
minniemooo19-Sep-06 20:30
minniemooo19-Sep-06 20:30 
AnswerRe: comma delimited text file Pin
_AK_19-Sep-06 21:47
_AK_19-Sep-06 21:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.