請(qǐng)幫忙解釋一個(gè)VB小程序的原碼下半部分
'//////////////用Inet控件連接到
www.ip138.com
獲取外網(wǎng)IP
'//////////////瀏覽器中打開(kāi)也可以看到
ip_gw=Inet1.OpenURL("http://
www.ip138.com
ip_gw=Mid$(ip_gw,InStr(ip_gw,"您的IP地址是"),20)
ip_gw=Replace(ip_gw,"您的IP地址是","")
ip_gw=Replace(ip_gw,":","")
ip_gw=Replace(ip_gw,"'","")
ip_gw=Replace(ip_gw,":","")
ip_gw=Replace(ip_gw,"<","")
ip_gw=Replace(ip_gw,">","")
ip_gw=Replace(ip_gw,"/","")
ip_gw=Replace(ip_gw,"f","")
ip_gw=Replace(ip_gw,"o","")
ip_gw=Replace(ip_gw,"r","")
ip_gw=Replace(ip_gw,"t","")
ip_gw=Replace(ip_gw,"p","")
ip_gw=Replace(ip_gw,"d","")
Text3.Text=ip_gw
DimstAsString*100
DimplnAsLong
pln=99
GetUserNamest,pln'///////獲取Windows的登錄用戶名
Text4.Text=Left$(st,pln)
Text2.Text=Winsock1.LocalHostName
IfText4.Text=""Then
Label6.Caption="正在查詢中"
Label6.Caption="完成"
EndIf
EndSub
'/////////退出的時(shí)候刪除托盤(pán)圖標(biāo)
PrivateSubForm_QueryUnload(CancelAsInteger,UnloadModeAsInteger)
CallShell_NotifyIcon(NIM_DELETE,nfIconData)
EndSub
'//////////接受托盤(pán)圖標(biāo)的消息
PrivateSubForm_MouseMove(ButtonAsInteger,ShiftAsInteger,XAsSingle,YAsSingle)
DimlMsgAsSingle
lMsg=X/Screen.TwipsPerPixelX
SelectCaselMsg
CaseWM_LBUTTONUP
'MsgBox"請(qǐng)用鼠標(biāo)右鍵點(diǎn)擊圖標(biāo)!",vbInformation,"IP查詢器"
'單擊左鍵,顯示窗體
ShowWindowMe.hWnd,SW_RESTORE
'下面兩句的目的是把窗口顯示在窗口最頂層
'Me.Show
'Me.SetFocus
''CaseWM_RBUTTONUP
''PopupMenuMenuTray'如果是在系統(tǒng)Tray圖標(biāo)上點(diǎn)右鍵,則彈出菜單MenuTray
''CaseWM_MOUSEMOVE
''CaseWM_LBUTTONDOWN
''CaseWM_LBUTTONDBLCLK
''CaseWM_RBUTTONDOWN
''CaseWM_RBUTTONDBLCLK
''CaseElse
EndSelect
EndSub
'///////////////類(lèi)模塊代碼都是托盤(pán)圖標(biāo)相關(guān)的API函數(shù)聲明
OptionExplicit
PublicConstMAX_TOOLTIPAsInteger=64
PublicConstNIF_ICON=&H2
PublicConstNIF_MESSAGE=&H1
PublicConstNIF_TIP=&H4
PublicConstNIM_ADD=&H0
PublicConstNIM_DELETE=&H2
PublicConstWM_MOUSEMOVE=&H200
PublicConstWM_LBUTTONDOWN=&H201
PublicConstWM_LBUTTONUP=&H202
PublicConstWM_LBUTTONDBLCLK=&H203
PublicConstWM_RBUTTONDOWN=&H204
PublicConstWM_RBUTTONUP=&H205
PublicConstWM_RBUTTONDBLCLK=&H206
PublicConstSW_RESTORE=9
PublicConstSW_HIDE=0
PublicnfIconDataAsNOTIFYICONDATA
PublicTypeNOTIFYICONDATA
cbSizeAsLong
hWndAsLong
uIDAsLong
uFlagsAsLong
uCallbackMessageAsLong
hIconAsLong
szTipAsString*MAX_TOOLTIP
EndType
PublicDeclareFunctionShowWindowLib"user32"(ByValhWndAsLong,ByValnCmdShowAsLong)AsLong
PublicDeclareFunctionShell_NotifyIconLib"shell32.dll"Alias"Shell_NotifyIconA"(ByValdwMessageAsLong,lpDataAsNOTIFYICONDATA)AsLong
本回答由提問(wèn)者推薦
請(qǐng)幫忙解釋一個(gè)VB小程序的原碼下半部分
'//////////////用Inet控件連接到
www.ip138.com
獲取外網(wǎng)IP
'//////////////瀏覽器中打開(kāi)也可以看到
ip_gw=Inet1.OpenURL("http://
www.ip138.com
ip_gw=Mid$(ip_gw,InStr(ip_gw,"您的IP地址是"),20)
ip_gw=Replace(ip_gw,"您的IP地址是","")
ip_gw=Replace(ip_gw,":","")
ip_gw=Replace(ip_gw,"'","")
ip_gw=Replace(ip_gw,":","")
ip_gw=Replace(ip_gw,"<","")
ip_gw=Replace(ip_gw,">","")
ip_gw=Replace(ip_gw,"/","")
ip_gw=Replace(ip_gw,"f","")
ip_gw=Replace(ip_gw,"o","")
ip_gw=Replace(ip_gw,"r","")
ip_gw=Replace(ip_gw,"t","")
ip_gw=Replace(ip_gw,"p","")
ip_gw=Replace(ip_gw,"d","")
Text3.Text=ip_gw
DimstAsString*100
DimplnAsLong
pln=99
GetUserNamest,pln'///////獲取Windows的登錄用戶名
Text4.Text=Left$(st,pln)
Text2.Text=Winsock1.LocalHostName
IfText4.Text=""Then
Label6.Caption="正在查詢中"
Label6.Caption="完成"
EndIf
EndSub
'/////////退出的時(shí)候刪除托盤(pán)圖標(biāo)
PrivateSubForm_QueryUnload(CancelAsInteger,UnloadModeAsInteger)
CallShell_NotifyIcon(NIM_DELETE,nfIconData)
EndSub
'//////////接受托盤(pán)圖標(biāo)的消息
PrivateSubForm_MouseMove(ButtonAsInteger,ShiftAsInteger,XAsSingle,YAsSingle)
DimlMsgAsSingle
lMsg=X/Screen.TwipsPerPixelX
SelectCaselMsg
CaseWM_LBUTTONUP
'MsgBox"請(qǐng)用鼠標(biāo)右鍵點(diǎn)擊圖標(biāo)!",vbInformation,"IP查詢器"
'單擊左鍵,顯示窗體
ShowWindowMe.hWnd,SW_RESTORE
'下面兩句的目的是把窗口顯示在窗口最頂層
'Me.Show
'Me.SetFocus
''CaseWM_RBUTTONUP
''PopupMenuMenuTray'如果是在系統(tǒng)Tray圖標(biāo)上點(diǎn)右鍵,則彈出菜單MenuTray
''CaseWM_MOUSEMOVE
''CaseWM_LBUTTONDOWN
''CaseWM_LBUTTONDBLCLK
''CaseWM_RBUTTONDOWN
''CaseWM_RBUTTONDBLCLK
''CaseElse
EndSelect
EndSub
'///////////////類(lèi)模塊代碼都是托盤(pán)圖標(biāo)相關(guān)的API函數(shù)聲明
OptionExplicit
PublicConstMAX_TOOLTIPAsInteger=64
PublicConstNIF_ICON=&H2
PublicConstNIF_MESSAGE=&H1
PublicConstNIF_TIP=&H4
PublicConstNIM_ADD=&H0
PublicConstNIM_DELETE=&H2
PublicConstWM_MOUSEMOVE=&H200
PublicConstWM_LBUTTONDOWN=&H201
PublicConstWM_LBUTTONUP=&H202
PublicConstWM_LBUTTONDBLCLK=&H203
PublicConstWM_RBUTTONDOWN=&H204
PublicConstWM_RBUTTONUP=&H205
PublicConstWM_RBUTTONDBLCLK=&H206
PublicConstSW_RESTORE=9
PublicConstSW_HIDE=0
PublicnfIconDataAsNOTIFYICONDATA
PublicTypeNOTIFYICONDATA
cbSizeAsLong
hWndAsLong
uIDAsLong
uFlagsAsLong
uCallbackMessageAsLong
hIconAsLong
szTipAsString*MAX_TOOLTIP
EndType
PublicDeclareFunctionShowWindowLib"user32"(ByValhWndAsLong,ByValnCmdShowAsLong)AsLong
PublicDeclareFunctionShell_NotifyIconLib"shell32.dll"Alias"Shell_NotifyIconA"(ByValdwMessageAsLong,lpDataAsNOTIFYICONDATA)AsLong
本回答由提問(wèn)者推薦
小程序源碼下載去什么網(wǎng)站
源碼一般沒(méi)有免費(fèi)下載的, 有也是不完整的,再說(shuō)你不熟悉你敢用? 你看看這個(gè)小程序吧不知道是不是你想要的?網(wǎng)頁(yè)鏈接?, 希望可以幫助到你
微信小程序商城后臺(tái)源碼怎么使用
那樣問(wèn)題會(huì)很多,因?yàn)榻柚咎炜屯ā恳绘I生成的小程序,壓根不需要源碼,也不需要編程技術(shù),只要會(huì)打字,就會(huì)制作小程序。
以上就是【你一定得知道!小程序制作網(wǎng)站原碼(微信小程序原碼)】的全部?jī)?nèi)容。


評(píng)論