View Single Post
Old 21-04-2007, 06:23 PM   #2
jg007
Super Freak
 
jg007's Avatar

 
Join Date: Feb 2007
Location: Peterlee, England
Posts: 169
Default

<div class='quotetop'>QUOTE(JJXB @ Apr 20 2007, 04:39 AM) [snapback]287605[/snapback]</div>
Quote:
I'm Learning how to code in Visual Basic (with VB Express 2005) and i'm trying to code A ZDoom Frontend but i'm stumbling upon problems with getting the filename for the PWAD's that people might want to use in the command line. here's the little bit of code that's the problem:
Code:
********Dim WAD As System.Type
********If OpenFileDialog1.ShowDialog() = Windows.Forms.DialogResult.OK Then
************TextBox3 = WAD(OpenFileDialog1.OpenFile())
********End If
it comes up with the error:
"Class 'System.Type' cannot be indexed because it has no default property."
now i'm not sure why this is happening but please keep in mind that i've only just started learning how to code and i'm managing to get my head around the logic behind most of what i have seen so far but i can't figure some things out.
[/b]
I'm afraid don't know all that much about VB as I tend to learn it as and when I require it and tend to use it more in excel than anything else also I have just reformatted so have wiped VB and will have to reload it at some point but I was wondering why you were defining WAD as that particular type -

Dim WAD As System.Type

as stated my VB is a 'bit' lousy at times but will a string variable type not do for that value? , i'm not really sure what you are trying to define this as so appologies if this is totally incorrect!!!!




jg007 is offline                         Send a private message to jg007
Reply With Quote