Click here to Skip to main content
15,924,196 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralError in deploying to Pocket PC Pin
Member 53081011-Jul-04 22:13
Member 53081011-Jul-04 22:13 
GeneralRe: Error in deploying to Pocket PC Pin
Dave Kreskowiak12-Jul-04 0:56
mveDave Kreskowiak12-Jul-04 0:56 
GeneralRe: Error in deploying to Pocket PC Pin
12-Jul-04 1:43
suss12-Jul-04 1:43 
GeneralHelp in Serialization and Remote events Pin
Member 106003411-Jul-04 21:51
Member 106003411-Jul-04 21:51 
GeneralRe: Help in Serialization and Remote events Pin
James Gohl14-Jul-04 8:53
James Gohl14-Jul-04 8:53 
QuestionHow to call a form using keyboard like F3 Pin
Seah6911-Jul-04 17:46
Seah6911-Jul-04 17:46 
AnswerRe: How to call a form using keyboard like F3 Pin
Syed Abdul Khader11-Jul-04 23:21
Syed Abdul Khader11-Jul-04 23:21 
AnswerRe: How to call a form using keyboard like F3 Pin
Syed Abdul Khader11-Jul-04 23:45
Syed Abdul Khader11-Jul-04 23:45 
The following will demonstrate passing a value from one form to another.
I have Form1 class with KeyPreview property set to True and class variable of type Form2 which has a TextBox and a Public Property to get or set the TextBox Text. The Form1 class has three EventHandler which will be helpful for getting the Form2 class TextBox Text.

Add the following to the Form1.

Private f As Form2

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
f = New Form2
AddHandler f.Closing, AddressOf SetTextBox
End Sub

Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown
If e.KeyCode = Keys.F3 Then
f.Show()
e.Handled = True
End If
End Sub

Private Sub SetTextBox(ByVal sender As Object, ByVal e As CancelEventArgs)
If f.TextBoxText.Trim.Length < 1 Then
MessageBox.Show("Type some text in TextBox")
Else
Me.TextBox1.Text = f.TextBoxText
f.TextBoxText = ""
f.Hide()
End If
e.Cancel = True
End Sub

Add the following to the Form2

Public Property TextBoxText() As String
Get
Return Me.TextBox1.Text
End Get
Set(ByVal Value As String)
Me.TextBox1.Text = Value
End Set
End Property

In the Form1 pressing F3 will open the Form2 and when Form2 is closed the TextBox text of Form2 will be set to Form1 TextBox.

I hope this will do.
GeneralWord.Application how to load to object without open Pin
vancouver77711-Jul-04 13:00
vancouver77711-Jul-04 13:00 
GeneralRe: Word.Application how to load to object without open Pin
Dave Kreskowiak11-Jul-04 16:53
mveDave Kreskowiak11-Jul-04 16:53 
GeneralRe: Word.Application how to load to object without open Pin
vancouver77712-Jul-04 0:59
vancouver77712-Jul-04 0:59 
GeneralRe: Word.Application how to load to object without open Pin
vancouver77712-Jul-04 7:59
vancouver77712-Jul-04 7:59 
Generaldisplay word file Pin
nazerudeen11-Jul-04 2:21
nazerudeen11-Jul-04 2:21 
GeneralRe: display word file Pin
Dave Kreskowiak11-Jul-04 17:06
mveDave Kreskowiak11-Jul-04 17:06 
GeneralProblem with ADO, ADO.NET and VB.NET Pin
Mekong River10-Jul-04 6:30
Mekong River10-Jul-04 6:30 
GeneralTransfer pop3 to Exchange Pin
sybux200010-Jul-04 5:11
sybux200010-Jul-04 5:11 
GeneralData Filling and Handelling in VB.NET using DataGrid Pin
Thangaraj P.V.10-Jul-04 3:48
Thangaraj P.V.10-Jul-04 3:48 
GeneralRe: Data Filling and Handelling in VB.NET using DataGrid Pin
Syed Abdul Khader11-Jul-04 23:06
Syed Abdul Khader11-Jul-04 23:06 
GeneralRe: Data Filling and Handelling in VB.NET using DataGrid Pin
Ravi S.V.12-Jul-04 0:01
Ravi S.V.12-Jul-04 0:01 
QuestionLock Monitor, Keyboad and Mouse - How??? Pin
tommy_tanaka9-Jul-04 23:00
tommy_tanaka9-Jul-04 23:00 
AnswerRe: Lock Monitor, Keyboad and Mouse - How??? Pin
Dave Kreskowiak10-Jul-04 14:31
mveDave Kreskowiak10-Jul-04 14:31 
GeneralRe: Lock Monitor, Keyboad and Mouse - How??? Pin
tommy_tanaka11-Jul-04 7:39
tommy_tanaka11-Jul-04 7:39 
GeneralRe: Lock Monitor, Keyboad and Mouse - How??? Pin
Dave Kreskowiak11-Jul-04 8:55
mveDave Kreskowiak11-Jul-04 8:55 
GeneralRe: Lock Monitor, Keyboad and Mouse - How??? Pin
tommy_tanaka12-Jul-04 2:15
tommy_tanaka12-Jul-04 2:15 
GeneralRe: Lock Monitor, Keyboad and Mouse - How??? Pin
Dave Kreskowiak12-Jul-04 5:30
mveDave Kreskowiak12-Jul-04 5:30 

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.