選擇Text屬性,右邊出現(xiàn)一個向下箭頭,里面可以回車換行
成都創(chuàng)新互聯(lián)公司于2013年成立,是專業(yè)互聯(lián)網(wǎng)技術(shù)服務(wù)公司,擁有項目成都網(wǎng)站建設(shè)、成都網(wǎng)站制作網(wǎng)站策劃,項目實施與項目整合能力。我們以讓每一個夢想脫穎而出為使命,1280元芙蓉做網(wǎng)站,已為上家服務(wù),為芙蓉各地企業(yè)和個人服務(wù),聯(lián)系電話:18982081108
如果用代碼控制,那么:
Button1.Text = “123” vbCrLf "345"
'--------------------
百度VB2010(VB.NET)吧建設(shè)發(fā)展中,需要你的支持和幫助!!!
快加入我們吧!發(fā)表你的疑問,經(jīng)驗,程序,分享..
讓我們共同進步!
這就要調(diào)用API函數(shù)了
給你代碼吧
記得給點分啊
Private
Const
KeysM
=
H8000
Private
Declare
Function
GetAsyncKeyState
Lib
"user32"
(ByVal
vKey
As
Long)
As
Integer
Private
Sub
TextBox1_KeyDown(ByVal
sender
As
Object,
ByVal
e
As
System.Windows.Forms.KeyEventArgs)
Handles
TextBox1.KeyDown
Me.Text
=
e.KeyValue
If
e.KeyValue
=
Keys.ShiftKey
And
GetAsyncKeyState(160)
And
KeysM
Then
MsgBox("你按的是左SHIFT")
ElseIf
e.KeyValue
=
Keys.ShiftKey
And
GetAsyncKeyState(161)
And
KeysM
Then
MsgBox("你按的是右SHIFT")
End
If
End
Sub
Dim wz As New StreamReader(wjm) 'wz文字 這一句改一下: Dim wz As New StreamReader(wjm,System.Text.Encoding.GetEncoding("gb2312")) 'wz文字
public string hz2py(string hz) //獲得漢字的區(qū)位碼
{
byte[] sarr = System.Text.Encoding.Default.GetBytes(hz);
int len = sarr.Length;
if (len1)
{
byte[] array = new byte[2];
array = System.Text.Encoding.Default.GetBytes(hz);
int i1 = (short)(array[0] - '\0');
int i2 = (short)(array[1] - '\0');
//unicode解碼方式下的漢字碼
// array = System.Text.Encoding.Unicode.GetBytes(hz);
// int i1 = (short)(array[0] - '\0');
// int i2 = (short)(array[1] - '\0');
// int t1 = Convert.ToInt32(i1,16);
// int t2 = Convert.ToInt32(i2,16);
int tmp=i1*256+i2;
string getpychar="*";//找不到拼音碼的用*補位
if(tmp=45217tmp=45252){getpychar= "A";}
else if(tmp=45253tmp=45760){getpychar= "B";}
else if(tmp=47761tmp=46317){getpychar= "C";}
else if(tmp=46318tmp=46825){getpychar= "D";}
else if(tmp=46826tmp=47009){getpychar= "E";}
else if(tmp=47010tmp=47296){getpychar= "F";}
else if(tmp=47297tmp=47613){getpychar= "G";}
else if(tmp=47614tmp=48118){getpychar= "H";}
else if(tmp=48119tmp=49061){getpychar= "J";}
else if(tmp=49062tmp=49323){getpychar= "K";}
else if(tmp=49324tmp=49895){getpychar= "L";}
else if(tmp=49896tmp=50370){getpychar= "M";}
else if(tmp=50371tmp=50613){getpychar= "N";}
else if(tmp=50614tmp=50621){getpychar= "O";}
else if(tmp=50622tmp=50905){getpychar= "P";}
else if(tmp=50906tmp=51386){getpychar= "Q";}
else if(tmp=51387tmp=51445){getpychar= "R";}
else if(tmp=51446tmp=52217){getpychar= "S";}
else if(tmp=52218tmp=52697){getpychar= "T";}
else if(tmp=52698tmp=52979){getpychar= "W";}
else if(tmp=52980tmp=53640){getpychar= "X";}
else if(tmp=53689tmp=54480){getpychar= "Y";}
else if(tmp=54481tmp=55289){getpychar= "Z";}
return getpychar;
}
else
{
return hz;
}
}
public string transpy(string strhz) //把漢字字符串轉(zhuǎn)換成拼音碼
{
string strtemp="";
int strlen=strhz.Length;
for (int i=0;i=strlen-1;i++)
{
strtemp+=hz2py(strhz.Substring(i,1));
}
return strtemp;
}
create table tabpy(id int identity,b_begin varbinary(2),b_end varbinary(2),word varchar(2))
insert tabpy select 0xB0A1, 0xB0C4,'A'
union all select 0xB0C5, 0xB2C0,'B'
union all select 0xB2C1, 0xB4ED,'C'
union all select 0xB4EE, 0xB6E9,'D'
union all select 0xB6EA, 0xB7A1,'E'
union all select 0xB7A2, 0xB8C0,'F'
union all select 0xB8C1, 0xB9FD,'G'
union all select 0xB9FE, 0xBBF6,'H'
union all select 0xBBF7, 0xBFA5,'J'
union all select 0xBFA6, 0xC0AB,'K'
union all select 0xC0AC, 0xC2E7,'L'
union all select 0xC2E8, 0xC4C2,'M'
union all select 0xC4C3, 0xC5B5,'N'
union all select 0xC5B6, 0xC5BD,'O'
union all select 0xC5BE, 0xC6D9,'P'
union all select 0xC6DA, 0xC8BA,'Q'
union all select 0xC8BB, 0xC8F5,'R'
union all select 0xC8F6, 0xCBF9,'S'
union all select 0xCBFA, 0xCDD9,'T'
union all select 0xCDDA, 0xCEF3,'W'
union all select 0xCEF4, 0xD1B8,'X'
union all select 0xD1B9, 0xD4D0,'Y'
union all select 0xD4D1, 0xD7F9,'Z'
函數(shù):
create function getfirstpy(@a varchar(200))
returns varchar(100)
as
begin
declare @i int,@j int,@result varchar(100)
set @result=''
set @i=len(@a)
set @j=1
while @j=@i
begin
select @result=@result+word from tabpy where cast(substring(@a,@j,1) as varbinary(2)) between b_begin and b_end
set @j=@j+1
end
return @result
end
第一,VB什么時候都不是世界上使用人數(shù)最多的語言。其次,我真的不知道VB這東西有什么好的,如果說VB給當初困擾中的windows程序員們提供了一個所見即所得的UI開發(fā)環(huán)境,那么其實他們真的應(yīng)該多關(guān)注Delphi、C++
Builder。第三,.NET跟微軟的web
service也沒有一毛錢的關(guān)系,微軟第一個web
service的標準是SOAP,2000年左右出的。VB.NET與其說是VB,不如說是微軟為了挽留VB程序員做的努力。拿VB去比C++更是令人發(fā)指。第四,.NET并非一個編程語言,C#、VB.NET、托管VC、Delphi
.NET都是.NET家族的。