Upgrading from VB6 to VB.Net


G

Guest

Hi EveryBody:

I have some question about upgrading from Vb6 to Vb.Net

All of us we know the RadioButton in the ToolBox and it is equal to Option
buttons in Vb6.

My question is what is equal to Option1.value =true in Vb.Net ? there is no
RadioButton1.value in Vb.net ?

Also How can I upgrade the following code from Vb6 to VB.net:

Dim hFile As Long

hFile = FreeFile()
Open sTmpFile For Output As #hFile

EmailCreate = hFile

Also How can I upgrade the following code from Vb6 to VB.Net:


If Len(email.sAddrTo) Then
Print #hFile, "To: "; Chr$(34); email.sAddrTo; Chr$(34)
Else

any help will be completlly appreciated

regard's
 
Ad

Advertisements

C

Chris

Husam said:
Hi EveryBody:

I have some question about upgrading from Vb6 to Vb.Net

All of us we know the RadioButton in the ToolBox and it is equal to Option
buttons in Vb6.

My question is what is equal to Option1.value =true in Vb.Net ? there is no
RadioButton1.value in Vb.net ?

Also How can I upgrade the following code from Vb6 to VB.net:

Dim hFile As Long

hFile = FreeFile()
Open sTmpFile For Output As #hFile

EmailCreate = hFile

Also How can I upgrade the following code from Vb6 to VB.Net:


If Len(email.sAddrTo) Then
Print #hFile, "To: "; Chr$(34); email.sAddrTo; Chr$(34)
Else

any help will be completlly appreciated

regard's


Doing this all from my head so it may not be perfect, but it will get
you very close:

'hFile = FreeFile()
'Open sTmpFile For Output As #hFile
'EmailCreate = hFile

Dim oStreamWriter as New StreamWriter(sTmpFile)
'EmailCreate = hFile <- Not sure what you need this for



'If Len(email.sAddrTo) Then
' Print #hFile, "To: "; Chr$(34); email.sAddrTo; Chr$(34)
'Else
if email.sAddrTo.length > 0 then
dim sOutput as String
sOutput = "To: " & Chr(34) & email.sAddrTo & Chr(34)
oStreamWriter.WriteLine(sOutput)
else



As far as your .value issue, I believe you need to use
RadioButton1.Checked. This site talks about it.

http://www.startvbdotnet.com/controls/radio.aspx

Chris
 
Ad

Advertisements

H

Herfried K. Wagner [MVP]

Husam said:
All of us we know the RadioButton in the ToolBox and it is equal to Option
buttons in Vb6.

My question is what is equal to Option1.value =true in Vb.Net ? there is
no
RadioButton1.value in Vb.net ?

Check out the control's 'Checked' and 'CheckState' properties.
Also How can I upgrade the following code from Vb6 to VB.net:

Dim hFile As Long

hFile = FreeFile()
Open sTmpFile For Output As #hFile

EmailCreate = hFile

You can use the functions in 'Microsoft.VisualBasic.FileSystem' instead
('FileOpen', etc.).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top