Answered Chinese os, english small basic

  • Thursday, October 11, 2012 12:33 PM
     
     
    I have chinese os, but I want to use english small basic. How do I do this?

All Replies

  • Thursday, October 11, 2012 2:00 PM
     
     
    You could change the language of your os to English. Then SB should be automaticelly in English too.

    Greetings Timo

  • Thursday, October 11, 2012 2:36 PM
    Answerer
     
     Answered

    At setup of Small Basic, you can choose English version of Small Basic.

    Small Basic Languages


    Nonki Takahashi

  • Thursday, October 11, 2012 7:28 PM
    Answerer
     
     
    AFAIK, Small Basic always installs its English version. Just take a peek at Programs Menu and you'll see the English shortcut along any other languages which were chosen to be installed as well!

    Click on "Propose As Answer" if some post solves your problem or "Vote As Helpful" if some post has been useful to you! (^_^)

  • Friday, October 12, 2012 12:50 AM
    Answerer
     
     

    You can create a new shorcut to your Small Basic with option language option.

    Example: "c:\Program Files\Microsoft\Small Basic\SB.exe" /l:en-us

  • Thursday, October 18, 2012 12:08 PM
     
     
    thx! this works!
  • Thursday, October 18, 2012 4:04 PM
     
     
    Can you mark this as answered so that it's easier to see unanswered questions?

    I am a 10 year old that loves math, games, and computers. 'Binary is as easy as 1, 10, 11.'

  • Friday, October 19, 2012 1:39 AM
     
     
    I have chinese os, but I want to use english small basic. How do I do this?

     I am from china,This is my SmallBasic-Excel Extension below,Built it youself.

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Data;
    using System.ComponentModel;
    using System.Data.OleDb;
    using System.IO;
    using Microsoft.SmallBasic.Library;

    namespace ADOEXCEL
    {
        /// <summary>
        /// 使用ADO操作Excel
        /// </summary>
        [SmallBasicType]
        public class M_AdoExcel
        {
            //一些普通的公有函数
            ///<summary>判断文件是否存在,是否删除</summary>
            ///<param name="FileName">含路径文件名</param>
            ///<param name="Flag">取1删除文件,其它文件不删除</param>
            ///<returns>返回值.成功1,失败0</returns>
            public static Primitive M_FileExistDelete(Primitive FileName,Primitive Flag)
            {
                if (System.IO.File.Exists(FileName))
                {
                    if (Flag==1)
                    System.IO.File.Delete(FileName);
                    return 1;
                }
                else
                {
                    return 0;
                }
               
            }
            /// <summary>执行建立工作簿,增加和修改记录等SQL命令</summary>
            /// <param name="FileName">带路径的文件名</param>
            /// <param name="SQLState">无返回值的SQL语句</param>
            /// <returns>返回值.成功返回被影响的行数,失败-1</returns>
            public static Primitive M_ExecuteNonQuery(Primitive FileName, Primitive SQLState)
            {
                int res;//返回值,被影响的行数
                try
                {
                    using (OleDbConnection conn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + FileName + ";Extended Properties='Excel 8.0;HDR=Yes'"))
                    {
                        conn.Open();
                        OleDbCommand cmd = new OleDbCommand(SQLState, conn);
                        res = cmd.ExecuteNonQuery();
                    }
                    return res;
                }
                catch (System.Exception)
                {
                    return -1;
                }
            }
            /// <summary>执行查询</summary>
            /// <param name="FileName">带路径的文件名</param>
            /// <param name="SQLState">查询语句</param>
            /// <param name="RowIndex">返回结果集的行标,只有一笔结果时,取0</param>
            /// <param name="ColIndex">返回结果集的列标,只有一列字段时,取0</param>
            /// <returns>返回值.成功返回结果串,失败ERROR</returns>
            public static Primitive M_ExecuteQuery(Primitive FileName, Primitive SQLState,Primitive RowIndex,Primitive ColIndex)
            {
                string connstring = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+FileName+";Extended Properties='Excel 8.0;HDR=Yes'";
                OleDbConnection conn = new OleDbConnection(connstring);
                try
                {
                    conn.Open();
                    System.Data.DataTable dt = new System.Data.DataTable();
                    OleDbCommand cmd = new OleDbCommand(SQLState, conn);
                    using (OleDbDataReader sdr = cmd.ExecuteReader(CommandBehavior.CloseConnection))
                    {
                        dt.Load(sdr);
                        conn.Close();
                    }
                    if (RowIndex < dt.Rows.Count)
                    {
                        string str = dt.Rows[(int)RowIndex][(int)ColIndex].ToString();
                        dt.Dispose();
                        return str;
                    }
                    else
                    {
                        return "ERROR";
                    }
                }
                catch (System.Exception)
                {
                    return "ERROR";
                }
               
            }
        }
    }

    SB demo:

    GraphicsWindow.Show()
    '创建
    XlsFile = "C:\1.xls"
    fe = M_AdoExcel.M_FileExistDelete(XlsFile,1)
    '下面的表名book1,如果取bk1,会自动变成_bk1,不知道原因
    fe_T = M_AdoExcel.M_ExecuteNonQuery(XlsFile,"CREATE TABLE  book1 ([x] char, [y] char, [z] char)")
    FB_b = M_AdoExcel.M_ExecuteNonQuery(XlsFile,"INSERT INTO [book1$] ([x], [y]) VALUES ('我是测试串','2')")
    GraphicsWindow.ShowMessage(FB_b,"")
    ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
    '以下测试,说明表创建时的字段属性,决定SQL要把EXCEL当成严格的数据库,尽管在数值字段可以在EXCEL直接输入字串,但是SQL不这么认为
    '创建
    XlsFile = "C:\2.xls"
    fe = M_AdoExcel.M_FileExistDelete(XlsFile,1)
    fe_T = M_AdoExcel.M_ExecuteNonQuery(XlsFile,"CREATE TABLE  book1 ([x] int, [y] int, [z] int)")
    '下面这句是成功的,数值字段插入数值
    a1 = M_AdoExcel.M_ExecuteNonQuery(XlsFile,"INSERT INTO [book1$] ([x], [y]) VALUES ('" + 34543543 + "','" + 2+ "')")
    GraphicsWindow.ShowMessage(a1,"")
    '下面的SQL不会成功,数值字段插入了字符串,数据库结构不允许,所以一定要用Excel当成数据库,建议字段取成"字段1c"\"字段2i"以表明字段属性
    a2 = M_AdoExcel.M_ExecuteNonQuery(XlsFile,"INSERT INTO [book1$] ([x], [y]) VALUES ('我是测试串','2')")
    GraphicsWindow.ShowMessage(a2,"")
    '用唯一性字段统计记录有多少笔,行列是0基数的
    b = M_AdoExcel.M_ExecuteQuery(XlsFile,"SELECT count(*) FROM [book1$]",0,0)
    GraphicsWindow.ShowMessage(b,"")