Click here to Skip to main content
       

Visual Basic

 
AnswerRe: Decoding USBSTOR Registry Entry in VB PinmemberAlan N18-Jan-13 1:21 
GeneralRe: Decoding USBSTOR Registry Entry in VB PinmemberSantLou4018-Jan-13 1:47 
GeneralRe: Decoding USBSTOR Registry Entry in VB PinmemberAlan N18-Jan-13 4:05 
JokeRe: Decoding USBSTOR Registry Entry in VB PinmemberJeffnogueira22-Jan-13 4:31 
QuestionVB.NET ReportViewer too many Page Breaks rendered PinmemberSantLou4017-Jan-13 3:39 
AnswerRe: VB.NET ReportViewer too many Page Breaks rendered PinmemberChandraRam17-Jan-13 20:04 
GeneralRe: VB.NET ReportViewer too many Page Breaks rendered PinmemberSantLou4018-Jan-13 1:39 
Questioncontrol 5 appliances using pc's parallel port[vb.net 2010] PinmemberLord Christian15-Jan-13 20:10 
my pc's operating system
windows 7 ultimate 32 bit
-------------------------
 

i am working on a project that will control 5 devices through pc parallel port/printer port.
when i run the program it will first appear a loginform
then when i enter.
it always returns that the port doesnt exist.
even though i have the port it cant detect it.. i dont know what is wrong with my code.
 
--------------------------------------------------------
Dim FILE_NAME As String = "LPT1"
 
If System.IO.File.Exists(FILE_NAME) Then
Dim objWriter As New System.IO.StreamWriter(FILE_NAME)
objWriter.Write("hi")
objWriter.Close()
MsgBox("ok")
Else
MsgBox("port does not exist")
End If
------------------------------------------------------
then after the login the next form is homepage. there you'll see the switch buttons that will turn on and off a device. when i clicked any of this buttons an error will prompt. its say that object reference not set to an instance of an object
 
NullReferenceException was unhandled.
 
Private Sub btn_app1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_app1.Click
If btn_app1.Text = "ON" Then
btn_app1.Text = "OFF"
btn_app1.BackColor = Color.Red
io(0)
Else
btn_app1.Text = "ON"
btn_app1.BackColor = Color.Green
io(1)
End If
End Sub
 
Private Sub btn_app2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_app2.Click
If btn_app2.Text = "ON" Then
btn_app2.Text = "OFF"
btn_app2.BackColor = Color.Red
io(0)
Else
btn_app2.Text = "ON"
btn_app2.BackColor = Color.Green
io(2)
End If
End Sub
 
Private Sub btn_app3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_app3.Click
If btn_app3.Text = "ON" Then
btn_app3.Text = "OFF"
btn_app3.BackColor = Color.Red
io(0)
Else
btn_app3.Text = "ON"
btn_app3.BackColor = Color.Green
io(4)
End If
End Sub
 
Private Sub btn_app4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_app4.Click
If btn_app4.Text = "ON" Then
btn_app4.Text = "OFF"
btn_app4.BackColor = Color.Red
io(0)
Else
btn_app4.Text = "ON"
btn_app4.BackColor = Color.Green
io(8)
End If
End Sub
 
Private Sub btn_app5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_app5.Click
If btn_app5.Text = "ON" Then
btn_app5.Text = "OFF"
btn_app5.BackColor = Color.Red
io(0)
Else
btn_app5.Text = "ON"
btn_app5.BackColor = Color.Green
io(16)
End If
End Sub
 
Private Sub io(ByVal bit As Integer)
val = axHwinterface1.InPort(888)
axHwinterface1.OutPort(888, CShort(val Or bit))
End Sub
 
--------------------------------------------------------
please help me im new in this.. Cry | :(( i need your help guys.. thank you in advance..
every response is very much appreciated
 
if you want to see my whole project you can Download it here
 
http://www.mediafire.com/?1zvx1ty736r2nnb
AnswerRe: control 5 appliances using pc's parallel port[vb.net 2010] PinmemberBernhard Hiller15-Jan-13 20:42 
GeneralRe: control 5 appliances using pc's parallel port[vb.net 2010] PinmemberLord Christian17-Jan-13 7:15 
AnswerRe: control 5 appliances using pc's parallel port[vb.net 2010] PinmvpRichard MacCutchan15-Jan-13 22:59 
GeneralRe: control 5 appliances using pc's parallel port[vb.net 2010] PinmemberLord Christian17-Jan-13 6:56 
GeneralRe: control 5 appliances using pc's parallel port[vb.net 2010] PinmvpRichard MacCutchan17-Jan-13 7:10 
GeneralRe: control 5 appliances using pc's parallel port[vb.net 2010] PinmemberLord Christian17-Jan-13 7:33 
GeneralRe: control 5 appliances using pc's parallel port[vb.net 2010] PinmvpRichard MacCutchan17-Jan-13 22:51 
GeneralRe: control 5 appliances using pc's parallel port[vb.net 2010] PinmemberLord Christian18-Jan-13 4:58 
GeneralRe: control 5 appliances using pc's parallel port[vb.net 2010] PinmvpRichard MacCutchan18-Jan-13 5:10 
GeneralRe: control 5 appliances using pc's parallel port[vb.net 2010] PinmemberLord Christian20-Jan-13 18:55 
QuestionBuilding COM Components Using MATLAB - Part I PinmemberSergentX13-Jan-13 6:35 
AnswerRe: Building COM Components Using MATLAB - Part I PinmvpEddy Vluggen14-Jan-13 3:13 
GeneralMessage Removed PinmemberSergentX14-Jan-13 8:20 
AnswerRe: Building COM Components Using MATLAB - Part I PinmvpEddy Vluggen14-Jan-13 9:59 
QuestionDebug user control in VB6.0 ? PinmemberMember 24584678-Jan-13 22:38 
AnswerRe: Debug user control in VB6.0 ? PinmemberChandraRam17-Jan-13 20:08 
QuestionHow make DOWNLOADER in VB 2010 ? Pinmemberradoslaw1238-Jan-13 7:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web04 | 2.8.140721.1 | Last Updated 1 Aug 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid