Click here to Skip to main content
16,004,919 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: visual brush.. Pin
progload19-Feb-06 6:04
progload19-Feb-06 6:04 
QuestionNeed help with the obsolete VarPtr routine from VB6 Pin
kil0byte^bandit18-Feb-06 18:21
kil0byte^bandit18-Feb-06 18:21 
QuestionCreating A Thread for The Main form of the Project!! Pin
Devraj Raut18-Feb-06 8:23
Devraj Raut18-Feb-06 8:23 
AnswerRe: Creating A Thread for The Main form of the Project!! Pin
Joshua Quick18-Feb-06 10:19
Joshua Quick18-Feb-06 10:19 
Questioncatching the passed filename Pin
Pruck18-Feb-06 6:57
Pruck18-Feb-06 6:57 
AnswerRe: catching the passed filename Pin
Joshua Quick18-Feb-06 10:03
Joshua Quick18-Feb-06 10:03 
QuestionRe: catching the passed filename Pin
Pruck18-Feb-06 11:10
Pruck18-Feb-06 11:10 
AnswerRe: catching the passed filename Pin
Joshua Quick18-Feb-06 11:38
Joshua Quick18-Feb-06 11:38 
The code I gave you assumes that your project's Startup object is set to "Sub Main". Your startup object is obviously set to your form. You can access the command line arguments in your form if you want via System.Environment.CommandLine, but this give you just 1 string and you would have to parse it out yourself.

I think switching to a Sub Main would be better. You would set this up by doing the following:
1) Go to the Solution Explorer panel.
2) Right click on your project file in the tree.
3) Select Properties on the context menu.
4) Select CommonProperties\General on the tree on the left.
5) Select "Sub Main" in the Startup Object ComboBox.
6) Click OK.
7) Add a Main function somewhere in your code. I like to put mine in a Main.vb class file. The main code should look something like this...
Public Class Main
   Public Shared Sub Main(ByVal args() As String)
      ' Get file name to open from the command line.
      Dim sFileName As String = String.Empty
      If (args.Length > 0) Then
         sFileName = args(0)
      End If
      ' Do something...

      ' Display your main form with XP theme.
      Application.EnableVisualStyles()
      Application.DoEvents()
      Application.Run(New YourMainForm)
   End Sub
End Class

GeneralRe: catching the passed filename Pin
Pruck18-Feb-06 15:05
Pruck18-Feb-06 15:05 
GeneralRe: catching the passed filename Pin
Joshua Quick18-Feb-06 15:26
Joshua Quick18-Feb-06 15:26 
GeneralRe: catching the passed filename Pin
Pruck18-Feb-06 15:55
Pruck18-Feb-06 15:55 
QuestionControl internet using vb.net and sql server Pin
Mekong River18-Feb-06 5:13
Mekong River18-Feb-06 5:13 
AnswerRe: Control internet using vb.net and sql server Pin
Dave Kreskowiak19-Feb-06 7:37
mveDave Kreskowiak19-Feb-06 7:37 
GeneralRe: Control internet using vb.net and sql server Pin
Mekong River19-Feb-06 12:13
Mekong River19-Feb-06 12:13 
GeneralRe: Control internet using vb.net and sql server Pin
Dave Kreskowiak19-Feb-06 14:59
mveDave Kreskowiak19-Feb-06 14:59 
Questionwhere to place commmon code Pin
_tasleem18-Feb-06 4:44
_tasleem18-Feb-06 4:44 
AnswerRe: where to place commmon code Pin
Mekong River18-Feb-06 5:18
Mekong River18-Feb-06 5:18 
GeneralRe: where to place commmon code Pin
Dave Kreskowiak19-Feb-06 7:25
mveDave Kreskowiak19-Feb-06 7:25 
AnswerRe: where to place commmon code Pin
Dave Kreskowiak19-Feb-06 7:30
mveDave Kreskowiak19-Feb-06 7:30 
QuestionHw to upgrade vb project to vb.net? pls help me Pin
subhulakshmi18-Feb-06 3:48
subhulakshmi18-Feb-06 3:48 
AnswerRe: Hw to upgrade vb project to vb.net? pls help me Pin
Mekong River18-Feb-06 15:13
Mekong River18-Feb-06 15:13 
Questionhow to pass complex structure to api in vb.net Pin
pravinkgarg18-Feb-06 2:38
pravinkgarg18-Feb-06 2:38 
AnswerRe: how to pass complex structure to api in vb.net Pin
progload18-Feb-06 6:47
progload18-Feb-06 6:47 
QuestionZooming mouse pointed area in a frame Pin
peter rankel18-Feb-06 1:25
peter rankel18-Feb-06 1:25 
AnswerRe: Zooming mouse pointed area in a frame Pin
Dave Kreskowiak19-Feb-06 7:22
mveDave Kreskowiak19-Feb-06 7:22 

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.