i don't know why i have this error in my code:

'
' Created by SharpDevelop.
' User: s11088659
' Date: 5/26/2014
' Time: 9:44 AM
' Lab 8
'
' To change this template use Tools | Options | Coding | Edit Standard Headers.
'
Public Partial Class resultex

    Public Sub New()
        ' The Me.InitializeComponent call is required for Windows Forms designer support.
        Me.InitializeComponent()

        '
        ' TODO : Add constructor code after InitializeComponents
        '
    End Sub


    Private Function area(ByVal textlenght1 As Double,ByVal textwidtd1 As Double)As Double

        Dim resultext as double

        textlenght1 = convert.ToDouble(textlenght.text)
        textwidtd1 = convert.ToDouble(textwidtd.text)

        resultext = textlenght1 * textwidtd1

        Return resultext

    End Function

    Private Sub Button1Click(ByVal sender As Object, ByVal e As system.EventArgs)'Handles Button1.Click

        Dim lenght As Double
        Dim widtd As Double
        Dim result As Double

        'If isNumeric(textlenght.Text) AndAlso Isnumeric(textwidtd.Text) Then

        lenght = convert.ToDouble(textlenght.Text)
        widtd = convert.ToDouble(textwidtd.Text)

        result  = area(lenght,widtd)

        result1.text = result.tostring("N2")

        'Else
            'Messagebox.Show("The lenght and widtd must be numeric. " _ "Area ", messageboxbuttons.OK, _ messageboxicon.Information, _ messageboxdefaultbutton.Button1)
        'End if

    End Sub



    private Sub ExitButtonClick(Byval sender As Object,Byval  e As system.EventArgs)'Handles ExitButton.Click
        me.Close()
    End Sub


    Private Sub Clearall_ButtonClick()

        'remove the text for textname.txt ,textaddress.txt,textcity.txt and textstate.txt

        me.textname.Text = " "
        me.textaddress.Text = " "
        me.textcity.Text = " "
        Me.textstate.text = " "

    End Sub



     private function  Catfunction(ByVal argurment1 As string,ByVal argument2  As String,byval argument3 as String,byval argument4 as String)as String

        Dim arg1 As string
        Dim arg2 As String
        Dim arg3 As String
        Dim arg4 As String
        Dim argureturn As String

        arg1 = convert.ToString(argu1.text)
        arg2 = convert.ToString(argu2.text)
        arg3 = convert.ToString(argu3.text)
        arg4 = convert.ToString(argu4.text)
        argureturn = convert.ToString(arguresult.text)

        argureturn = arg1 & arg2 & arg3 & arg4

        return argureturn
    End Function 


    Private Sub CatClick(ByVal sender As Object,ByVal e As system.EventArgs)

        Dim arg1 As string
        Dim arg2 As String
        Dim arg3 As String
        Dim arg4 As String
        Dim argureturn As String

        arg1 = convert.ToString(argu1.text)
        arg2 = convert.ToString(argu2.text)
        arg3 = convert.ToString(argu3.text)
        arg4 = convert.ToString(argu4.text)
        argureturn = convert.ToString(arguresult.text)

        argureturn = catfunction(arg1,arg2,arg3,arg4)

        arguresult.Text = argureturn.ToString()

    End Sub

    Private Function Sumfunction(ByVal number1 As double)As Integer

        Dim int As Integer
        Dim doub As Double
        Dim intcount As Integer

        int = convert.ToInt32(Me.textsum.Text)

        Do 
            intCount += 1
            doub += (1/intCount)
        Loop Until intCount >= int


        return doub

    End Function

    Private Sub SumbuttonClick(ByVal sender As Object,ByVal e As system.EventArgs)

        Dim int As Integer
        dim display as integer

        int = convert.ToInt32(Me.textsum.Text)

        display = sumfunction(int)

        resultsum.Text = display.tostring()

    End Sub


    Private Function Dividefunction(ByVal number1 As Integer,ByVal number2 As Double)As Integer

        Dim intCount As Integer
        Dim intSum As Double

        intCount = convert.ToInt32(textdivide.Text)

        For intCount = 1 To 100 Step 1
            If ( (intCount mod 5 = 0 Or intCount mod 6 = 0 )And Not(intCount mod 5 = 0 And intCount mod 6 = 0) )

            intSum += intCount
            End if
        Next intCount

        return intsum

    End Function

    Private Sub DividebuttonClick(ByVal sender As Object,ByVal e As system.EventArgs)

        Dim intCount As Integer
        Dim intSum As Double
        Dim result as Double

        intCount = convert.ToInt32(textdivide.Text)

        result = dividefunction(intcount,intsum)

        resultdivide.Text = result.ToString()

    End Sub


    Private Function expfunction(ByVal number1 As Integer)As double

        dim intexponent as Integer
        Dim intcount As Integer = 0
        Dim dblresult As Double = 1 

        do while intcount < intexponent 
           dblresult = dblresult * 2.0
           intcount = intcount + 1
        Loop
            Return dblresult

    End Function


End class

Thanks

'MainForm' is not a member of 'Lab_8_S11088659.My.MyProject.MyForms'. (BC30456)
the error occured in the program.vb

'
' Created by SharpDevelop.
' User: s11088659
' Date: 5/26/2014
' Time: 9:44 AM
' 
' To change this template use Tools | Options | Coding | Edit Standard Headers.
'
Imports Microsoft.VisualBasic.ApplicationServices

Namespace My
    ' This file controls the behaviour of the application.
    Partial Class MyApplication
        Public Sub New()
            MyBase.New(AuthenticationMode.Windows)
            Me.IsSingleInstance = False
            Me.EnableVisualStyles = True
            Me.SaveMySettingsOnExit = False ' MySettings are not supported in SharpDevelop.
            Me.ShutDownStyle = ShutdownMode.AfterMainFormCloses
        End Sub

        Protected Overrides Sub OnCreateMainForm( )
              Me.MainForm = My.Forms.MainForm   // here is the error
        End Sub

    End Class
End Namespace

Not sure how helpful this is going to be for you but here is how this looks in one of my projects (called B040)

        Protected Overrides Sub OnCreateMainForm()
            Me.MainForm = Global.b040.frmMain
        End Sub

I would say because class "resultex" is missing Namespace My which happens to be referenced in line #23 in "MyApplication" (Me.MainForm = My.Forms.MainForm). See line #11 & #27 in "MyApplication" for the placement (the position it should be in within "resultex").

Thanks for the reply i try it but it does not work?? any help plis..?

My previous post was incorrect. Don't add Namespace My to "resultex". Change line #23 in "MyApplication" to:

Me.MainForm = My.Forms.resultex

The format is: Me.MainForm = My.Forms.<your form name to start>

Thanks you cgenier :-) !

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.