Click here to Skip to main content
15,923,557 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: How does Unload works exactly? Pin
jlopezpenalba5-Jul-04 21:11
jlopezpenalba5-Jul-04 21:11 
AnswerRe: How does Unload works exactly? Pin
Dave Kreskowiak6-Jul-04 3:24
mveDave Kreskowiak6-Jul-04 3:24 
GeneralSocket Listener To A USB Bluetooth Connected To PC Pin
hani_aql5-Jul-04 3:33
hani_aql5-Jul-04 3:33 
GeneralINSERT Fails Pin
Anonymous5-Jul-04 1:52
Anonymous5-Jul-04 1:52 
GeneralRe: INSERT Fails Pin
Hesham Amin5-Jul-04 4:56
Hesham Amin5-Jul-04 4:56 
GeneralRe: INSERT Fails Pin
Dave Kreskowiak6-Jul-04 3:37
mveDave Kreskowiak6-Jul-04 3:37 
Generalvb.net and forms Pin
mrdance4-Jul-04 21:20
mrdance4-Jul-04 21:20 
GeneralRe: vb.net and forms Pin
Dave Kreskowiak6-Jul-04 3:49
mveDave Kreskowiak6-Jul-04 3:49 
Well, the code you posted won't even compile. Try copying and pasting next time. The code frmMain = me doesn't do anything constructive at all. I don't know what you trying to do here.

First, when your Sub Main reaches the end, your app is going to quit. You have to give the form control to keep it's message pump running so your app won't quit. I assume you doing something in the Sub Main before displaying the form. This should take care of your problem.
Module Module1
    Public Sub Main()
        Dim myForm As New Form1
        Fill(myForm)
        Application.Run(myForm)
        myForm.Dispose()
    End Sub

    Private Sub Fill(ByRef form As Form)
        form.Text = "My Caption Text..."
    End Sub
End Module

But, if this is all you wanted to do, then you would create a normal Windows Forms application and put this in the Form Load Event:
Me.Text ="My Caption Text..."

or change the appropriate properties in the Property Page in the Forms Designer.


RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

GeneralRe: vb.net and forms Pin
mrdance12-Jul-04 4:55
mrdance12-Jul-04 4:55 
GeneralRe: vb.net and forms Pin
Dave Kreskowiak12-Jul-04 12:36
mveDave Kreskowiak12-Jul-04 12:36 
GeneralDataRelation Pin
Guerven4-Jul-04 17:50
Guerven4-Jul-04 17:50 
GeneralProgram help please Pin
Anonymous4-Jul-04 8:01
Anonymous4-Jul-04 8:01 
GeneralRe: Program help please Pin
Dave Kreskowiak6-Jul-04 3:55
mveDave Kreskowiak6-Jul-04 3:55 
Generalvb6 (data grid) Pin
nazerudeen3-Jul-04 7:51
nazerudeen3-Jul-04 7:51 
GeneralRe: vb6 (data grid) Pin
Hesham Amin4-Jul-04 0:50
Hesham Amin4-Jul-04 0:50 
GeneralRe: vb6 (data grid) Pin
Ravi S.V.7-Jul-04 19:58
Ravi S.V.7-Jul-04 19:58 
GeneralErrors Occured Pin
Ravi S.V.2-Jul-04 18:31
Ravi S.V.2-Jul-04 18:31 
GeneralRe: Errors Occured Pin
beowulfagate3-Jul-04 0:41
beowulfagate3-Jul-04 0:41 
GeneralDataGrid - Please Help Pin
viettho2-Jul-04 18:11
viettho2-Jul-04 18:11 
GeneralRe: DataGrid - Please Help Pin
Ravi S.V.2-Jul-04 19:24
Ravi S.V.2-Jul-04 19:24 
Generalchart program Pin
sirChris2-Jul-04 15:53
sirChris2-Jul-04 15:53 
GeneralRe: chart program Pin
Dave Kreskowiak6-Jul-04 4:05
mveDave Kreskowiak6-Jul-04 4:05 
Generalvideo confrence Pin
sirChris2-Jul-04 14:41
sirChris2-Jul-04 14:41 
GeneralRe: video confrence Pin
Colin Angus Mackay2-Jul-04 15:24
Colin Angus Mackay2-Jul-04 15:24 
GeneralRe: video confrence Pin
sirChris2-Jul-04 16:00
sirChris2-Jul-04 16:00 

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.