欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

VisualStudio移动开发(C#、VB.NET)Smobiler开发平台——BarcodeView控件的使用方式,.Net移动开发

程序员文章站 2022-07-05 16:01:51
...

BarcodeView控件

一、          样式一

VisualStudio移动开发(C#、VB.NET)Smobiler开发平台——BarcodeView控件的使用方式,.Net移动开发
            
    
    博客分类: .Net移动开发 .NETVisualStudio移动开发APP开发Smobiler  

  我们要实现上图中的效果,需要如下的操作:

  1. 从工具栏上的“Smobiler Components”拖动一个BarcodeView控件到窗体界面上

VisualStudio移动开发(C#、VB.NET)Smobiler开发平台——BarcodeView控件的使用方式,.Net移动开发
            
    
    博客分类: .Net移动开发 .NETVisualStudio移动开发APP开发Smobiler   

  1. 修改BarcodeView的属性
    1. BarcodeFormat属性

      设置控件类型,将BarcodeFormat属性设置为“QRCode”,让控件显示为二维码,如图1;

VisualStudio移动开发(C#、VB.NET)Smobiler开发平台——BarcodeView控件的使用方式,.Net移动开发
            
    
    博客分类: .Net移动开发 .NETVisualStudio移动开发APP开发Smobiler 

图 1设置界面

      若将BarcodeFormat属性设置为“Code128”,控件则会显示为一维码,如图2、图3。

 VisualStudio移动开发(C#、VB.NET)Smobiler开发平台——BarcodeView控件的使用方式,.Net移动开发
            
    
    博客分类: .Net移动开发 .NETVisualStudio移动开发APP开发Smobiler 

图 2设置界面

 VisualStudio移动开发(C#、VB.NET)Smobiler开发平台——BarcodeView控件的使用方式,.Net移动开发
            
    
    博客分类: .Net移动开发 .NETVisualStudio移动开发APP开发Smobiler 

图 3显示界面

  1. Location属性

      让控件显示在合适的位置(20, 60),如图4;

VisualStudio移动开发(C#、VB.NET)Smobiler开发平台——BarcodeView控件的使用方式,.Net移动开发
            
    
    博客分类: .Net移动开发 .NETVisualStudio移动开发APP开发Smobiler  

图 4

  1. Name属性

      设置控件名称为“BarcodeView1”,如图5;

VisualStudio移动开发(C#、VB.NET)Smobiler开发平台——BarcodeView控件的使用方式,.Net移动开发
            
    
    博客分类: .Net移动开发 .NETVisualStudio移动开发APP开发Smobiler  

图 5

  1. Size属性

      让BarcodeView控件大小为(80, 80),如图6;

VisualStudio移动开发(C#、VB.NET)Smobiler开发平台——BarcodeView控件的使用方式,.Net移动开发
            
    
    博客分类: .Net移动开发 .NETVisualStudio移动开发APP开发Smobiler  

图 6

  1. Text属性

      让控件被扫描后的文字显示为“http://h5.m.taobao.com/alone/message/friendqrcode.html?tag=69cd161c&code=89bf8ff”,如图7;

VisualStudio移动开发(C#、VB.NET)Smobiler开发平台——BarcodeView控件的使用方式,.Net移动开发
            
    
    博客分类: .Net移动开发 .NETVisualStudio移动开发APP开发Smobiler  

图 7

  1. Visible属性

      设置控件是否显示,将Visible属性设置为“True”,如图8;

VisualStudio移动开发(C#、VB.NET)Smobiler开发平台——BarcodeView控件的使用方式,.Net移动开发
            
    
    博客分类: .Net移动开发 .NETVisualStudio移动开发APP开发Smobiler  

图 8

      若将Visible属性设置为“False”,控件则无法显示。

  1. Modifiers属性

      设置控件的可见性级别,将Modifiers属性设置为“Public”,其他窗体则都可以访问该控件,如图9;

VisualStudio移动开发(C#、VB.NET)Smobiler开发平台——BarcodeView控件的使用方式,.Net移动开发
            
    
    博客分类: .Net移动开发 .NETVisualStudio移动开发APP开发Smobiler  

图 9

      若将Modifiers属性设置为“Private”,其他的窗体则访问不到该控件了。

  1. Enabled属性

      设置控件是否可以对用户交互作出响应,将该属性设置为“True”,则控件则可以与用户进行交互,如图10;

VisualStudio移动开发(C#、VB.NET)Smobiler开发平台——BarcodeView控件的使用方式,.Net移动开发
            
    
    博客分类: .Net移动开发 .NETVisualStudio移动开发APP开发Smobiler  

图 10

  1. GenerateMember属性

      设置控件是否生成成员变量,将该属性设置为“True”,则该控件能被其他方法引用,如图11;

VisualStudio移动开发(C#、VB.NET)Smobiler开发平台——BarcodeView控件的使用方式,.Net移动开发
            
    
    博客分类: .Net移动开发 .NETVisualStudio移动开发APP开发Smobiler  

图 11

  1. Padding属性

      设置控件边框内容间隔,默认设置为“0,0,0,0”,即控件没有边框内容间隔,如图12;

VisualStudio移动开发(C#、VB.NET)Smobiler开发平台——BarcodeView控件的使用方式,.Net移动开发
            
    
    博客分类: .Net移动开发 .NETVisualStudio移动开发APP开发Smobiler  

图 12

  1. Format属性

      设置文本格式,默认设置为空。可以通过该属性设置文本的颜色、大小等。

  1. Smobiler窗体设计界面显示效果

VisualStudio移动开发(C#、VB.NET)Smobiler开发平台——BarcodeView控件的使用方式,.Net移动开发
            
    
    博客分类: .Net移动开发 .NETVisualStudio移动开发APP开发Smobiler  

二、          手机效果显示

VisualStudio移动开发(C#、VB.NET)Smobiler开发平台——BarcodeView控件的使用方式,.Net移动开发
            
    
    博客分类: .Net移动开发 .NETVisualStudio移动开发APP开发Smobiler