2016-04-14 152 views
-2
The code in VB6 is: 
------------------------------ 
Load(Inter_pol_surfex) 
------------------------------ 
The message error is: 
------------------------------ 
Name 'Load' is not declared. 
------------------------------ 

我可以收到修復此消息的代碼嗎?將VB6轉換爲VB.NET

+0

你能解釋一下嗎? –

+0

請在你的問題描述。很少有信息在這裏有效地瞭解問題。 –

回答

-1

試試這個:

Private sub Load (Inter_pol_surfex as [type of variable]) 

end sub 
+0

我不知道聲明一個空的子將解決問題... Load()是一個函數聲明在別處... –

+0

當我把代碼:Private Sub Load(ByVal Inter_pol_surfex As Single)End Sub錯誤消息是:類型'Int_pol_surf.Inter_pol_surfex'的值不能轉換爲單....我不知道用哪種類型放在那裏.. –

+0

嘗試對象類型,但我個人不喜歡使用這種類型 (你可以在分配對象時使用gettype()) 您無法找到vb6項目中的變量? – raBinn

0

我想你想顯示一種形式。在.NET中沒有Load函數來顯示錶單,您必須創建表單的實例。

更換

Load(Inter_pol_surfex) 

本:

Dim f As New Inter_pol_surfex 
f.Show() 
+0

完美地工作!非常感謝 ! –