51代码网ORACLEMYSQLSQL SERVER其它数据库java/jspasp/asp.netC/C++/VC++APP应用其它语言服务器应用
您现在的位置: 51代码网 >> 其它 >> 文章正文

delphi 中文在英文系统乱码怎么办

更新时间:2013-2-17:  来源:51代码网

存在问题是 Form/ComboBox 还是不支持   for i := 0 to Screen.FormCount - 1 do    for j := 0 to Screen.Forms[i].ComponentCount - 1 do      begin        if Screen.Forms[i].Components[j].Name = '' then continue;         if Screen.Forms[i].Components[j] is TButton then          s := s + Screen.Forms[i].Name + '.' + Screen.Forms[i].Components[j].Name + '.Caption := ''' + TButton(Screen.Forms[i].Components[j]).Caption + ''';' + #13#10;           if Screen.Forms[i].Components[j] is TLabel then          s := s + Screen.Forms[i].Name + '.' + Screen.Forms[i].Components[j].Name + '.Caption := ''' + TLabel(Screen.Forms[i].Components[j]).Caption + ''';' + #13#10;           if Screen.Forms[i].Components[j] is TCheckBox then          begin            s := s + Screen.Forms[i].Name + '.' + Screen.Forms[i].Components[j].Name + '.Caption := ''' + TCheckBox(Screen.Forms[i].Components[j]).Caption + ''';' + #13#10;             if (Screen.Forms[i].Name = 'Form2') and (                 (Screen.Forms[i].Components[j].Name = 'CheckBox5') or                (Screen.Forms[i].Components[j].Name = 'CheckBox6') or                (Screen.Forms[i].Components[j].Name = 'CheckBox7')               )             then              s := s + Screen.Forms[i].Name + '.' + Screen.Forms[i].Components[j].Name + '.Hint := ''' + TCheckBox(Screen.Forms[i].Components[j]).Hint + ''';' + #13#10;           end;           if Screen.Forms[i].Components[j] is TGroupBox then          s := s + Screen.Forms[i].Name + '.' + Screen.Forms[i].Components[j].Name + '.Caption := ''' + TGroupBox(Screen.Forms[i].Components[j]).Caption + ''';' + #13#10;           if Screen.Forms[i].Components[j] is TTabSheet then          s := s + Screen.Forms[i].Name + '.' + Screen.Forms[i].Components[j].Name + '.Caption := ''' + TTabSheet(Screen.Forms[i].Components[j]).Caption + ''';' + #13#10;           if Screen.Forms[i].Components[j] is TMenuItem then          s := s + Screen.Forms[i].Name + '.' + Screen.Forms[i].Components[j].Name + '.Caption := ''' + TMenuItem(Screen.Forms[i].Components[j]).Caption + ''';' + #13#10;           if (Screen.Forms[i].Name = 'Form5') and (Screen.Forms[i].Components[j].Name = 'Memo1') then          if Screen.Forms[i].Components[j] is TMemo then              for k := 0 to TMemo(Screen.Forms[i].Components[j]).Lines.Count - 1 do                s := s + Screen.Forms[i].Name + '.' + Screen.Forms[i].Components[j].Name + '.Lines.Strings[' + inttostr(k) + '] := ''' + TMemo(Screen.Forms[i].Components[j]).Lines.Strings[k] + ''';' + #13#10;           if (Screen.Forms[i].Name = 'Form2') and (             (Screen.Forms[i].Components[j].Name = 'Image3') or            (Screen.Forms[i].Components[j].Name = 'Image4') or            (Screen.Forms[i].Components[j].Name = 'Image5')           )         then          if Screen.Forms[i].Components[j] is TImage then            s := s + Screen.Forms[i].Name + '.' + Screen.Forms[i].Components[j].Name + '.Hint := ''' + TImage(Screen.Forms[i].Components[j]).Hint + ''';' + #13#10;           if (             (Screen.Forms[i].Name = 'Form1') and (               (Screen.Forms[i].Components[j].Name = 'ComboBox3') or              (Screen.Forms[i].Components[j].Name = 'ComboBox4') or              (Screen.Forms[i].Components[j].Name = 'ComboBox6')             )           ) or          (             (Screen.Forms[i].Name = 'Form2') and (               (Screen.Forms[i].Components[j].Name = 'ComboBox2') or              (Screen.Forms[i].Components[j].Name = 'ComboBox3')             )           )         then          if Screen.Forms[i].Components[j] is TComboBox then            begin              for k := 0 to TComboBox(Screen.Forms[i].Components[j]).Items.Count - 1 do                s := s + Screen.Forms[i].Name + '.' + Screen.Forms[i].Components[j].Name + '.Items.Strings[' + inttostr(k) + '] := ''' + TComboBox(Screen.Forms[i].Components[j]).Items.Strings[k] + ''';' + #13#10;             end;           if Screen.Forms[i].Components[j] is TStatusBar then          begin            for k := 0 to TStatusBar(Screen.Forms[i].Components[j]).Panels.Count - 1 do              s := s + Screen.Forms[i].Name + '.' + Screen.Forms[i].Components[j].Name + '.Panels[' + inttostr(k) + '].Text := ''' + TStatusBar(Screen.Forms[i].Components[j]).Panels[k].Text + ''';' + #13#10;           end;           if Screen.Forms[i].Components[j] is TListView then          begin            for k := 0 to TListView(Screen.Forms[i].Components[j]).Columns.Count - 1 do              s := s + Screen.Forms[i].Name + '.' + Screen.Forms[i].Components[j].Name + '.Columns[' + inttostr(k) + '].Caption := ''' + TListView(Screen.Forms[i].Components[j]).Columns[k].Caption + ''';' + #13#10;           end;       end;

上一页  [1] [2] 

  • 上一篇文章:
  • 下一篇文章: 没有了
  • 赞助商链接
    推荐文章
  • 此栏目下没有推荐文章
  • {
    设为首页 | 加入收藏 | 友情链接 | 网站地图 | 联系站长 |