Results 1 to 29 of 29

Thread: problem in visual studio?

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2010
    Posts
    965

    problem in visual studio?

    HI, when i launch my project which i developed in visual studio (vb.net 2005) prfessional Edition. After loggin in to project, when i load one form and then second form so it hangs up. but does not give any error or warning. then i go and stop the project. i asked from a friend he said may be your visual studio has been turned off not properly or due to electricity loadshedding your computer has not been shut down properly, thats why you are hving this problem. now please assist me that what should i do?

  2. #2
    Hyperactive Member
    Join Date
    Dec 2000
    Location
    Sydney
    Posts
    311

    Re: problem in visual studio?

    I'd suggest a bug in your project is a just little more likely than 'electricity loadshedding' affecting one single VB project and nothing else on your entire PC.

    Put a breakpoint where it loads form 2, and step through the code to work out why it's hanging.
    Why do today what you can tomorrow...

  3. #3
    Karen Payne MVP kareninstructor's Avatar
    Join Date
    Jun 2008
    Location
    Oregon
    Posts
    6,714

    Re: problem in visual studio?

    What do you mean by logging into your project, did you mean logging into your application?

    Make sure option strict is on under My Project Compile. Also rebuild the project followed by Help321 suggestion to set a break point to step thru your code.

    The more specific information you can supply the better assistance you will get.

  4. #4
    PowerPoster JuggaloBrotha's Avatar
    Join Date
    Sep 2005
    Location
    Lansing, MI; USA
    Posts
    4,286

    Re: problem in visual studio?

    Abid Durrani:
    What do you mean by "After loggin in to project" ?
    When you open the 2nd form and it hangs, what code is running?

    What does "may be your visual studio has been turned off not properly" mean?
    What does "due to electricity loadshedding your computer has not been shut down properly" mean?
    Currently using VS 2015 Enterprise on Win10 Enterprise x64.

    CodeBank: All ThreadsColors ComboBoxFading & Gradient FormMoveItemListBox/MoveItemListViewMultilineListBoxMenuButtonToolStripCheckBoxStart with Windows

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2010
    Posts
    965

    Re: problem in visual studio?

    HI kevin, logging into project mean that when i log in to my application. yes you are right. i mean that for security concern when my application executes to first software login form appears where the user enter USERNAME and PASSWORD. IS It clear now?

  6. #6

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2010
    Posts
    965

    Re: problem in visual studio?

    Hi juggalo, logging into project mean that when i log in to my application. yes you are right. i mean that for security concern when my application executes to first software login form appears where the user enter USERNAME and PASSWORD. IS It clear now?

    i didnt understand on your second question i.e. "When you open the 2nd form......."

    i mean to say that visual studio turned off not properly because sometimes here we have electricity problem. i am working and suddenly the goes off so system becomes affect with this and visual studio As well."

  7. #7

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2010
    Posts
    965

    Re: problem in visual studio?

    Quote Originally Posted by Help321 View Post
    I'd suggest a bug in your project is a just little more likely than 'electricity loadshedding' affecting one single VB project and nothing else on your entire PC.

    Put a breakpoint where it loads form 2, and step through the code to work out why it's hanging.
    Hi help123, i dont know that from where it loads form 2, when it hangs up so it did not give any error it hangs up and do nothing. so i dont know how to figure out the problem? so pleas tell me how do i do it now?

  8. #8
    Hyperactive Member
    Join Date
    Dec 2000
    Location
    Sydney
    Posts
    311

    Re: problem in visual studio?

    Hi

    To me at least, it's even less clear

    Are you saying:
    You open your project
    You RUN your project
    The first form, your login form appears
    You try to login....and then your program hangs?
    Why do today what you can tomorrow...

  9. #9
    PowerPoster JuggaloBrotha's Avatar
    Join Date
    Sep 2005
    Location
    Lansing, MI; USA
    Posts
    4,286

    Re: problem in visual studio?

    Quote Originally Posted by Abid Durrani View Post
    Hi juggalo, logging into project mean that when i log in to my application. yes you are right. i mean that for security concern when my application executes to first software login form appears where the user enter USERNAME and PASSWORD. IS It clear now?

    i didnt understand on your second question i.e. "When you open the 2nd form......."

    i mean to say that visual studio turned off not properly because sometimes here we have electricity problem. i am working and suddenly the goes off so system becomes affect with this and visual studio As well."
    Ok it's starting to make sense other than the electricity part, if you have electrical problems then the whole computer would have issues, not just your 1 program.

    SO basically you open the project in VS, run your program and the first form asks for a username & password, then shows a 2nd form and it stops responding. Right?

    If that's the case, I ask again, what's your code for the 2nd form? Obviously something's not coded correctly and you should start debugging it to find out why.
    Currently using VS 2015 Enterprise on Win10 Enterprise x64.

    CodeBank: All ThreadsColors ComboBoxFading & Gradient FormMoveItemListBox/MoveItemListViewMultilineListBoxMenuButtonToolStripCheckBoxStart with Windows

  10. #10

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2010
    Posts
    965

    Re: problem in visual studio?

    Quote Originally Posted by Help321 View Post
    Hi

    To me at least, it's even less clear

    Are you saying:
    You open your project
    You RUN your project
    The first form, your login form appears
    You try to login....and then your program hangs?
    when i try to login so log me in but after loggin in when i open a form suppose a student form so it opens that but when i open any other form then i hangs up.

    i checked all my code, i debugged perfectly, there is no sign of error, no error messge, no warning no exception nothing at all. last night i instaslled fresh windows, fresh visual studio, fresh SQL Server but it still doing same problem.

    this problem started from once week not before this. on 19th OF January, i run my project open all my forms and they were workig properly but after that it started that problem.

  11. #11

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2010
    Posts
    965

    Re: problem in visual studio?

    Quote Originally Posted by JuggaloBrotha View Post
    Ok it's starting to make sense other than the electricity part, if you have electrical problems then the whole computer would have issues, not just your 1 program.

    SO basically you open the project in VS, run your program and the first form asks for a username & password, then shows a 2nd form and it stops responding. Right?

    If that's the case, I ask again, what's your code for the 2nd form? Obviously something's not coded correctly and you should start debugging it to find out why.
    hi juggalo, i installed fresh windows, fresh visual stuio and fresh SQL Server. but when i checked now so it still giving same problem. i have debugged so many times it builds successfully. it execute successfully, but

    i am saying:
    i open my project
    i RUN my project
    The first form, your login form appears
    i give login and password it takes and log me in properly right.
    then suppose i open student info form and then i open search form so as i open the second form it hangs up and does not give any error or warning. i stayed for long time but it didnt give any error message.

    i checked the code so many times but it does not give any error message. :-( :-( :-(

  12. #12
    Hyperactive Member
    Join Date
    Dec 2000
    Location
    Sydney
    Posts
    311

    Re: problem in visual studio?

    Have you put a breakpoint on the line where it is opening the second form and stepped through the code?
    Why do today what you can tomorrow...

  13. #13

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2010
    Posts
    965

    Re: problem in visual studio?

    not yet, but let me confirm. Do you mean that when i click on second form so at the loading point i put a break piont?

  14. #14
    Hyperactive Member
    Join Date
    Dec 2000
    Location
    Sydney
    Posts
    311

    Re: problem in visual studio?

    Yes, or any point before the program goes into an eternal loop.
    Why do today what you can tomorrow...

  15. #15

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2010
    Posts
    965

    Re: problem in visual studio?

    Quote Originally Posted by Help321 View Post
    Yes, or any point before the program goes into an eternal loop.
    hi, i have added a breakpoint but when i open the form on which i made a breakpoint so instead of opening it takes me to that breakpoint and when i remove the breakpoint then it works.

    Where i put the breakpoint?

    studentform_LOAD (by val ........) on this line i made a breakpoint.

  16. #16
    Hyperactive Member
    Join Date
    Dec 2000
    Location
    Sydney
    Posts
    311

    Re: problem in visual studio?

    Put the breakpoint on the same line, then STEP THROUGH your code. And see what it does.

    I can't tell you the exact line to put the breakpoint, I can't see your code can I.
    Why do today what you can tomorrow...

  17. #17
    Fanatic Member Megalith's Avatar
    Join Date
    Oct 2006
    Location
    Secret location in the UK
    Posts
    879

    Re: problem in visual studio?

    silly question... have you ran a defrag? would imagine however that if the file(s) had become corrupted then vs would not load the form.
    If debugging is the process of removing bugs, then programming must be the process of putting them in.

  18. #18
    PowerPoster JuggaloBrotha's Avatar
    Join Date
    Sep 2005
    Location
    Lansing, MI; USA
    Posts
    4,286

    Re: problem in visual studio?

    Quote Originally Posted by Abid Durrani View Post
    hi juggalo, i installed fresh windows, fresh visual stuio and fresh SQL Server. but when i checked now so it still giving same problem. i have debugged so many times it builds successfully. it execute successfully, but

    i am saying:
    i open my project
    i RUN my project
    The first form, your login form appears
    i give login and password it takes and log me in properly right.
    then suppose i open student info form and then i open search form so as i open the second form it hangs up and does not give any error or warning. i stayed for long time but it didnt give any error message.

    i checked the code so many times but it does not give any error message. :-( :-( :-(
    And you're still missing the critical piece here.... WHAT'S YOUR CODE?? We can't possibly help you if you don't give us any details and since I've asked 3 times now...
    Currently using VS 2015 Enterprise on Win10 Enterprise x64.

    CodeBank: All ThreadsColors ComboBoxFading & Gradient FormMoveItemListBox/MoveItemListViewMultilineListBoxMenuButtonToolStripCheckBoxStart with Windows

  19. #19

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2010
    Posts
    965

    Re: problem in visual studio?

    Quote Originally Posted by JuggaloBrotha View Post
    And you're still missing the critical piece here.... WHAT'S YOUR CODE?? We can't possibly help you if you don't give us any details and since I've asked 3 times now...
    ok tell me that what code i send you, i mean which part of code. i have almost 4000 lines of code? so....

  20. #20

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2010
    Posts
    965

    Re: problem in visual studio?

    Hi Help123, ok tell me that what code i send you, i mean which part of code. i have almost 4000 lines of code? so....

  21. #21
    Addicted Member vb_ftw's Avatar
    Join Date
    Dec 2010
    Posts
    139

    Re: problem in visual studio?

    "After loggin in to project, when i load one form and then second form so it hangs up...."

    where it hangs up...the second form load code maybe...

  22. #22
    Hyperactive Member
    Join Date
    Dec 2000
    Location
    Sydney
    Posts
    311

    Re: problem in visual studio?

    You know where the code hangs/loops etc. So the code up until that point is ok. So post the code after that point. Where it loads form2 or whatever it's called.

    But....If you just put a breakpoint on the line before it loads the second form, WHERE YOU KNOW THE CODE WORKS. And STEP THROUGH your code. You'll find the problem, probably, in no time at all. Do you understand that? If you don't, say so. Because I can only say the same thing over and over again so many times.
    Why do today what you can tomorrow...

  23. #23
    PowerPoster JuggaloBrotha's Avatar
    Join Date
    Sep 2005
    Location
    Lansing, MI; USA
    Posts
    4,286

    Re: problem in visual studio?

    At this point it would probably make more sense to just have him delete the bin & obj folders from the project, zip the whole shabang and attach it here.
    Currently using VS 2015 Enterprise on Win10 Enterprise x64.

    CodeBank: All ThreadsColors ComboBoxFading & Gradient FormMoveItemListBox/MoveItemListViewMultilineListBoxMenuButtonToolStripCheckBoxStart with Windows

  24. #24

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2010
    Posts
    965

    Re: problem in visual studio?

    Quote Originally Posted by Megalith View Post
    silly question... have you ran a defrag? would imagine however that if the file(s) had become corrupted then vs would not load the form.
    hi, what defrag? you mean defragmentation? and how i ran defrag?

  25. #25

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2010
    Posts
    965

    Re: problem in visual studio?

    Private Sub Periodic_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Dim a, b As Integer
    cn.Open()
    ds.Clear()

    Button1.Enabled = False
    Button3.Enabled = False

    TextBox1.Focus()

    Dim st As String = "select * from PeriodicInfo"
    Dim cmdd As New SqlCommand(st, cn)
    cmdd.CommandType = CommandType.Text
    da.SelectCommand = cmdd
    da.Fill(ds, "PeriodicInfo")

    For a = 0 To ds.Tables("PeriodicInfo").Rows.Count - 1
    b = ds.Tables("PeriodicInfo").Rows(a).Item(0)
    Label2.Text = "your last Periodic ID was" & " " & b
    Next
    End Sub

    this is the code at the load event of my form.

  26. #26
    Hyperactive Member
    Join Date
    Dec 2000
    Location
    Sydney
    Posts
    311

    Re: problem in visual studio?

    Put a breakpoint on 'End Sub'. Does the program ever reach the breakpoint?
    Why do today what you can tomorrow...

  27. #27

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2010
    Posts
    965

    Re: problem in visual studio?

    Quote Originally Posted by Help321 View Post
    Put a breakpoint on 'End Sub'. Does the program ever reach the breakpoint?
    hi help321, yes it reaches to breakpoint but stop my program means that at break point it breaks the program execution.


    would you please tell me that how do i communication with forum owner?

  28. #28
    Hyperactive Member
    Join Date
    Dec 2000
    Location
    Sydney
    Posts
    311

    Re: problem in visual studio?

    Quote Originally Posted by Abid Durrani View Post
    hi help321, yes it reaches to breakpoint but stop my program means that at break point it breaks the program execution.


    would you please tell me that how do i communication with forum owner?
    You want me to tell you what?
    Why do today what you can tomorrow...

  29. #29
    Addicted Member vb_ftw's Avatar
    Join Date
    Dec 2010
    Posts
    139

    Re: problem in visual studio?

    i think it's time to implement post #23

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width