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

Visual Basic

 
GeneralRe: Manipulating a hashtable Pin
Steven Campbell9-Aug-04 10:13
Steven Campbell9-Aug-04 10:13 
GeneralRe: Manipulating a hashtable Pin
normanordas10-Aug-04 21:13
normanordas10-Aug-04 21:13 
GeneralSave a MS Word shape as an image Pin
smritiy9-Aug-04 8:38
smritiy9-Aug-04 8:38 
GeneralRe: Save a MS Word shape as an image Pin
Member 53081010-Aug-04 4:58
Member 53081010-Aug-04 4:58 
Questiondoes everybody know how to deal with this question? Pin
Lisana9-Aug-04 8:28
Lisana9-Aug-04 8:28 
AnswerRe: does everybody know how to deal with this question? Pin
skytribe9-Aug-04 11:00
skytribe9-Aug-04 11:00 
GeneralRe: does everybody know how to deal with this question? Pin
Lisana9-Aug-04 14:45
Lisana9-Aug-04 14:45 
GeneralRe: does everybody know how to deal with this question? Pin
Anonymous9-Aug-04 17:00
Anonymous9-Aug-04 17:00 
Then how about this....

Public Class MainForm
Inherits System.Windows.Forms.Form

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim frm3 As New Form3
With frm3
.ID = TextBox1.Text
.Show()

End With
End Sub
End Class



and a sub form containing a single label control.



Public Class Form3
Inherits System.Windows.Forms.Form

Private Sub Form3_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim strTest As String

strTest = "Item Selected = " & mvarID

Label1.Text = strTest

End Sub
Private mvarID As String

Public Property ID() As String
Get
Return mvarID
End Get
Set(ByVal Value As String)
mvarID = Value
End Set
End Property


End Class




With this the contents of textbox (but it could be any items on the mainform are used to set properties on the sub form (frm3) which are then used in frm3.


In this case there is a single label called label1 on the sub form which is set from the contents of the textbox on mainform.

If you wanted to pass a integer then simply change the property to integer. If you wanted to pass a series of integer for say a SQL select statement then you could construct a where clause sting on the main and pass a single string or pass a collection or data structure of integer values to the sub form to be parsed into a sql string.




GeneralRe: does everybody know how to deal with this question? Pin
Lisana10-Aug-04 3:43
Lisana10-Aug-04 3:43 
Generaldate conversion and option strict on Pin
leezardd9-Aug-04 8:26
leezardd9-Aug-04 8:26 
GeneralRe: date conversion and option strict on Pin
Steven Campbell9-Aug-04 10:26
Steven Campbell9-Aug-04 10:26 
GeneralRe: date conversion and option strict on Pin
RDoes10-Aug-04 20:32
RDoes10-Aug-04 20:32 
QuestionHow can I integrate 2 project. Pin
jlizardo9-Aug-04 5:43
jlizardo9-Aug-04 5:43 
AnswerRe: How can I integrate 2 project. Pin
Dave Kreskowiak9-Aug-04 10:10
mveDave Kreskowiak9-Aug-04 10:10 
GeneralShow RichText in DataGrid Pin
RDoes9-Aug-04 5:08
RDoes9-Aug-04 5:08 
GeneralRe: Show RichText in DataGrid Pin
progload9-Aug-04 20:47
progload9-Aug-04 20:47 
GeneralRe: Show RichText in DataGrid Pin
RDoes10-Aug-04 9:21
RDoes10-Aug-04 9:21 
GeneralRe: Show RichText in DataGrid Pin
progload10-Aug-04 11:08
progload10-Aug-04 11:08 
GeneralRe: Show RichText in DataGrid Pin
RDoes10-Aug-04 20:27
RDoes10-Aug-04 20:27 
GeneralRe: Show RichText in DataGrid Pin
progload11-Aug-04 5:59
progload11-Aug-04 5:59 
GeneralRe: Show RichText in DataGrid Pin
RDoes11-Aug-04 21:02
RDoes11-Aug-04 21:02 
GeneralRe: Show RichText in DataGrid fixed Pin
progload12-Aug-04 9:33
progload12-Aug-04 9:33 
GeneralRe: Show RichText in DataGrid fixed Pin
RDoes16-Aug-04 2:57
RDoes16-Aug-04 2:57 
GeneralRe: Show RichText in DataGrid fixed Pin
progload16-Aug-04 6:26
progload16-Aug-04 6:26 
GeneralVBA, Excel creating new workbook/sheets Pin
Lord darkblade9-Aug-04 4:24
Lord darkblade9-Aug-04 4:24 

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.