| | |
Related to Forms Property
![]() |
•
•
Join Date: Mar 2009
Posts: 784
Reputation:
Solved Threads: 139
I think we are going to need a better explanation of what you want to do, because from reading your OP I can think of several things and some of them seem to be contrary to what you little sentance says...
So are you wanting to create a wizard like application in that the user goes from one form to the next filling out options?
Are you wanting several forms displayed at same time and when information changes on one it changes on the others?
Are you asking how to pass information from one form to another?
So are you wanting to create a wizard like application in that the user goes from one form to the next filling out options?
Are you wanting several forms displayed at same time and when information changes on one it changes on the others?
Are you asking how to pass information from one form to another?
If anyone has helped you solve your problem, please mark your thread as solved.
Thanks
Thanks
•
•
Join Date: Mar 2009
Posts: 784
Reputation:
Solved Threads: 139
•
•
•
•
HI
Thank's to reply
accualy i want that several forms displayed at same time and when information changes on one it changes on the others,but in my application when a form is desplaying on dektop,& i m clicking on other form so that's not opening.
Okay, when displaying several forms (and this is just a quick example) you can do something like this (however this reuses the same form so is not directly related to what you want to do with different forms but as for a visual example it works)...
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
Option Explicit Private Sub Command1_Click() Dim F As Form Set F = New Form1 F.Left = 0 F.Top = 0 F.Width = Screen.Width / 2 F.Height = Screen.Height / 2 F.Show Set F = New Form1 F.Left = Screen.Width / 2 F.Top = 0 F.Width = Screen.Width / 2 F.Height = Screen.Height / 2 F.Show Set F = New Form1 F.Left = 0 F.Top = Screen.Height / 2 F.Width = Screen.Width / 2 F.Height = Screen.Height / 2 F.Show Me.Left = Screen.Width / 2 Me.Top = Screen.Height / 2 Me.Width = Screen.Width / 2 Me.Height = Screen.Height / 2 End Sub
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
Option Explicit Private Sub Command1_Click() Dim F As Form Set F = New Form1 F.Show vbModal, Me End Sub
Soooo, what does this mean you ask???? Well, when showing your multiple forms you probably want to do something like this...
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
Private Sub Command1_Click() Form2.Show End Sub Private Sub Command2_Click() Form3.Show End Sub Private Sub Command3_Click() Form4.Show End Sub
Now, if you want to have a form that stays behind others you can do this...
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
Private Sub Command1_Click() Form2.Show vbModeless, Me End Sub Private Sub Command2_Click() Form3.Show vbModeless, Me End Sub Private Sub Command3_Click() Form4.Show vbModeless, Me End Sub
Okay, now for passing information from one form to another....
The most direct method is to pass information from whatever controls event in the form that has focus is to directly call any of the following in the other form...
Control like text box to utilize its change event
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
Private Sub Command1_Click() Form1.Text1.Text = Form2.Command1.Caption End Sub
Public Function MyForm1PublicFunction(MyStringToPass As String) As String
'do stuff
End Function
[/code]
and it would be called like so...
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
Private Sub Command1_Click() If MyForm1PublicFunction (Form2.Command1.Caption) = "OK" Then 'do stuff End If End Sub
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
'... Form1.Label1.Caption = "Some string" Form1.Text1.Caption = "Some string" '...
Good Luck
If anyone has helped you solve your problem, please mark your thread as solved.
Thanks
Thanks
![]() |
Similar Threads
- Forms Authorization/ Authentication using asp .net and vb .net (ASP.NET)
- Help with opening form and showing related record (VB.NET)
- Is my understanding of code generation in WinForm apps correct? (C#)
- Major help needed (MS Access and FileMaker Pro)
- Forms in Random access files (Visual Basic 4 / 5 / 6)
- Setting focus............. (VB.NET)
- It shouldn't be this hard (Visual Basic 4 / 5 / 6)
- TopMost property doesn't work (VB.NET)
- Links exchange with any realtor related site. (Ad Space for Sale)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: Import and export mixed data from and to csv file in VBA6
- Next Thread: AutoClicker
| Thread Tools | Search this Thread |
* 6 2007 access activex add age basic beginner birth bmp calculator cd cells.find click client code college connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit excel excelmacro file filename form header iamthwee image inboxinvb internetfiledownload listbox listview liveperson login looping microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading refresh remotesqlserverdatabase report save search sendbyte sites sql sql2008 sqlserver subroutine tags time urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows





