Click here to Skip to main content
15,920,632 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionExcel 2013 VBA - Secure Website Login Pin
Member 110154484-Jun-15 8:07
Member 110154484-Jun-15 8:07 
AnswerRe: Excel 2013 VBA - Secure Website Login Pin
Member 110154488-Jun-15 7:52
Member 110154488-Jun-15 7:52 
QuestionRe: Excel 2013 VBA - Secure Website Login Pin
Member 110154489-Jun-15 12:09
Member 110154489-Jun-15 12:09 
QuestionHTML Textbox Pin
Member 117418844-Jun-15 7:46
Member 117418844-Jun-15 7:46 
SuggestionRe: HTML Textbox Pin
Richard Deeming5-Jun-15 1:20
mveRichard Deeming5-Jun-15 1:20 
Questionvb.net 2010 startup form for desktop application Pin
dcof4-Jun-15 5:47
dcof4-Jun-15 5:47 
AnswerRe: vb.net 2010 startup form for desktop application Pin
Eddy Vluggen4-Jun-15 10:07
professionalEddy Vluggen4-Jun-15 10:07 
AnswerRe: vb.net 2010 startup form for desktop application Pin
Sascha Lefèvre4-Jun-15 10:32
professionalSascha Lefèvre4-Jun-15 10:32 
dcof wrote:
  • Which option you chose and why
  • I would subscribe to the Shown-event of the "main window" and show the setup form modally there (by using .ShowDialog() instead of just .Show()) which will prevent input to the "main window" while it's being shown. Why: Because it's the easiest way:
    VB
    Public Class Form1 ' "main form"
       Public Sub New()
          InitializeComponent()
          AddHandler Me.Shown, AddressOf Form1_Shown
       End Sub
    
       Private Sub Form1_Shown(sender As Object, e As EventArgs)
          Application.DoEvents()   ' see note below
    
          Dim form2 As New Form2() ' "setup form 1"
          form2.ShowDialog()       ' show modally
    
          Dim form3 As New Form3() ' "setup form 2" (see edit below)
          form3.ShowDialog()       ' show modally   (see edit below)
       End Sub
    End Class

    Explanation for Application.DoEvents() in this article:
    Immediate display of WinForms using the Shown() event[^]

    edit: Just realized I misinterpreted your question slightly. Regarding the actual question, whether to show 1 or 2 "setup forms": I would go for two sequential setup forms. It's more intuitive to the user.
    If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson


    modified 4-Jun-15 17:04pm.

    GeneralRe: vb.net 2010 startup form for desktop application Pin
    dcof4-Jun-15 11:29
    dcof4-Jun-15 11:29 
    GeneralRe: vb.net 2010 startup form for desktop application Pin
    Sascha Lefèvre4-Jun-15 11:52
    professionalSascha Lefèvre4-Jun-15 11:52 
    QuestionVB.net 2010 desktop app select file from drop down list box Pin
    dcof4-Jun-15 5:11
    dcof4-Jun-15 5:11 
    AnswerRe: VB.net 2010 desktop app select file from drop down list box Pin
    Eddy Vluggen4-Jun-15 10:10
    professionalEddy Vluggen4-Jun-15 10:10 
    GeneralRe: VB.net 2010 desktop app select file from drop down list box Pin
    dcof4-Jun-15 11:32
    dcof4-Jun-15 11:32 
    GeneralRe: VB.net 2010 desktop app select file from drop down list box Pin
    Eddy Vluggen4-Jun-15 22:20
    professionalEddy Vluggen4-Jun-15 22:20 
    QuestionOpen a form when the name is known only on runtime Pin
    satc3-Jun-15 9:35
    satc3-Jun-15 9:35 
    AnswerRe: Open a form when the name is known only on runtime Pin
    Sascha Lefèvre3-Jun-15 10:26
    professionalSascha Lefèvre3-Jun-15 10:26 
    GeneralRe: Open a form when the name is known only on runtime Pin
    satc3-Jun-15 16:29
    satc3-Jun-15 16:29 
    GeneralRe: Open a form when the name is known only on runtime Pin
    Sascha Lefèvre3-Jun-15 22:00
    professionalSascha Lefèvre3-Jun-15 22:00 
    GeneralRe: Open a form when the name is known only on runtime Pin
    satc4-Jun-15 9:57
    satc4-Jun-15 9:57 
    GeneralRe: Open a form when the name is known only on runtime Pin
    Sascha Lefèvre4-Jun-15 10:41
    professionalSascha Lefèvre4-Jun-15 10:41 
    GeneralRe: Open a form when the name is known only on runtime Pin
    satc4-Jun-15 18:26
    satc4-Jun-15 18:26 
    GeneralRe: Open a form when the name is known only on runtime Pin
    Sascha Lefèvre4-Jun-15 18:42
    professionalSascha Lefèvre4-Jun-15 18:42 
    GeneralRe: Open a form when the name is known only on runtime Pin
    satc4-Jun-15 19:44
    satc4-Jun-15 19:44 
    GeneralRe: Open a form when the name is known only on runtime Pin
    Sascha Lefèvre4-Jun-15 19:56
    professionalSascha Lefèvre4-Jun-15 19:56 
    GeneralRe: Open a form when the name is known only on runtime Pin
    satc4-Jun-15 20:10
    satc4-Jun-15 20:10 

    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.