Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7716003
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T02:31:42+00:00 2026-06-01T02:31:42+00:00

Windows Forms, VB. I have searched the web for the correct answer to this

  • 0

Windows Forms, VB. I have searched the web for the correct answer to this and no dice. Either they are missing on what I am trying to accomplish or are in CSHARP making it harder for me to see what they are doing. I have a need to pass a record Id from the main windows form into a modal Dialog Load Event.. I have tried throwing a with param in but then I have to change the Load event params and vb flags it.. I am trying to pass the value of _CurrentProp which is an integer into the dialog. This is the dialog constructor and the load event inside that dialog..

Private Sub PropertySettingsMenuClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PropertyDetailsToolStripMenuItem.Click
Dim _propertSettings As New PropertySettingsWindow()
_propertSettings.ShowDialog()
End Sub


Private Sub PropertySettings_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim _properties As New List(Of property_info)
_properties = db.property_info.ToList
    For Each a In _properties
        If Not p_settingsCityList.Items.Contains(a.city) Then
            p_settingsCityList.Items.Add(a.city)
        End If
    Next

    For Each b In _properties
        If Not p_settingsPropertyList.Items.Contains(b.property_Name) Then
            p_settingsPropertyList.Items.Add(Convert.ToString(b.idProperties) + " -- " + b.property_Name)
        End If
    Next
    p_settingsZipCode.ReadOnly = True
    p_settings_Address.ReadOnly = True
    p_settings_PropertyName.ReadOnly = True

End Sub

I am going to simply assign the value to a global variable inside the PropertySettings Class but everything I try seems to fail in one way or another… Any ideas…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T02:31:43+00:00Added an answer on June 1, 2026 at 2:31 am

    Add a public property RecordID to your dialog window, then open the dialog like this

    Dim _propertSettings As New PropertySettingsWindow()
    _propertSettings.RecordID = 15
    _propertSettings.ShowDialog()
    

    In the dialog form you can simply access the record id with

    _properties = db.property_info_by_id(RecordID).ToList   
    

    Starting with .NET Framework 4.0, you can use auto-implemented properties

    Public Property RecordID As Integer
    

    With previous versions you would have to write

    Private _recordID As Integer
    Property RecordID As Integer
        Get
            Return _recordID
        End Get
        Set(ByVal value As Integer)
            _recordID = value
        End Set
    End Property
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have searched the world wide web without a proper answer. In my Windows
I have a Windows forms project and a Web Service project in my solution,
I am trying to learn Windows.Forms, and while I have Visual Studio (edit, my
The Application class in System.Windows.Forms have a some properties that can be quite useful.
In .NET, Windows Forms have an event that fires before the Form is loaded
vb.net windows forms question. I've got 3 forms that have exactly the same functions,
I have windows forms application wich runs another console application here is the part
In my windows forms applications I have a class that extends a backgroundworker, let's
Scenario I have a Windows Forms Application. Inside the main form there is a
Scenario I have a windows forms application. I want to use two different WCF

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.