Duplicate ghost form

Discussion in 'Questions (Windows Mobile)' started by michaelm, Aug 22, 2009.

  1. michaelm

    michaelm Member Licensed User

    I have a form that keeps appearing even though I have deleted it. Any ideas as to what may be causing this?
     
  2. Zenerdiode

    Zenerdiode Active Member Licensed User

    If you post your *.sbp file we'll have a look.
     
  3. klaus

    klaus Expert Licensed User

    Could you be more precise on what you have done and where.
    Desktop IDE, device IDE ?
    Do you have modules ?
    Source code example ?

    Best regards.
     
  4. michaelm

    michaelm Member Licensed User

    I'm a newbie. What is that?
     
  5. michaelm

    michaelm Member Licensed User

    I think the problem began when I hid a module. Now I can't see it anymore. I think the form exists in that module.
     
  6. michaelm

    michaelm Member Licensed User

    This is the entire code:

    Sub Globals
    'Declare the global variables here.
    End Sub

    Sub App_Start
    Form101.Show
    Time1.Text=DateM & "/" & DateD & "/" & DateY & " " & TimeH & ":" & TimeM & ":" & TimeS
    Sub btnFav_Click
    AddTable ("Form101", "Table10", 80, 5, 140, 120)
    Table10.AddCol (cString, "Item", 200)
    Table10.AddCol (cString, "Carbs", 50)
    Table10.LoadCSV ("FoodDat.csv", ",", False, False)
    AddTable ("Form101", "Table20", 80, 160, 140, 100)
    Table20.AddCol (cString, "Selected_Items", 100)
    Table20.AddCol (cString, "Carbs", 50)
    End Sub
    Sub btnSelect_Click
    Table20.AddRow (Table10.Cell ("Item", Table10.SelectedRow),Table10.Cell ("Carbs", Table10.SelectedRow))
    If Table20.RowCount=1 Then
    label1.Text=Table20.Cell ("Carbs", 0)
    Else If Table20.RowCount=2 Then
    label1.Text=Table20.Cell ("Carbs", 0)+Table20.Cell ("Carbs", 1)
    Else If Table20.RowCount=3 Then
    label1.Text=Table20.Cell ("Carbs", 0)+Table20.Cell ("Carbs", 1)+Table20.Cell ("Carbs", 2)
    Else If Table20.RowCount=4 Then
    label1.Text=Table20.Cell ("Carbs", 0)+Table20.Cell ("Carbs", 1)+Table20.Cell ("Carbs", 2)+Table20.Cell ("Carbs", 3)
    Else If Table20.RowCount=5 Then
    label1.Text=Table20.Cell ("Carbs", 0)+Table20.Cell ("Carbs", 1)+Table20.Cell ("Carbs", 2)+Table20.Cell ("Carbs", 3)+Table20.Cell ("Carbs", 4)
    Else If Table20.RowCount=6 Then
    label1.Text=Table20.Cell ("Carbs", 0)+Table20.Cell ("Carbs", 1)+Table20.Cell ("Carbs", 2)+Table20.Cell ("Carbs", 3)+Table20.Cell ("Carbs", 4)+Table20.Cell ("Carbs", 5)
    Else If Table20.RowCount=7 Then
    label1.Text=Table20.Cell ("Carbs", 0)+Table20.Cell ("Carbs", 1)+Table20.Cell ("Carbs", 2)+Table20.Cell ("Carbs", 3)+Table20.Cell ("Carbs", 4)+Table20.Cell ("Carbs", 5)+Table20.Cell ("Carbs", 6)
    Else If Table20.RowCount=8 Then
    label1.Text=Table20.Cell ("Carbs", 0)+Table20.Cell ("Carbs", 1)+Table20.Cell ("Carbs", 2)+Table20.Cell ("Carbs", 3)+Table20.Cell ("Carbs", 4)+Table20.Cell ("Carbs", 5)+Table20.Cell ("Carbs", 6)+Table20.Cell ("Carbs", 7)
    Else If Table20.RowCount=9 Then
    label1.Text=Table20.Cell ("Carbs", 0)+Table20.Cell ("Carbs", 1)+Table20.Cell ("Carbs", 2)+Table20.Cell ("Carbs", 3)+Table20.Cell ("Carbs", 4)+Table20.Cell ("Carbs", 5)+Table20.Cell ("Carbs", 6)+Table20.Cell ("Carbs", 7)+Table20.Cell ("Carbs", 8)
    Else If Table20.RowCount=10 Then
    label1.Text=Table20.Cell ("Carbs", 0)+Table20.Cell ("Carbs", 1)+Table20.Cell ("Carbs", 2)+Table20.Cell ("Carbs", 3)+Table20.Cell ("Carbs", 4)+Table20.Cell ("Carbs", 5)+Table20.Cell ("Carbs", 6)+Table20.Cell ("Carbs", 7)+Table20.Cell ("Carbs", 8)+Table20.Cell ("Carbs", 9)
    Else If Table20.RowCount=11 Then
    label1.Text=Table20.Cell ("Carbs", 0)+Table20.Cell ("Carbs", 1)+Table20.Cell ("Carbs", 2)+Table20.Cell ("Carbs", 3)+Table20.Cell ("Carbs", 4)+Table20.Cell ("Carbs", 5)+Table20.Cell ("Carbs", 6)+Table20.Cell ("Carbs", 7)+Table20.Cell ("Carbs", 8)+Table20.Cell ("Carbs", 9)+Table20.Cell ("Carbs", 10)
    Else If Table20.RowCount=12 Then
    label1.Text=Table20.Cell ("Carbs", 0)+Table20.Cell ("Carbs", 1)+Table20.Cell ("Carbs", 2)+Table20.Cell ("Carbs", 3)+Table20.Cell ("Carbs", 4)+Table20.Cell ("Carbs", 5)+Table20.Cell ("Carbs", 6)+Table20.Cell ("Carbs", 7)+Table20.Cell ("Carbs", 8)+Table20.Cell ("Carbs", 9)+Table20.Cell ("Carbs", 10)+Table20.Cell ("Carbs", 11)
    Else If Table20.RowCount=13 Then
    label1.Text=Table20.Cell ("Carbs", 0)+Table20.Cell ("Carbs", 1)+Table20.Cell ("Carbs", 2)+Table20.Cell ("Carbs", 3)+Table20.Cell ("Carbs", 4)+Table20.Cell ("Carbs", 5)+Table20.Cell ("Carbs", 6)+Table20.Cell ("Carbs", 7)+Table20.Cell ("Carbs", 8)+Table20.Cell ("Carbs", 9)+Table20.Cell ("Carbs", 10)+Table20.Cell ("Carbs", 11)+Table20.Cell ("Carbs", 12)
    Else If Table20.RowCount=14 Then
    label1.Text=Table20.Cell ("Carbs", 0)+Table20.Cell ("Carbs", 1)+Table20.Cell ("Carbs", 2)+Table20.Cell ("Carbs", 3)+Table20.Cell ("Carbs", 4)+Table20.Cell ("Carbs", 5)+Table20.Cell ("Carbs", 6)+Table20.Cell ("Carbs", 7)+Table20.Cell ("Carbs", 8)+Table20.Cell ("Carbs", 9)+Table20.Cell ("Carbs", 10)+Table20.Cell ("Carbs", 11)+Table20.Cell ("Carbs", 12)+Table20.Cell ("Carbs", 13)
    Else If Table20.RowCount=15 Then
    label1.Text=Table20.Cell ("Carbs", 0)+Table20.Cell ("Carbs", 1)+Table20.Cell ("Carbs", 2)+Table20.Cell ("Carbs", 3)+Table20.Cell ("Carbs", 4)+Table20.Cell ("Carbs", 5)+Table20.Cell ("Carbs", 6)+Table20.Cell ("Carbs", 7)+Table20.Cell ("Carbs", 8)+Table20.Cell ("Carbs", 9)+Table20.Cell ("Carbs", 10)+Table20.Cell ("Carbs", 11)+Table20.Cell ("Carbs", 12)+Table20.Cell ("Carbs", 13)+Table20.Cell ("Carbs", 14)
    End If
    label2.Text=label1.Text/9
    End Sub
    Sub btnRemove_Click
    If Table20.RowCount=0 Then label1.Text =0 Else Table20.RemoveRow (Table20.SelectedRow)

    If Table20.RowCount=1 Then
    label1.Text=Table20.Cell ("Carbs", 0)
    Else If Table20.RowCount=2 Then
    label1.Text=Table20.Cell ("Carbs", 0)+Table20.Cell ("Carbs", 1)
    Else If Table20.RowCount=3 Then
    label1.Text=Table20.Cell ("Carbs", 0)+Table20.Cell ("Carbs", 1)+Table20.Cell ("Carbs", 2)
    Else If Table20.RowCount=4 Then
    label1.Text=Table20.Cell ("Carbs", 0)+Table20.Cell ("Carbs", 1)+Table20.Cell ("Carbs", 2)+Table20.Cell ("Carbs", 3)
    Else If Table20.RowCount=5 Then
    label1.Text=Table20.Cell ("Carbs", 0)+Table20.Cell ("Carbs", 1)+Table20.Cell ("Carbs", 2)+Table20.Cell ("Carbs", 3)+Table20.Cell ("Carbs", 4)
    Else If Table20.RowCount=6 Then
    label1.Text=Table20.Cell ("Carbs", 0)+Table20.Cell ("Carbs", 1)+Table20.Cell ("Carbs", 2)+Table20.Cell ("Carbs", 3)+Table20.Cell ("Carbs", 4)+Table20.Cell ("Carbs", 5)
    Else If Table20.RowCount=7 Then
    label1.Text=Table20.Cell ("Carbs", 0)+Table20.Cell ("Carbs", 1)+Table20.Cell ("Carbs", 2)+Table20.Cell ("Carbs", 3)+Table20.Cell ("Carbs", 4)+Table20.Cell ("Carbs", 5)+Table20.Cell ("Carbs", 6)
    Else If Table20.RowCount=8 Then
    label1.Text=Table20.Cell ("Carbs", 0)+Table20.Cell ("Carbs", 1)+Table20.Cell ("Carbs", 2)+Table20.Cell ("Carbs", 3)+Table20.Cell ("Carbs", 4)+Table20.Cell ("Carbs", 5)+Table20.Cell ("Carbs", 6)+Table20.Cell ("Carbs", 7)
    Else If Table20.RowCount=9 Then
    label1.Text=Table20.Cell ("Carbs", 0)+Table20.Cell ("Carbs", 1)+Table20.Cell ("Carbs", 2)+Table20.Cell ("Carbs", 3)+Table20.Cell ("Carbs", 4)+Table20.Cell ("Carbs", 5)+Table20.Cell ("Carbs", 6)+Table20.Cell ("Carbs", 7)+Table20.Cell ("Carbs", 8)
    Else If Table20.RowCount=10 Then
    label1.Text=Table20.Cell ("Carbs", 0)+Table20.Cell ("Carbs", 1)+Table20.Cell ("Carbs", 2)+Table20.Cell ("Carbs", 3)+Table20.Cell ("Carbs", 4)+Table20.Cell ("Carbs", 5)+Table20.Cell ("Carbs", 6)+Table20.Cell ("Carbs", 7)+Table20.Cell ("Carbs", 8)+Table20.Cell ("Carbs", 9)
    Else If Table20.RowCount=11 Then
    label1.Text=Table20.Cell ("Carbs", 0)+Table20.Cell ("Carbs", 1)+Table20.Cell ("Carbs", 2)+Table20.Cell ("Carbs", 3)+Table20.Cell ("Carbs", 4)+Table20.Cell ("Carbs", 5)+Table20.Cell ("Carbs", 6)+Table20.Cell ("Carbs", 7)+Table20.Cell ("Carbs", 8)+Table20.Cell ("Carbs", 9)+Table20.Cell ("Carbs", 10)
    Else If Table20.RowCount=12 Then
    label1.Text=Table20.Cell ("Carbs", 0)+Table20.Cell ("Carbs", 1)+Table20.Cell ("Carbs", 2)+Table20.Cell ("Carbs", 3)+Table20.Cell ("Carbs", 4)+Table20.Cell ("Carbs", 5)+Table20.Cell ("Carbs", 6)+Table20.Cell ("Carbs", 7)+Table20.Cell ("Carbs", 8)+Table20.Cell ("Carbs", 9)+Table20.Cell ("Carbs", 10)+Table20.Cell ("Carbs", 11)
    Else If Table20.RowCount=13 Then
    label1.Text=Table20.Cell ("Carbs", 0)+Table20.Cell ("Carbs", 1)+Table20.Cell ("Carbs", 2)+Table20.Cell ("Carbs", 3)+Table20.Cell ("Carbs", 4)+Table20.Cell ("Carbs", 5)+Table20.Cell ("Carbs", 6)+Table20.Cell ("Carbs", 7)+Table20.Cell ("Carbs", 8)+Table20.Cell ("Carbs", 9)+Table20.Cell ("Carbs", 10)+Table20.Cell ("Carbs", 11)+Table20.Cell ("Carbs", 12)
    Else If Table20.RowCount=14 Then
    label1.Text=Table20.Cell ("Carbs", 0)+Table20.Cell ("Carbs", 1)+Table20.Cell ("Carbs", 2)+Table20.Cell ("Carbs", 3)+Table20.Cell ("Carbs", 4)+Table20.Cell ("Carbs", 5)+Table20.Cell ("Carbs", 6)+Table20.Cell ("Carbs", 7)+Table20.Cell ("Carbs", 8)+Table20.Cell ("Carbs", 9)+Table20.Cell ("Carbs", 10)+Table20.Cell ("Carbs", 11)+Table20.Cell ("Carbs", 12)+Table20.Cell ("Carbs", 13)
    Else If Table20.RowCount=15 Then
    label1.Text=Table20.Cell ("Carbs", 0)+Table20.Cell ("Carbs", 1)+Table20.Cell ("Carbs", 2)+Table20.Cell ("Carbs", 3)+Table20.Cell ("Carbs", 4)+Table20.Cell ("Carbs", 5)+Table20.Cell ("Carbs", 6)+Table20.Cell ("Carbs", 7)+Table20.Cell ("Carbs", 8)+Table20.Cell ("Carbs", 9)+Table20.Cell ("Carbs", 10)+Table20.Cell ("Carbs", 11)+Table20.Cell ("Carbs", 12)+Table20.Cell ("Carbs", 13)+Table20.Cell ("Carbs", 14)
    End If
    label2.Text=label1.Text/9
    label3.Text=txtBG.text
    End Sub


    Sub btnLog_Click

    AddTable ("Form12", "Table22", 10, 5, 200, 120)
    Table22.LoadCSV ("log.csv", ",", False, True)
    Table22.AddRow (time1.text,Table20.Cell ("Selected_Items", Table20.SelectedRow),label1.Text,label2.Text,txtbg.text)
    Table22.tablesort("column1 DESC")
    Table22.SaveCSV ("Log.csv", "," ,False)
    Msgbox("Entry Saved.")
    Form101.Close
    End Sub





    Sub btnSave_Click
    AddTable ("Form12", "Table22", 10, 5, 200, 120)
    Table22.LoadCSV ("FoodDat.csv", ",", False, True)
    Table22.AddRow (FoodName.Text,label1.Text)
    Table22.tablesort("column1 DESC")
    Table22.SaveCSV ("FoodDat.csv", "," ,False)
    Msgbox("Entry Saved.")
    End Sub

    Sub btnFood_Click
    AddTable ("Form101", "Table10", 80, 5, 140, 120)
    Table10.AddCol (cString, "Item", 200)
    Table10.AddCol (cString, "Carbs", 50)
    Table10.LoadCSV ("FoodData.csv", ",", False, False)
    AddTable ("Form101", "Table20", 80, 160, 140, 100)
    Table20.AddCol (cString, "Selected_Items", 100)
    Table20.AddCol (cString, "Carbs", 50)
    End Sub

    Sub btnLow_Click
    AddTable ("Form12", "Table22", 10, 5, 200, 120)
    Table22.LoadCSV ("log.csv", ",", False, True)
    Table22.AddRow (time1.text,"LOW BLOOD GLUCOSE","","",txtbg.text)
    Table22.tablesort("column1 DESC")
    Table22.SaveCSV ("Log.csv", "," ,False)
    Msgbox("Entry Saved.")
    End Sub
     
  7. klaus

    klaus Expert Licensed User

    Sorry but you must post your sbp file!
    Just the code in the post is not enough to check what happens.

    Best regards.
     
  8. michaelm

    michaelm Member Licensed User

    Nevermind. I'm an idiot. Got it figured out.

    Thanks for the help though!:sign0013:
     
  9. Ariel_Z

    Ariel_Z Active Member Licensed User

    You probably made a mistake many others did. It might be helpful for many of us if you could explain what it was?
     
  10. Cableguy

    Cableguy Expert Licensed User

    In Portugal, an Idiot, is called "Idiota", wich I freely (very freely) translate to:
    Someone who has lots of Ideas"

    SO in MY way of seeing things we all are Idiots!!!
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice