[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Continued combobox issue - integer entered into second form following combobox selection

Posted on 2013-01-29
3
Medium Priority
?
256 Views
Last Modified: 2013-01-30
Hi-  Through much help, I received the following code.  


------------------------------------------------------
Public Class Form1

    Private WithEvents ObjForm As Form

    Dim Form2 As New Form2
------------------------------------------
Private Sub TypeComboBox_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TypeComboBox.SelectedIndexChanged

        Dim Int As Integer

        If TypeComboBox.SelectedItem = "NonProv" Then
            Int = 360

            If ObjForm Is Nothing Then ObjForm = New Form2(Int)

        End If

    End Sub
------------------------------------

    Private Sub Alarm_btn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Alarm_btn.Click
        'the below connects the first form with the second form.  

        Form2.Show()

    End Sub
-----------------------------------
This did not present any problems, however now I am unable to access the second form from via the button click event.  I've tried many variations, but still no success.  Any advice?  Also, and more to the point, what am I not understanding?  

D.
0
Comment
Question by:RobertGeoff
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 18

Accepted Solution

by:
John (Yiannis) Toutountzoglou earned 1680 total points
ID: 38833818
Try
Dim Int As Integer
Private Sub TypeComboBox_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TypeComboBox.SelectedIndexChanged

        

        If TypeComboBox.SelectedItem = "NonProv" Then
            Int = 360
        

        End If

    End Sub
------------------------------------

    Private Sub Alarm_btn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Alarm_btn.Click
        'the below connects the first form with the second form.  

            If ObjForm Is Nothing Then ObjForm = New Form2(Int)
        ObjForm.ShowDialog

    End Sub
---------------------------------

Open in new window

0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 38834368
>however now I am unable to access the second form from via the button click event.

What you mean by that?
0
 

Author Closing Comment

by:RobertGeoff
ID: 38837558
jtoutou:
  Thanks for continuing to work with me.  Robert
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question