|
-
Apr 4th, 2007, 11:15 AM
#1
Thread Starter
Fanatic Member
New installation
I just wanna ask about this ... i think this is very noob question ... but is this the new VB.Net ? is this the whole setups ?
-
Apr 4th, 2007, 11:37 AM
#2
Junior Member
-
Apr 4th, 2007, 11:48 AM
#3
Thread Starter
Fanatic Member
Re: New installation
Thank you ... Looks nice, wonderful
By the way ... instead the VB.Net Library "F2" is there any site that include all functions of this VB.Net .... so i can start to learn on it ..... its better if there is a sample ^^ ...
Last edited by Loraine; Apr 4th, 2007 at 11:54 AM.
Reason: Wrong Grammar
-
Apr 4th, 2007, 12:49 PM
#4
Thread Starter
Fanatic Member
Re: New installation
Excuse me... i have 2 problems
1. When im going to initialize why it keep telling me that its "Unused Local variable"
Code:
Dim timeAfter as Single, timeBefore as Single, inputNum as Single
Dim timeFin as String
2. What is the correct syntax in VB.Net
Im Using VB 6.0
Code:
Msgbox "Are you sure?",vbyesno,"Confirmation"
If vbyes then
me.show
unload me
ElseIf vbno then
me.deactivate
End If
What is the correct syntax Using .Net
Code:
Msgbox "Are you saure?", MsgBoxStyle.YesNo, "Confirmation"
If MsgboxResult.Yes Then
Me.show()
Dialog.Close()
ElseIf MsgboxResult.No Then
Me.Close()
End If
Same with this
Code:
Msgbox "Are you saure?", MsgBoxStyle.YesNo, "Confirmation"
If Msgboxstyle.YesNo = MsgboxResult.Yes Then
Me.show()
Dialog.Close()
ElseIf Msgboxstyle.YesNo = MsgboxResult.No Then
Me.Close()
End If
-
Apr 4th, 2007, 12:56 PM
#5
Re: New installation
1. Initialise variables only when you have a meaningful value to give them. Otherwise, you run the risk of attempting to access them when they are uninitialised. The compiler warns you of this.
2.
Code:
If (MessageBox.Show(_
"Are you sure?", _
"Confirmation", _
MessageBoxButtons.YesNo, _
MessageBoxIcon.Exclamation _
) = DialogResult.Yes) Then
' code here
End If
-
Apr 5th, 2007, 01:09 AM
#6
Thread Starter
Fanatic Member
Re: New installation
Thank you for your rely ..... itry that code but theres an error ... so i made this but why theres only one dialogresult prompting which is "You regret it"
this is my code
Code:
MsgBox("Are you sure?", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation)
If Windows.Forms.DialogResult.Yes Then
MsgBox("You regret this")
ElseIf Windows.Forms.DialogResult.No Then
MsgBox("Good Choice")
End If
#3 Question .... ALso what is the correct syntax now about timer
coz when i use this code in VB 6.0 its ok ... it prompting how many secs. did click the button this is my code
Using VB 6.0
Code:
Dim timeAfter as Single, timeBefore as Single, num as Single
timeAfter = Timer
Msgbox "Do you want to know how many secs. did you clicked me?", VBExclamation
timeBefore = Timer
num = timeBefore - timeAfter
Msgbox "It took " & num & " sec."
but when use it in VB.Net it says "Timer is a type cannot use as an expression"
Code:
Dim timeAfter as Single, timeBefore as Single, num as Single
timeAfter = Timer
Msgbox "Do you want to know how many secs. did you clicked me?", VBExclamation
timeBefore = Timer
num = timeBefore - timeAfter
Msgbox "It took " & num & " sec."
Cheers
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|