Çó¸ßÊÖ°ïæ°ÑÕâ¸öÑ»·´ÓVBת»¯³ÉC#
VB6.0°æ±¾£º
For i = 1 To 60
Retstr(i) = ReadfromIni(App.Path & "\PointTable2.ini", "Items", "Itm" & (i))
Set oitem(i) = TheOPCitems.AddItem(Retstr(i), i)
oitem(i).IsActive = True
Next i
VB.NET°æ±¾£º
For i = 1 To 60
Retstr(i) = ReadfromIni(My.Application.Info.DirectoryPath & "\PointTable2.ini", "Items", "Itm" & (i))
oitem(i) = TheOPCitems.AddItem(Retstr(i), i)
oitem(i).IsActive = True
Next i
C# code:
for (int i = 1; i <= 60; i++)
{
Retstr(i) = ReadfromIni(App.Path & @"\PointTable2.ini", "Items", "Itm" & (i));
oitem(i) = TheOPCitems.AddItem(Retstr(i), i);
oitem(i).IsActive = True;
}
C# code:
for(int i = 1;i <=60;i++)
{
Retstr(i) = ReadfromIni(My.Application.Info.DirectoryPath + "\PointTable2.ini", "Items", "Itm" + i.ToString());
oitem(i) = TheOPCitems.AddItem(Retstr(i), i);
oitem(i).IsActive = True;
}
´ó¸ÅÊÇÕâÑù£¿
¼Ç´íÁË
Ïà¹ØÎÊ´ð£º
ΪʲôCдµÄDLLÎļþC¡¢PBÄܵ÷ÓÃVB²»Äܵ÷Óã¿
VBÀïΪʲôÓеÄDLLÖ±½Óͨ¹ýÒýÓÿÉÒÔʹÓã¿ÓеÄÐèҪͨ¹ýdeclareÉêÃ÷Íⲿº¯Êý£¿ÕâЩDLLÓÐʲô²î±ð£¿
1¡¢ÎªÊ²Ã´PBÄÜͨ¹ýDECLAREÉùÃ÷¶øVB²»ÐУ¿
2¡¢Èç¹ûÕâ¸ödllÖÐµÄ ......
TF1.text = " <_2_ZCHGZBH> " & MSFlexGrid1.TextMatrix(k, 1) & " </_2_ZCHGZBH> "
´ó¼ÒºÃ£¬ÎÒÓÃÉÏÃæÒ»¸ö¶«Î÷¸³Öµ TF1.text = & ......
vbÖÐÔõôͨ¹ýxmlÀ´½âÎöÊý¾Ý¿âÖеÄ×Ö¶ÎÖµ¡£
û°ì·¨ÓÃXML½âÎöÊý¾Ý¿âµÄ×Ö¶ÎÖµ£¬³ý·ÇÊý¾Ý¿âÖб£´æµÄÊÇXML¸ñʽµÄ×Ö·û´®Îĵµ¡£
XMLÓÃÀ´Õ¹Ê¾²ã´ÎµÄÊý¾Ý¡£
Êý¾Ý¿âÒ»°ãÊǶþάÊý¾Ý¡£
Êý¾Ý¿âÖб£´æµÄÊÇXML×Ö·û´®¸ñʽ£ ......
¸÷λ´óϺ£º
ÎÒÓÐÒ»¸öVBµ÷ÓÃË®¾§±¨±íµÄϵͳ£¬±¨±íÊÇ×÷Ϊһ¸öDesignǶÔÚVBÀïµÄ£¬½ñÌì·¢ÏÖ´òÓ¡µÚÒ»Õű¨±íÕý³££¬Í¬ÑùµÄÊý¾Ý£¬ÔÚµã´òÓ¡ÔÙµ÷ÓÃÒ»´Î¾Í»á±¨ Memory FullµÄ´íÎ󣬵«ÊÇ ......
Private Sub Check1_Click()
If Check1.Value = 1 Then
DTP1.Enabled = True
Else
DTP1.Enabled = False
End If
End Sub
Private Sub Check2_Click()
If Check2.Value = 1 Then
DTP2.Enabled = True
Else
......