473,407 Members | 2,326 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

code stopping program

hi, i have the following line of code

Dim fsUser As New IO.FileStream(SnPath & s.Identity & "\UserData\info.ppf",
IO.FileMode.Create, IO.FileAccess.Write)

in a sub, SnPath is not null, s.identity is not null, and there are no
runtime nor compilation errors. once it hits this line, the code stops
running and my program just acts like nothing happened. its not enclosed in a
try catch block and ive tried closing and reopening the project yet for some
reason it wont work. any ideas?

--
-iwdu15
Jul 3 '06 #1
2 1078
runtime nor compilation errors. once it hits this line, the code stops
running and my program just acts like nothing happened. its not enclosed in a
Can you be more specific? What do you mean when you say "the code
stops running"? What happens if you set a breakpoint at that line and
then step through the code?
try catch block and ive tried closing and reopening the project yet for some
reason it wont work. any ideas?
Can you show us some more code? What you have shown, give very little
information for us to help.

Jul 3 '06 #2
yea sorry, what happens is if i step through in debugging mode, is the line
is highlighted in yellow as its supposed to, then when i push the key to step
to the next line (or even to run it without breakpoints) it acts as if there
is no code under it, almost treating that line as an "exit sub". here the
entire method

Private Sub s_OnStateChange(ByVal session As AccCoreLib.AccSession, ByVal
State As AccCoreLib.AccSessionState, ByVal hr As AccCoreLib.AccResult)
Handles s.OnStateChange

Select Case State

Case AccSessionState.AccSessionState_Connecting

Me.tslblStatus.Text = "Connecting..."

Case AccSessionState.AccSessionState_Negotiating

Me.tslblStatus.Text = "Negotiating..."

Case AccSessionState.AccSessionState_Online

If boolSave Then

For Each str As String In arrSN

If Not str = Me.cmbSN.Text Then

Dim fs As New IO.FileStream(SnPath & s.Identity
& ".snf", IO.FileMode.Create, IO.FileAccess.Write)
Dim sw As New IO.StreamWriter(fs)

Dim enc As New EncryptAndDecrypt

sw.WriteLine(Me.cmbSN.Text)
sw.WriteLine(enc.EncryptString(Me.mtxtpass.Text))

fs.Flush()
sw.Flush()

sw.Close()
fs.Close()

End If

Next

End If

If IO.File.Exists(SnPath & s.Identity & "\UserData\") =
False Then

Dim enc As New EncryptAndDecrypt

Dim fsUser As New IO.FileStream(SnPath & s.Identity &
"\UserData\info.ppf", IO.FileMode.Create, IO.FileAccess.Write)
Dim swUser As New IO.StreamWriter(fsUser)

swUser.WriteLine(enc.EncryptString(Me.mtxtpass.Tex t))

swUser.Close()
fsUser.Close()

End If

frm.Text = Me.cmbSN.Text & "'s Buddy List"

frm.Opacity = 1
frm.Visible = True
frm.Show()

SignOn = s
s = Nothing

Me.Close()

Case AccSessionState.AccSessionState_Validating

Me.tslblStatus.Text = "Validating..."

Case AccSessionState.AccSessionState_Starting

Me.tslblStatus.Text = "Starting..."

Case AccSessionState.AccSessionState_Offline

Me.tslblStatus.Text = "Offline"

Me.btnsignon.Enabled = True

Case AccSessionState.AccSessionState_Transferring

Me.tslblStatus.Text = "Transferring..."

Case Else

Me.tslblStatus.Text = State.ToString

End Select

End Sub

--
-iwdu15
Jul 4 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: BKM | last post by:
I'm using a VB6 WebBrowser control to get info from various web pages and, occasionally, my program stops when it finds a script error on the page. It won't resume until I click 'Yes' or 'No' on...
18
by: Adrian B. | last post by:
Does anyone know of a framework or library that will enable me to use publish/subscribe comms? I want to create a server (using Python) running on a Unix box that will accept client connections...
242
by: James Cameron | last post by:
Hi I'm developing a program and the client is worried about future reuse of the code. Say 5, 10, 15 years down the road. This will be a major factor in selecting the development language. Any...
11
by: Peter Steele | last post by:
I have a Windows application written in C# that I want to return a non-zero exit code when it it run. The problem is that as a Windows application, there doesn't seem to be a way to control this....
15
by: Neo | last post by:
Hello All, I found that ASP.net website only accepts code withing site directory. This creates big hurdle in shairng code. How to share code between two websites, like the way share between two...
4
by: bjm | last post by:
I am writing a program that will automate a series of application installations. I want to give the user the option of stopping the program's execution in between installations (for example, give...
232
by: robert maas, see http://tinyurl.com/uh3t | last post by:
I'm working on examples of programming in several languages, all (except PHP) running under CGI so that I can show both the source files and the actually running of the examples online. The first...
22
by: flit | last post by:
Hello All, I have a hard question, every time I look for this answer its get out from the technical domain and goes on in the moral/social domain. First, I live in third world with bad gov., bad...
7
by: horacius.rex | last post by:
Hi, I want to profile a C program I am writting, so I compile it with -pg options and use gprof to obtain information about call graphs, which I am really interested in. I look at the text files...
0
by: eldamiani | last post by:
Ineed a help. I want to ask, how I can do dialog box window which is a normal form, but causes stopping the code execution in form which call out this dialog box. I have ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.