Solved

Executable Error

Posted on 2009-04-01
6
156 Views
Last Modified: 2013-11-25
Hello, im re-writing a question because I went in wrong zone. Im started it as new here:

I did an application VB.NET with VS 2008. the app is running perfectly when I run my SQL and VS as administrator. Also, running perfeclty when I press the run button.

Now, when I try to execute via the EXE file inside the folder DEBUG, im having an error somewhere in the app that does not show up when I press the run button inside VS2008...

Also that EXE i did run as Administrator so I dont understand, whats the damn difference??

My Error is (see in code snippet)

and line 13 is :

        If getPanel("panelInner0").VerticalScroll.Visible = True Then

by the way, i tried to put in comment that IF and i had no more error.
but i still dont understand why the EXE dont like that if and inside VS2008 its fine... ?!?!

************** Exception Text **************

System.NullReferenceException: Object reference not set to an instance of an object.

   at xx.frmCart.frmCart_Load(Object sender, EventArgs e) in C:\Users\Admin\Documents\Visual Studio 2008\Projects\xx\xx\frmCart.vb:line 13

   at System.Windows.Forms.Form.OnLoad(EventArgs e)

   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)

   at System.Windows.Forms.Control.CreateControl()

   at System.Windows.Forms.Control.WmShowWindow(Message& m)

   at System.Windows.Forms.Control.WndProc(Message& m)

   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)

   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Open in new window

0
Comment
Question by:PhilippeRenaud
  • 3
  • 2
6 Comments
 
LVL 76

Expert Comment

by:GrahamSkan
Comment Utility
Probably the flow of your program does not go as you expect it to so that you miss the code that defines the object.

If careful examination of the code does not reveal where that might be, you will have to resort to writing a log file to trace the program flow.





0
 
LVL 69

Expert Comment

by:Éric Moreau
Comment Utility
maybe it is just a timing problem. have you tried to move that code into the Activate event when you are sure that the controls are fully loaded?

and again, Are you trying to run your application on the same or from another one? If it is another one, you are probably missing a component. If you are running from the same PC, an object was not set. Can you tell which object it is?
0
 
LVL 1

Author Comment

by:PhilippeRenaud
Comment Utility
>> have you tried to move that code into the Activate event when you are sure that the controls are fully loaded?

what do you mean Activate Event .. ?

Yes its on the SAME PC.
I cant tell which object...
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 69

Accepted Solution

by:
Éric Moreau earned 500 total points
Comment Utility
instead of setting your code into the Form_Load event, try to set it in the Form_Activated event.
0
 
LVL 1

Author Comment

by:PhilippeRenaud
Comment Utility
oh ok Yes I will try that
0
 
LVL 1

Author Closing Comment

by:PhilippeRenaud
Comment Utility
Thanks
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now