vb.net锚点函数 vb控件获得焦点
VB.NET自定义函数
很简单,在end select前再多加一种情况case else return "XXXx",因为你只提供了0-9这10种情况
播州网站建设公司创新互联,播州网站设计制作,有大型网站制作公司丰富经验。已为播州1000+提供企业网站建设服务。企业网站搭建\成都外贸网站制作要多少钱,请找那个售后服务好的播州做网站的公司定做!
Public Function Zuhe(ByVal qa As String) As String
Select Case qa
Case "0"
Return "1"
Case "1"
Return "3"
Case "2"
Return "4"
Case "3"
Return "6"
Case "4"
Return "2"
Case "5"
Return "8"
Case "6"
Return "9"
Case "7"
Return "7"
Case "8"
Return "5"
Case "9"
Return "0"
Case else
Return "XXXX"
End Select
End Function
在 VB.NET 中 SetWindowPos 应如何使用?
因为数据类型的不同,VB.NET调用系统API函数和VB6不太一样,VB6是这样:
Public Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal X As Long, ByVal Y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
在VB.NET中是这样调用:
DllImport("user32.dll", SetLastError:=True) _
Public Shared Function SetWindowPos(ByVal hWnd As IntPtr, ByVal hWndInsertAfter As IntPtr, ByVal X As Integer, ByVal Y As Integer, ByVal cx As Integer, ByVal cy As Integer, ByVal uFlags As SetWindowPosFlags) As Boolean
End Function
参考:
vb.net mid()函数
它本身是没法忽略空格这个功能的,只能在MID取出字符后判断是不是空格,是就放弃这个就可以了
VB.net为什么取消了“lenb”“midb”这些函数,.net又如何通过变通方法来实现?
include QtCore/QCoreApplication
#include QAxObject
#include Windows.h
int main(int argc, char *argv[])
{
//OleInitialize(0);
//CoInitialize(0);
QCoreApplication a(argc, argv);
QAxObject *asdfg = new QAxObject("Excel.Application");
return a.exec();
}
本文名称:vb.net锚点函数 vb控件获得焦点
链接URL:http://ybzwz.com/article/doedois.html