New Posts  All Forums:Forum Nav:

I challenge thee with VB - Page 2

post #11 of 30
The "for shame" part is using VB, not requesting homework help.
post #12 of 30
Thread Starter 
Quote:
Originally Posted by floatingDivs View Post
The "for shame" part is using VB, not requesting homework help.
kinda hard to call it a shame class when its a VB class
OverKill
(18 items)
 
  
CPUMotherboardGraphicsGraphics
AMD Phenom II X6 1055T Gigabyte 890FXA ATI FirePro V3800 ATI FirePro V3800 
RAMHard DriveHard DriveOptical Drive
16gb GSkill 10666 Seagate Western Digital  LG Blue Ray 
CoolingOSMonitorMonitor
stock air 7 Pro 64 bit (2)22" Acer x223w (2)23" Acer G235H 
KeyboardPowerCaseMouse
Microsoft Wireless Antec 900watt Antec 300 Wacom Tablet 
Audio
Logitech Speakers and sub 
  hide details  
Reply
OverKill
(18 items)
 
  
CPUMotherboardGraphicsGraphics
AMD Phenom II X6 1055T Gigabyte 890FXA ATI FirePro V3800 ATI FirePro V3800 
RAMHard DriveHard DriveOptical Drive
16gb GSkill 10666 Seagate Western Digital  LG Blue Ray 
CoolingOSMonitorMonitor
stock air 7 Pro 64 bit (2)22" Acer x223w (2)23" Acer G235H 
KeyboardPowerCaseMouse
Microsoft Wireless Antec 900watt Antec 300 Wacom Tablet 
Audio
Logitech Speakers and sub 
  hide details  
Reply
post #13 of 30
Thread Starter 
Write syntax so a label will display “Hello everyone”
Code:
 
lblLabel.Text = “Hello Everyone”
Write syntax to read content of a TextBox which contains “Hello World” to a label then clear TextBox
Code:
 
txtText.Text = “Hello World”

lblLabel.Text = txtText.Text

txtText.Clear()
Write syntax to add Chevrolet, Ford, Toyota, Honda to in a ListBox
Code:
 
Car.Items.Add(“Chevrolet”)

Car.Items.Add(“Ford”)

Car.Items.Add(“Toyota”)

Car.Items.Add(“Honda”)
Write syntax to declare a String and Integer variables
Code:
 
Dim intInteger As Integer
Dim strString As String
Write syntax to initialize String and Integer variables
Code:
 
Dim intInteger As Integer = 12
Dim strString As String = “OCN”
Write syntax to convert data in txtCost to Single data type
Code:
 
Dim sngSingle As Single = CSng(txtCost)
Write syntax to display “Hello World” in a MessageBox
Code:
 
MessageBox.Show(“Hello World”)
Write syntax to validate color equals “Red” using If…Then…Else statement
Code:
 
If (strColor = “Red”) Then

      Statement
Else

      Statement

End If
Write syntax to validate vehicle make Chevrolet, Ford, Toyota, Honda using Select Case statement
Code:
 
Select Case Car

        Case is “Chevrolet”

              Statement

        Case is “Ford”

              Statement

        Case is “Toyota”

              Statement

        Case is “Honda”

              Statement

         Case Else

              Statement

End Select

I believe this is right, still waiting for it to be graded.
Edited by graphicsman - 4/14/11 at 7:38am
OverKill
(18 items)
 
  
CPUMotherboardGraphicsGraphics
AMD Phenom II X6 1055T Gigabyte 890FXA ATI FirePro V3800 ATI FirePro V3800 
RAMHard DriveHard DriveOptical Drive
16gb GSkill 10666 Seagate Western Digital  LG Blue Ray 
CoolingOSMonitorMonitor
stock air 7 Pro 64 bit (2)22" Acer x223w (2)23" Acer G235H 
KeyboardPowerCaseMouse
Microsoft Wireless Antec 900watt Antec 300 Wacom Tablet 
Audio
Logitech Speakers and sub 
  hide details  
Reply
OverKill
(18 items)
 
  
CPUMotherboardGraphicsGraphics
AMD Phenom II X6 1055T Gigabyte 890FXA ATI FirePro V3800 ATI FirePro V3800 
RAMHard DriveHard DriveOptical Drive
16gb GSkill 10666 Seagate Western Digital  LG Blue Ray 
CoolingOSMonitorMonitor
stock air 7 Pro 64 bit (2)22" Acer x223w (2)23" Acer G235H 
KeyboardPowerCaseMouse
Microsoft Wireless Antec 900watt Antec 300 Wacom Tablet 
Audio
Logitech Speakers and sub 
  hide details  
Reply
post #14 of 30
Quote:
Originally Posted by graphicsman View Post
Write syntax to declare a String and Integer variables
Code:
 
Dim strString As String
Dim strString As String = “OCNâ€
Write syntax to initialize String and Integer variables
Code:
 
Dim intInteger As Integer
Dim intInteger As Integer = 12

I believe this is right, still waiting for it to be graded.
You got that mixed up a little bit.
Intellect v2
(9 items)
 
  
CPUMotherboardGraphicsRAM
Intel Core i7-6700K Processor ASUS ROG MAXIMUS VIII HERO LGA1151 DDR4 M.2 SAT... EVGA GTX 1080 SC ACX 3.0 Crucial Ballistix Sport 32GB DDR4 2400 MT/s (PC... 
CoolingKeyboardPowerCase
Noctua NH-D15 Das Keyboard 4 Professional (Brown) Corsair AX860 Fractal Design Define R5 
Mouse
MIONIX NAOS 7000 
  hide details  
Reply
Intellect v2
(9 items)
 
  
CPUMotherboardGraphicsRAM
Intel Core i7-6700K Processor ASUS ROG MAXIMUS VIII HERO LGA1151 DDR4 M.2 SAT... EVGA GTX 1080 SC ACX 3.0 Crucial Ballistix Sport 32GB DDR4 2400 MT/s (PC... 
CoolingKeyboardPowerCase
Noctua NH-D15 Das Keyboard 4 Professional (Brown) Corsair AX860 Fractal Design Define R5 
Mouse
MIONIX NAOS 7000 
  hide details  
Reply
post #15 of 30
Thread Starter 
Quote:
Originally Posted by Plex View Post
You got that mixed up a little bit.
thanks, i saw that right after i posted it and changed it
OverKill
(18 items)
 
  
CPUMotherboardGraphicsGraphics
AMD Phenom II X6 1055T Gigabyte 890FXA ATI FirePro V3800 ATI FirePro V3800 
RAMHard DriveHard DriveOptical Drive
16gb GSkill 10666 Seagate Western Digital  LG Blue Ray 
CoolingOSMonitorMonitor
stock air 7 Pro 64 bit (2)22" Acer x223w (2)23" Acer G235H 
KeyboardPowerCaseMouse
Microsoft Wireless Antec 900watt Antec 300 Wacom Tablet 
Audio
Logitech Speakers and sub 
  hide details  
Reply
OverKill
(18 items)
 
  
CPUMotherboardGraphicsGraphics
AMD Phenom II X6 1055T Gigabyte 890FXA ATI FirePro V3800 ATI FirePro V3800 
RAMHard DriveHard DriveOptical Drive
16gb GSkill 10666 Seagate Western Digital  LG Blue Ray 
CoolingOSMonitorMonitor
stock air 7 Pro 64 bit (2)22" Acer x223w (2)23" Acer G235H 
KeyboardPowerCaseMouse
Microsoft Wireless Antec 900watt Antec 300 Wacom Tablet 
Audio
Logitech Speakers and sub 
  hide details  
Reply
post #16 of 30
VB, that was the day in highschool.. till I found Java then 2 years later converted to C ->C+
Them days...
5820k
(11 items)
 
  
CPUMotherboardGraphicsRAM
Intel 5820k ASUS x99 Sabertooth Zotac 980Ti AMP! 2 x G.SKILL Ripjaws 4 series 16GB DDR4 2400 
Hard DriveCoolingOSOS
Samsun SM951 Corsair H100i CentOS Windows 10 Pro KVM 
CaseMouseAudio
CM Storm Stryker Corsair SABRE Sound Blaster Z 
  hide details  
Reply
5820k
(11 items)
 
  
CPUMotherboardGraphicsRAM
Intel 5820k ASUS x99 Sabertooth Zotac 980Ti AMP! 2 x G.SKILL Ripjaws 4 series 16GB DDR4 2400 
Hard DriveCoolingOSOS
Samsun SM951 Corsair H100i CentOS Windows 10 Pro KVM 
CaseMouseAudio
CM Storm Stryker Corsair SABRE Sound Blaster Z 
  hide details  
Reply
post #17 of 30
Quote:
Originally Posted by graphicsman View Post
Write syntax so a label will display “Hello everyone”
Code:
 
lblLabel.Text = “Hello Everyone”
This one is wrong, labels use captions, not text.

lblLabel.Caption = "Hello Everyone"

Quote:
Originally Posted by graphicsman View Post
Write syntax to read content of a TextBox which contains “Hello World” to a label then clear TextBox
Code:
 
txtText.Text = “Hello World”

lblLabel.Text = txtText.Text

txtText.Clear()
Same as the last one, and the clear command at the bottom is wrong.

txtText.Text = "Hello World"
lblLabel.Caption = txtText.Text
txtText.Text = ""

Quote:
Originally Posted by graphicsman View Post
Write syntax to add Chevrolet, Ford, Toyota, Honda to in a ListBox
Code:
 
Car.Items.Add(“Chevrolet”)

Car.Items.Add(“Ford”)

Car.Items.Add(“Toyota”)

Car.Items.Add(“Honda”)
This is the wrong code for adding to a list. Correct;

CarList.AddItem("Chevrolet")

Quote:
Originally Posted by graphicsman View Post
Write syntax to declare a String and Integer variables
Code:
 
Dim strString As String
Dim strString As String = “OCN”
You can't declare what a variable is in the general declarations, and that isn't what the question is asking. It's telling you to declare a string and an integer;

Dim strString as String
Dim intInteger as Integer

Quote:
Originally Posted by graphicsman View Post
Write syntax to initialize String and Integer variables
Code:
 
Dim intInteger As Integer = 12
Dim intInteger As Integer
This question seems a little ambiguous, I'm not sure what it means by "initialise", if it means use them, then;

intInteger = 12
strString = "Hello World"

Quote:
Originally Posted by graphicsman View Post
Write syntax to convert data in txtCost to Single data type
Code:
 
Dim sngSingle As Single = CSng(txtCost)
Once again, you can't decide what a variable is in the general declarations. But this one is also ambiguous, I don't know whether it wants a new variable or the same one.

EDIT - Forgive me, I missed the question a little bit. Fixed;

txtCost.Text = CSng(txtCost)

Quote:
Originally Posted by graphicsman View Post
Write syntax to display “Hello World” in a MessageBox
Code:
 
MessageBox.Show(“Hello World”)
MsgBox("Hello World")
Edited by GoTMaXPoWeR - 4/14/11 at 7:53am
Lightning
(20 items)
 
  
CPUMotherboardGraphicsRAM
i5 2500K Gigabyte Z68XP-UD3P XFX HD6950 DD 2GB 8GB Corsair Vengeance 1600MHz 
Hard DriveHard DriveHard DriveOptical Drive
Crucial C300 64GB Samsung F2 1.5TB Seagate 500GB LG GH20NS15 
Optical DriveOSMonitorMonitor
Optiarc AD-7261S Win7 64bit 22" LG L226WTQ 19" AOC 
KeyboardPowerCaseMouse
Steelseries 6Gv2  Silverstone ST75F 750W Modular Fractal Design Arc Logitech G500 
Mouse PadAudioAudioAudio
Steelseries QCK Diablo 3 Beyerdynamic DT770 80ohm Fiio E9 Headphone Amp X-Fi XtremeGamer 
  hide details  
Reply
Lightning
(20 items)
 
  
CPUMotherboardGraphicsRAM
i5 2500K Gigabyte Z68XP-UD3P XFX HD6950 DD 2GB 8GB Corsair Vengeance 1600MHz 
Hard DriveHard DriveHard DriveOptical Drive
Crucial C300 64GB Samsung F2 1.5TB Seagate 500GB LG GH20NS15 
Optical DriveOSMonitorMonitor
Optiarc AD-7261S Win7 64bit 22" LG L226WTQ 19" AOC 
KeyboardPowerCaseMouse
Steelseries 6Gv2  Silverstone ST75F 750W Modular Fractal Design Arc Logitech G500 
Mouse PadAudioAudioAudio
Steelseries QCK Diablo 3 Beyerdynamic DT770 80ohm Fiio E9 Headphone Amp X-Fi XtremeGamer 
  hide details  
Reply
post #18 of 30
Quote:
Originally Posted by GoTMaXPoWeR View Post
Once again, you can't decide what a variable is in the general declarations. But this one is also ambiguous, I don't know whether it wants a new variable or the same one.
Like nearly every programming language in existence, you certainly can initialize a variable with data in the declaration statement.
Intellect v2
(9 items)
 
  
CPUMotherboardGraphicsRAM
Intel Core i7-6700K Processor ASUS ROG MAXIMUS VIII HERO LGA1151 DDR4 M.2 SAT... EVGA GTX 1080 SC ACX 3.0 Crucial Ballistix Sport 32GB DDR4 2400 MT/s (PC... 
CoolingKeyboardPowerCase
Noctua NH-D15 Das Keyboard 4 Professional (Brown) Corsair AX860 Fractal Design Define R5 
Mouse
MIONIX NAOS 7000 
  hide details  
Reply
Intellect v2
(9 items)
 
  
CPUMotherboardGraphicsRAM
Intel Core i7-6700K Processor ASUS ROG MAXIMUS VIII HERO LGA1151 DDR4 M.2 SAT... EVGA GTX 1080 SC ACX 3.0 Crucial Ballistix Sport 32GB DDR4 2400 MT/s (PC... 
CoolingKeyboardPowerCase
Noctua NH-D15 Das Keyboard 4 Professional (Brown) Corsair AX860 Fractal Design Define R5 
Mouse
MIONIX NAOS 7000 
  hide details  
Reply
post #19 of 30
Quote:
Originally Posted by Plex View Post
Like nearly every programming language in existence, you certainly can initialize a variable with data in the declaration statement.
I'm not arguing that, I'm saying that he can't declare what a variable is in the line which that variable is declared, i.e.

Dim intInteger as Integer = 12

=/=

intInteger = 12

I hope I don't make myself out to be some sort of ass, I'm just helping. I don't consider myself a programmer with this basic stuff.
Lightning
(20 items)
 
  
CPUMotherboardGraphicsRAM
i5 2500K Gigabyte Z68XP-UD3P XFX HD6950 DD 2GB 8GB Corsair Vengeance 1600MHz 
Hard DriveHard DriveHard DriveOptical Drive
Crucial C300 64GB Samsung F2 1.5TB Seagate 500GB LG GH20NS15 
Optical DriveOSMonitorMonitor
Optiarc AD-7261S Win7 64bit 22" LG L226WTQ 19" AOC 
KeyboardPowerCaseMouse
Steelseries 6Gv2  Silverstone ST75F 750W Modular Fractal Design Arc Logitech G500 
Mouse PadAudioAudioAudio
Steelseries QCK Diablo 3 Beyerdynamic DT770 80ohm Fiio E9 Headphone Amp X-Fi XtremeGamer 
  hide details  
Reply
Lightning
(20 items)
 
  
CPUMotherboardGraphicsRAM
i5 2500K Gigabyte Z68XP-UD3P XFX HD6950 DD 2GB 8GB Corsair Vengeance 1600MHz 
Hard DriveHard DriveHard DriveOptical Drive
Crucial C300 64GB Samsung F2 1.5TB Seagate 500GB LG GH20NS15 
Optical DriveOSMonitorMonitor
Optiarc AD-7261S Win7 64bit 22" LG L226WTQ 19" AOC 
KeyboardPowerCaseMouse
Steelseries 6Gv2  Silverstone ST75F 750W Modular Fractal Design Arc Logitech G500 
Mouse PadAudioAudioAudio
Steelseries QCK Diablo 3 Beyerdynamic DT770 80ohm Fiio E9 Headphone Amp X-Fi XtremeGamer 
  hide details  
Reply
post #20 of 30
Quote:
Originally Posted by GoTMaXPoWeR View Post
I'm not arguing that, I'm saying that he can't declare what a variable is in the line which that variable is declared, i.e.
And I am saying that you can. You can declare a variable and initialize it at the same time. You can do that with almost every language there is. You don't need two lines to declare and assign a value to a variable.

This is extremely basic stuff.
Intellect v2
(9 items)
 
  
CPUMotherboardGraphicsRAM
Intel Core i7-6700K Processor ASUS ROG MAXIMUS VIII HERO LGA1151 DDR4 M.2 SAT... EVGA GTX 1080 SC ACX 3.0 Crucial Ballistix Sport 32GB DDR4 2400 MT/s (PC... 
CoolingKeyboardPowerCase
Noctua NH-D15 Das Keyboard 4 Professional (Brown) Corsair AX860 Fractal Design Define R5 
Mouse
MIONIX NAOS 7000 
  hide details  
Reply
Intellect v2
(9 items)
 
  
CPUMotherboardGraphicsRAM
Intel Core i7-6700K Processor ASUS ROG MAXIMUS VIII HERO LGA1151 DDR4 M.2 SAT... EVGA GTX 1080 SC ACX 3.0 Crucial Ballistix Sport 32GB DDR4 2400 MT/s (PC... 
CoolingKeyboardPowerCase
Noctua NH-D15 Das Keyboard 4 Professional (Brown) Corsair AX860 Fractal Design Define R5 
Mouse
MIONIX NAOS 7000 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Application Programming