Click here to Skip to main content
15,921,467 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Event - After form is displayed for first time Pin
dptalt1-Sep-05 6:35
dptalt1-Sep-05 6:35 
GeneralRe: Event - After form is displayed for first time Pin
taenkarth1-Sep-05 6:52
taenkarth1-Sep-05 6:52 
GeneralRe: Event - After form is displayed for first time Pin
dptalt1-Sep-05 7:12
dptalt1-Sep-05 7:12 
GeneralRe: Event - After form is displayed for first time Pin
Dave Kreskowiak1-Sep-05 9:40
mveDave Kreskowiak1-Sep-05 9:40 
GeneralRe: Event - After form is displayed for first time Pin
Taen_Karth1-Sep-05 10:57
Taen_Karth1-Sep-05 10:57 
GeneralRe: Event - After form is displayed for first time Pin
Rizwan Bashir1-Sep-05 22:53
Rizwan Bashir1-Sep-05 22:53 
AnswerRe: Event - After form is displayed for first time Pin
alwinSCH2-Sep-05 3:04
alwinSCH2-Sep-05 3:04 
AnswerRe: Event - After form is displayed for first time Pin
Qhalis2-Sep-05 3:56
Qhalis2-Sep-05 3:56 
The Activated event is triggered after the load (and every time the form is activated)

One can use a flag (to indicate first activation) and the activated event to solve the problem.


class form
inherits Windows.System.Forms.Form

...

Private _firstActivation as boolean = true


Private Sub frmMain_Activated(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Activated

If (_firstActivation) Then

_firstActivation = False

Dim frm As New Login
Dim res as DialogResult = frm.ShowDialog(me)

' Login Succeeded / Failed functionality

End If

End Sub

...


end class



hth,
Q.
AnswerRe: Event - After form is displayed for first time Pin
quacks_a_lot3-Sep-05 18:16
quacks_a_lot3-Sep-05 18:16 
QuestionEmbedding objects using VB Pin
cmitty1-Sep-05 4:42
cmitty1-Sep-05 4:42 
AnswerRe: Embedding objects using VB Pin
taenkarth1-Sep-05 11:14
taenkarth1-Sep-05 11:14 
GeneralRe: Embedding objects using VB Pin
cmitty1-Sep-05 22:08
cmitty1-Sep-05 22:08 
GeneralRe: Embedding objects using VB Pin
Taen_Karth2-Sep-05 4:27
Taen_Karth2-Sep-05 4:27 
GeneralRe: Embedding objects using VB Pin
cmitty2-Sep-05 6:00
cmitty2-Sep-05 6:00 
GeneralRe: Embedding objects using VB Pin
Taen_Karth2-Sep-05 10:51
Taen_Karth2-Sep-05 10:51 
GeneralRe: Embedding objects using VB Pin
cmitty6-Sep-05 0:22
cmitty6-Sep-05 0:22 
Question'Type' to 'Structure' help Pin
DaveC4269131-Sep-05 3:58
DaveC4269131-Sep-05 3:58 
AnswerRe: 'Type' to 'Structure' help Pin
Dave Kreskowiak1-Sep-05 6:16
mveDave Kreskowiak1-Sep-05 6:16 
GeneralRe: 'Type' to 'Structure' help Pin
DaveC4269131-Sep-05 8:09
DaveC4269131-Sep-05 8:09 
GeneralRe: 'Type' to 'Structure' help Pin
Dave Kreskowiak1-Sep-05 14:45
mveDave Kreskowiak1-Sep-05 14:45 
GeneralRe: 'Type' to 'Structure' help Pin
DaveC4269132-Sep-05 2:56
DaveC4269132-Sep-05 2:56 
GeneralRe: 'Type' to 'Structure' help Pin
Dave Kreskowiak2-Sep-05 11:36
mveDave Kreskowiak2-Sep-05 11:36 
QuestionVB Macro Creation in MS Word Pin
cmitty1-Sep-05 3:29
cmitty1-Sep-05 3:29 
QuestionCrystal Reports Pin
dptalt1-Sep-05 3:09
dptalt1-Sep-05 3:09 
AnswerRe: Crystal Reports Pin
taenkarth1-Sep-05 11:06
taenkarth1-Sep-05 11:06 

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.