473,765 Members | 2,081 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to fix "An object reference is required for the non-static field . . . " error?

82 New Member
Hi
I've added a textbox called tbAccel0 to a form. It shows up on the form with the correct name, but when I look at the code a red squigly line appears under tbAccel0 and an error appears in the error list saying

An object reference is required for the non-static field, method, or property

I don't understand why. Surely an object reference was added when I added the textbox to the form.

This is the only time this has happened, if a put a textbox on a new form it works normally as it should.



this is the code. I have taken a working program and added an accelerometer to it (sorry it's so long)
Expand|Select|Wrap|Line Numbers
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Drawing.Imaging;
  7. using System.Text;
  8. using System.Windows.Forms;
  9. using System.Threading;
  10.  
  11. using AForge;
  12. using AForge.Imaging;
  13. using AForge.Imaging.Filters;
  14. using AForge.Video;
  15. using AForge.Video.DirectShow;
  16.  
  17. using Phidgets;
  18. using Phidgets.Events;
  19.  
  20. namespace Robot
  21. {
  22.     public partial class MainForm : Form
  23.     {
  24.  
  25.         static InterfaceKit ifKit1; //Declare an InterfaceKit object
  26.         static InterfaceKit ifKit2; //Declare an InterfaceKit object
  27.         static InterfaceKit ifKit3; //Declare an InterfaceKit object
  28.  
  29.         static AdvancedServo left_arm; //Declare an servo object
  30.         static AdvancedServo right_arm; //Declare an servo object
  31.         static AdvancedServo eyes_and_wheels; //Declare an servo object
  32.  
  33.         static Phidgets.Encoder encoder; //Declare an encoder object
  34.  
  35.         static Accelerometer accel; //Declare an accelerometer object
  36.  
  37.  
  38.         //int ifKit1SN = 117172;  //ifkit1 serial number 
  39.         //int ifKit2SN = 100818;   //ifkit2 serial number 
  40.         //int ifKit3SN = 000000;   //ifkit3 serial number 
  41.  
  42.         //int left_armSN = 99333;  //servo1 serial number
  43.         //int right_armSN = 99364; //servo2 serial number
  44.         //int eyes_and_wheelsSN = 170038 //servo3 serial number
  45.  
  46.         //int encoderSN = 000000; //encoder serial number
  47.  
  48.         //int accelSN = 159431; //servo1 serial number
  49.  
  50.         int armShoulderRotate = 0;
  51.         int armShoulderLift = 1;
  52.         int armElbow = 2;
  53.         int armWristRotate = 3;
  54.         int armWristLift = 4;
  55.         int armGripper = 5;
  56.  
  57.         int eyeLeftYaw = 0;
  58.         int eyeLeftLift = 2;
  59.  
  60.         int eyeRightYaw = 1;
  61.         int eyeRightLift = 3;
  62.  
  63.         int wheelLeft = 6;
  64.         int wheelRight = 7;
  65.  
  66.  
  67.  
  68.  
  69.         // list of video devices
  70.         FilterInfoCollection videoDevices;
  71.         // form for cameras' movement
  72.         MoveCamerasForm moveCamerasForm;
  73.  
  74.         ColorFiltering colorFilter = new ColorFiltering();
  75.         GrayscaleBT709 grayFilter = new GrayscaleBT709();
  76.         // use two blob counters, so the could run in parallel in two threads
  77.         BlobCounter blobCounter1 = new BlobCounter();
  78.         BlobCounter blobCounter2 = new BlobCounter();
  79.  
  80.         private AutoResetEvent camera1Acquired = null;
  81.         private AutoResetEvent camera2Acquired = null;
  82.         private Thread trackingThread = null;
  83.  
  84.         // object coordinates in both cameras
  85.         private float x1, y1, x2, y2;
  86.  
  87.         private IntRange redRange = new IntRange(0, 255);
  88.         private IntRange greenRange = new IntRange(0, 255);
  89.         private IntRange blueRange = new IntRange(0, 255);
  90.  
  91.  
  92.  
  93.         public event EventHandler OnFilterUpdate;
  94.  
  95.         public MainForm()
  96.         {
  97.             InitializeComponent();
  98.  
  99.             // show device list
  100.             try
  101.             {
  102.                 accel = new Accelerometer(); //Initialize the Accelerometer object
  103.  
  104.                 // enumerate video devices
  105.                 videoDevices = new FilterInfoCollection(FilterCategory.VideoInputDevice);
  106.  
  107.                 if (videoDevices.Count == 0)
  108.                 {
  109.                     throw new Exception();
  110.                 }
  111.  
  112.                 for (int i = 1, n = videoDevices.Count; i <= n; i++)
  113.                 {
  114.                     string cameraName = i + " : " + videoDevices[i - 1].Name;
  115.  
  116.                     camera1Combo.Items.Add(cameraName);
  117.                     camera2Combo.Items.Add(cameraName);
  118.                 }
  119.  
  120.                 // check cameras count
  121.                 if (videoDevices.Count == 1)
  122.                 {
  123.                     camera2Combo.Items.Clear();
  124.  
  125.                     camera2Combo.Items.Add("Only one camera found");
  126.                     camera2Combo.SelectedIndex = 0;
  127.                     camera2Combo.Enabled = false;
  128.                 }
  129.                 else
  130.                 {
  131.                     camera2Combo.SelectedIndex = 1;
  132.                 }
  133.                 camera1Combo.SelectedIndex = 0;
  134.             }
  135.             catch
  136.             {
  137.                 startButton.Enabled = false;
  138.  
  139.                 camera1Combo.Items.Add("No cameras found");
  140.                 camera2Combo.Items.Add("No cameras found");
  141.  
  142.                 camera1Combo.SelectedIndex = 0;
  143.                 camera2Combo.SelectedIndex = 0;
  144.  
  145.                 camera1Combo.Enabled = false;
  146.                 camera2Combo.Enabled = false;
  147.             }
  148.  
  149.             //
  150.             colorFilter.Red = new IntRange(0, 100);
  151.             colorFilter.Green = new IntRange(0, 200);
  152.             colorFilter.Blue = new IntRange(150, 255);  
  153.  
  154.  
  155.             // configure blob counters
  156.             blobCounter1.MinWidth = 25;
  157.             blobCounter1.MinHeight = 25;
  158.             blobCounter1.FilterBlobs = true;
  159.             blobCounter1.ObjectsOrder = ObjectsOrder.Size;
  160.  
  161.             blobCounter2.MinWidth = 25;
  162.             blobCounter2.MinHeight = 25;
  163.             blobCounter2.FilterBlobs = true;
  164.             blobCounter2.ObjectsOrder = ObjectsOrder.Size;
  165.         }
  166.  
  167.  
  168.         private void MainForm_Load(object sender, EventArgs e)
  169.         {
  170.             accel.Attach += new AttachEventHandler(accel_Attach);
  171.             accel.AccelerationChange += new AccelerationChangeEventHandler(accel_AccelerationChange);  //Hook the phidget spcific event handlers
  172.            //accel.Error += new ErrorEventHandler(accel_Error);  //Hook the phidget spcific event handlers
  173.  
  174.             accel.open(159431);
  175.  
  176.             for (int i = 0; i < accel.axes.Count; i++)
  177.             {
  178.                 accel.axes[i].Sensitivity = 1.10;
  179.             }
  180.  
  181.  
  182.             StartCameras();
  183.  
  184.             UpdateObjectPicture(0, null);
  185.             UpdateObjectPicture(1, null);
  186.  
  187.             startButton.Enabled = false;
  188.             stopButton.Enabled = true;
  189.  
  190.             OnFilterUpdate += new EventHandler(OnFilterUpdate);
  191.         }
  192.  
  193.  
  194.  
  195.  
  196.  
  197.         // On "Start" button click - start cameras
  198.         private void startButton_Click(object sender, EventArgs e)
  199.         {
  200.             StartCameras();
  201.  
  202.             startButton.Enabled = false;
  203.             stopButton.Enabled = true;
  204.         }
  205.  
  206.         // On "Stop" button click - stop cameras
  207.         private void stopButton_Click(object sender, EventArgs e)
  208.         {
  209.             StopCameras();
  210.  
  211.             startButton.Enabled = true;
  212.             stopButton.Enabled = false;
  213.         }
  214.  
  215.         // Start cameras
  216.         private void StartCameras()
  217.         {
  218.             // create first video source
  219.             VideoCaptureDevice videoSource1 = new VideoCaptureDevice(videoDevices[camera1Combo.SelectedIndex].MonikerString);
  220.             videoSource1.DesiredFrameRate = 10;
  221.  
  222.             videoSourcePlayer1.VideoSource = videoSource1;
  223.             videoSourcePlayer1.Start();
  224.  
  225.             // create second video source
  226.             if (camera2Combo.Enabled == true)
  227.             {
  228.                 System.Threading.Thread.Sleep(500);
  229.  
  230.                 VideoCaptureDevice videoSource2 = new VideoCaptureDevice(videoDevices[camera2Combo.SelectedIndex].MonikerString);
  231.                 videoSource2.DesiredFrameRate = 10;
  232.  
  233.                 videoSourcePlayer2.VideoSource = videoSource2;
  234.                 videoSourcePlayer2.Start();
  235.             }
  236.  
  237.             camera1Acquired = new AutoResetEvent(false);
  238.             camera2Acquired = new AutoResetEvent(false);
  239.             // start tracking thread
  240.             trackingThread = new Thread(new ThreadStart(TrackingThread));
  241.             trackingThread.Start();
  242.         }
  243.  
  244.         // Stop cameras
  245.         private void StopCameras()
  246.         {
  247.             videoSourcePlayer1.SignalToStop();
  248.             videoSourcePlayer2.SignalToStop();
  249.  
  250.             videoSourcePlayer1.WaitForStop();
  251.             videoSourcePlayer2.WaitForStop();
  252.  
  253.  
  254.                 UpdateObjectPicture(0, null);
  255.                 UpdateObjectPicture(1, null);
  256.  
  257.  
  258.             if (trackingThread != null)
  259.             {
  260.                 // signal tracking thread to stop
  261.                 x1 = y1 = x2 = y2 = -1;
  262.                 camera1Acquired.Set();
  263.                 camera2Acquired.Set();
  264.  
  265.                 trackingThread.Join();
  266.             }
  267.         }
  268.  
  269.         //// Object filter properties are updated
  270.         private void tuneObjectFilterForm_OnFilterUpdate(object sender, EventArgs eventArgs)
  271.         {
  272.             colorFilter.Red = RedRange;
  273.             colorFilter.Green = GreenRange;
  274.             colorFilter.Blue = BlueRange;
  275.  
  276.  
  277.         }
  278.  
  279.         // Turn on/off object detection
  280.         private void objectDetectionCheck_CheckedChanged(object sender, EventArgs e)
  281.         {
  282.             if ((!objectDetectionCheck.Checked))
  283.             {
  284.                 UpdateObjectPicture(0, null);
  285.                 UpdateObjectPicture(1, null);
  286.             }
  287.         }
  288.  
  289.         // received frame from the 1st camera
  290.         private void videoSourcePlayer1_NewFrame(object sender, ref Bitmap image)
  291.         {
  292.             if (objectDetectionCheck.Checked)
  293.             {
  294.                 Bitmap objectImage = colorFilter.Apply(image);
  295.  
  296.                 // lock image for further processing
  297.                 BitmapData objectData = objectImage.LockBits(new Rectangle(0, 0, image.Width, image.Height),
  298.                     ImageLockMode.ReadOnly, image.PixelFormat);
  299.  
  300.                 // grayscaling
  301.                 UnmanagedImage grayImage = grayFilter.Apply(new UnmanagedImage(objectData));
  302.  
  303.                 // unlock image
  304.                 objectImage.UnlockBits(objectData);
  305.  
  306.                 // locate blobs 
  307.                 blobCounter1.ProcessImage(grayImage);
  308.                 Rectangle[] rects = blobCounter1.GetObjectsRectangles();
  309.  
  310.                 if (rects.Length > 0)
  311.                 {
  312.                     Rectangle objectRect = rects[0];
  313.  
  314.                     // draw rectangle around derected object
  315.                     Graphics g = Graphics.FromImage(image);
  316.  
  317.                     using (Pen pen = new Pen(Color.FromArgb(160, 255, 160), 3))
  318.                     {
  319.                         g.DrawRectangle(pen, objectRect);
  320.                     }
  321.  
  322.                     g.Dispose();
  323.  
  324.                     // get object's center coordinates relative to image center
  325.                     lock (this)
  326.                     {
  327.                         x1 = (objectRect.Left + objectRect.Right - objectImage.Width) / 2;
  328.                         y1 = (objectImage.Height - (objectRect.Top + objectRect.Bottom)) / 2;
  329.                         // map to [-1, 1] range
  330.                         x1 /= (objectImage.Width / 2);
  331.                         y1 /= (objectImage.Height / 2);
  332.  
  333.                         camera1Acquired.Set();
  334.                     }
  335.                 }
  336.  
  337.                     UpdateObjectPicture(0, objectImage);
  338.             }
  339.         }
  340.  
  341.         // received frame from the 2nd camera
  342.         private void videoSourcePlayer2_NewFrame(object sender, ref Bitmap image)
  343.         {
  344.             if (objectDetectionCheck.Checked)
  345.             {
  346.                 Bitmap objectImage = colorFilter.Apply(image);
  347.  
  348.                 // lock image for further processing
  349.                 BitmapData objectData = objectImage.LockBits(new Rectangle(0, 0, image.Width, image.Height),
  350.                     ImageLockMode.ReadOnly, image.PixelFormat);
  351.  
  352.                 // grayscaling
  353.                 UnmanagedImage grayImage = grayFilter.Apply(new UnmanagedImage(objectData));
  354.  
  355.                 // unlock image
  356.                 objectImage.UnlockBits(objectData);
  357.  
  358.                 // locate blobs 
  359.                 blobCounter2.ProcessImage(grayImage);
  360.                 Rectangle[] rects = blobCounter2.GetObjectsRectangles();
  361.  
  362.                 if (rects.Length > 0)
  363.                 {
  364.                     Rectangle objectRect = rects[0];
  365.  
  366.                     // draw rectangle around derected object
  367.                     Graphics g = Graphics.FromImage(image);
  368.  
  369.                     using (Pen pen = new Pen(Color.FromArgb(160, 255, 160), 3))
  370.                     {
  371.                         g.DrawRectangle(pen, objectRect);
  372.                     }
  373.  
  374.                     g.Dispose();
  375.  
  376.                     // get object's center coordinates relative to image center
  377.                     lock (this)
  378.                     {
  379.                         x2 = (objectRect.Left + objectRect.Right - objectImage.Width) / 2;
  380.                         y2 = (objectImage.Height - (objectRect.Top + objectRect.Bottom)) / 2;
  381.                         // map to [-1, 1] range
  382.                         x2 /= (objectImage.Width / 2);
  383.                         y2 /= (objectImage.Height / 2);
  384.  
  385.                         camera2Acquired.Set();
  386.                     }
  387.                 }
  388.  
  389.                UpdateObjectPicture(1, objectImage);
  390.             }
  391.         }
  392.  
  393.         // Thread to track object
  394.         private void TrackingThread()
  395.         {
  396.             float targetX = 0;
  397.             float targetY = 0;
  398.  
  399.             while (true)
  400.             {
  401.                 camera1Acquired.WaitOne();
  402.                 camera2Acquired.WaitOne();
  403.  
  404.                 lock (this)
  405.                 {
  406.                     // stop the thread if it was signaled
  407.                     if ((x1 == -1) && (y1 == -1) && (x2 == -1) && (y2 == -1))
  408.                     {
  409.                         break;
  410.                     }
  411.  
  412.                     // get middle point
  413.                     targetX = (x1 + x2) / 2;
  414.                     targetY = (y1 + y2) / 2;
  415.                 }
  416.  
  417.                 if (moveCamerasForm != null)
  418.                 {
  419.                     // run motors for the specified amount of degrees
  420.                     moveCamerasForm.RunMotors(2 * targetX, -2 * targetY);
  421.                 }
  422.             }
  423.         }
  424.  
  425.  
  426.  
  427.         // Update object's picture
  428.         public void UpdateObjectPicture(int objectNumber, Bitmap picture)
  429.         {
  430.             System.Drawing.Image oldPicture = null;
  431.  
  432.             switch (objectNumber)
  433.             {
  434.                 case 0:
  435.                     oldPicture = pictureBox1.Image;
  436.                     pictureBox1.Image = picture;
  437.                     break;
  438.                 case 1:
  439.                     oldPicture = pictureBox2.Image;
  440.                     pictureBox2.Image = picture;
  441.                     break;
  442.             }
  443.  
  444.             if (oldPicture != null)
  445.             {
  446.                 oldPicture.Dispose();
  447.             }
  448.         }
  449.         // Red range
  450.         public IntRange RedRange
  451.         {
  452.             get { return redRange; }
  453.             set
  454.             {
  455.                 redRange = value;
  456.                 redSlider.Min = value.Min;
  457.                 redSlider.Max = value.Max;
  458.             }
  459.         }
  460.         // Green range
  461.         public IntRange GreenRange
  462.         {
  463.             get { return greenRange; }
  464.             set
  465.             {
  466.                 greenRange = value;
  467.                 greenSlider.Min = value.Min;
  468.                 greenSlider.Max = value.Max;
  469.             }
  470.         }
  471.         // Blue range
  472.         public IntRange BlueRange
  473.         {
  474.             get { return blueRange; }
  475.             set
  476.             {
  477.                 blueRange = value;
  478.                 blueSlider.Min = value.Min;
  479.                 blueSlider.Max = value.Max;
  480.             }
  481.         }
  482.  
  483.         // Red range was changed
  484.         private void redSlider_ValuesChanged(object sender, EventArgs e)
  485.         {
  486.             redRange.Min = redSlider.Min;
  487.             redRange.Max = redSlider.Max;
  488.  
  489.             if (OnFilterUpdate != null)
  490.                 OnFilterUpdate(this, null);
  491.         }
  492.  
  493.  
  494.         // Green range was changed
  495.         private void greenSlider_ValuesChanged(object sender, EventArgs e)
  496.         {
  497.             greenRange.Min = greenSlider.Min;
  498.             greenRange.Max = greenSlider.Max;
  499.  
  500.             if (OnFilterUpdate != null)
  501.                 OnFilterUpdate(this, null);
  502.         }
  503.  
  504.         // Blue range was changed
  505.         private void blueSlider_ValuesChanged(object sender, EventArgs e)
  506.         {
  507.             blueRange.Min = blueSlider.Min;
  508.             blueRange.Max = blueSlider.Max;
  509.  
  510.             if (OnFilterUpdate != null)
  511.                 OnFilterUpdate(this, null);
  512.         }
  513.  
  514.  
  515.         // Main form closing - stop cameras
  516.         private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
  517.         {
  518.             StopCameras();
  519.         }
  520.  
  521.         //Acceleration change event handler...Display which axis the device is accelerating in as well as the measured acceleration value
  522.         static void accel_AccelerationChange(object sender, AccelerationChangeEventArgs e)
  523.         {
  524.            // Console.WriteLine("Axes {0} Acceleration {1}", e.Index, e.Acceleration);
  525.             //if (e.Index == 0)
  526.  
  527.             //if (e.Acceleration >= 0.03)
  528.             //    Console.WriteLine("tilt left");
  529.  
  530.             //if (e.Index == 1)
  531.  
  532.             //    if (e.Acceleration >= 0.03)
  533.             //        Console.WriteLine("tilt right");
  534.             //if (e.Index == 2)
  535.  
  536.             //    if (e.Acceleration >= 0.03)
  537.             //        Console.WriteLine("tilt up");
  538.             switch (e.Index)
  539.             {
  540.                 case 0: //1
  541.  
  542.                     textBox1.Text = e.Acceleration.ToString();
  543.                     break;
  544.                 case 1:
  545.                     textBox2.Text = e.Acceleration.ToString();
  546.                     break;
  547.                 case 2: //0
  548.                     textBox3.Text = e.Acceleration.ToString();
  549.                     break;
  550.             }
  551.         }
  552.  
  553.         //Attach event handler...Display the serial number of the attached 
  554.         //accelerometer to the console
  555.         static void accel_Attach(object sender, AttachEventArgs e)
  556.         {
  557.  
  558.  
  559.             Accelerometer attached = (Accelerometer)sender;
  560.  
  561.  
  562.             try
  563.             {
  564.                 attached.axes[0].Sensitivity = 0.19;
  565.                 attached.axes[1].Sensitivity = 0.19;
  566.                 if (attached.axes.Count == 3)
  567.                     attached.axes[2].Sensitivity = 0.19;
  568.  
  569.  
  570.  
  571.             }
  572.             catch (PhidgetException ex)
  573.             {
  574.                 MessageBox.Show(ex.Description);
  575.             }
  576.         } 
  577.  
  578.     }
  579. }
the error is on textBox1 - 3 instead of tbAccel0-2 {I couldn't change the names -is it part of the same problem?)

Can somebody help?
Jan 17 '11 #1
8 5906
Samuel Jones
48 New Member
can we have a snippet of your code, to see what you mean?
Jan 17 '11 #2
mrcw
82 New Member
I only get this error when I put two working programs together
Jan 17 '11 #3
Samuel Jones
48 New Member
First things first: Snippet = Relevant part of code. Not full code.

If your using Visual Studio, right click on 'InitializeComp onent();' and click 'Go to definition', then post the contents ONLY for the three textboxes.

If you can't find them, that would be your problem.

Otherwise it may be something in the code that you will post.
Jan 18 '11 #4
mrcw
82 New Member
sorry about all the code. Is this what you mean
Expand|Select|Wrap|Line Numbers
  1. this.tbAccel1 = new System.Windows.Forms.TextBox();
  2.             this.tbAccel3 = new System.Windows.Forms.TextBox();
  3.             this.tbAccel2 = new System.Windows.Forms.TextBox();
I confirm that the three textboxes are on the form design and their names are as stated. Also this only seems to happen with the accelerometer.
Jan 18 '11 #5
Samuel Jones
48 New Member
Ok. I dont know whats wrong. code looks fine.

Attach the project it a zip file to a post and ill have a deeper look.

(Under post box, click 'Go Advanced', there should be a attachments box.)
Jan 19 '11 #6
mrcw
82 New Member
not sure I've zipped it up properly

error commented out (see line 1655)

looks a bit messy remember it wip

if you get chance fix warnings about obsolete

Eventually working towards robot on wheels with two webcams for eyes and two grippers that will identify a shape of a certain colour

thanks
Attached Files
File Type: zip send.zip (276.7 KB, 170 views)
Jan 19 '11 #7
Samuel Jones
48 New Member
Sorry it took so long to reply, computer was out of action.

Ok, i looked at the file, compiled it and interestingly enough, i didn't get any errors.

Looking at your form, it is very confusing and messy.

As such i actually found you have textboxes named textbox0 - textbox8, all over the place. My suggestion is to clean up the form using tableLayoutPane ls within the groupboxes, then naming every textbox a unique name. similar to the tbAccel boxes. On that note your tbAccel boxes are numbered 0-2 in contrary to above post.

After that, see if you get errors.

Loving the robot idea. (I'm studying robotics engineering)

Sam.
Jan 21 '11 #8
mrcw
82 New Member
I put a new hard disk in my computer yesterday evening and reloaded VS2010, ran the program and didn't get any errors either - I think it must have been a problem with the VS2010 installation. I'm an electronics engineer, I much prefer repairing radars and such. my programming skills could be better. Thanks for your help, good luck with the course
Jan 21 '11 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

2
10548
by: Pkpatel | last post by:
Hi, I keep getting this error every time I try to load crystalreportviewer on a webform with a dataset. Here is the error: -------------------------------------------------------- Server Error in '/Cr_Dataset' Application. ----------------------------------------------------------- ---------------------
4
2684
by: Frawls | last post by:
Hi, I get the following error when trying to run a search on my aspx site, this error only occours if the product im searching for does not exist. Can anybody explain this please and help me with a solution, i know its probably simple but im new to the game...Cheers ----------------------------------------------------------------------- Object reference not set to an instance of an object.
1
3024
by: Martine | last post by:
Hi there! I have a problem with programmatically adding user controls to my mobile webforms. If I load my usercontrol programmatically (in the Page_Load), the object is instantiated, I have access to the methods and properties from the Page_Load, no problem there. But as soon as I want access to the user control from another procedure on the same page, I get the next error message: "Object reference not set to an instance of an...
2
1770
by: jw56578 | last post by:
why am i getting the "Object reference not set to an instance of an object" error on all page registeration tags in my project. <%@ Page Language="vb" AutoEventWireup="false" Codebehind="bid_history.aspx.vb" Inherits="dnfExchange.marketing_bid_history" %>
3
455
by: nemo | last post by:
Hi, My application works fine on the localhost but spits this error as soon as I put it on the server. I know this error occurs when an object has not been instantiated prior to a reference, but why shouldn't it happen in the localhost? Here's what the the whole error msg looks like:
3
4232
by: Adam | last post by:
We have a web site that uses .vb for the web pages and .cs for a class module. We are getting the error in .NET 2.0 and VS 2005 beta 2. It does work with .NET 1.1. When trying to access a page that needs the class module I get an error on web site: Object reference not set to an instance of an object Here is where the error is:
5
1814
by: eBob.com | last post by:
I am trying to change some Structures to Classes. The Classes now look like this ... Public Class OneAttr Public AttrName As String Public Column As String Public Caption As String End Class Public Class OneTable
7
1570
by: Brett | last post by:
I'm not sure why I keep getting this error, "Object reference not set to an instance of an object". Private Function somefunction() as string Dim MyCurrentClass As New Class1 Try For i As Integer = 0 To LinkResults.Length - 1 With MyCurrentClass.SqlCmd_Insert_LinkVB .CommandType = System.Data.CommandType.StoredProcedure
6
2221
by: kalaivanan | last post by:
hi, i am a beginner in c#. i have theoretical knowledge about object, reference and instance. but i want to know clearly about what is an object, reference and instance. can any one help me? or is there any article which can explain it. kalaivanan
4
2183
by: livmacca | last post by:
Hi, I am new to VB .Net programming and is trying to create a webpage. I encountered the following error and is totally clueless on how to make it work: ==================ERROR================================== Object reference not set to an instance of an object. Object reference not set to an instance of an object. Description: An unhandled exception occurred during the execution of the current web request. Please review the...
0
10007
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9951
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9832
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7375
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5275
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5419
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3924
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3531
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2805
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.