.NET Framework - VB6: Immediate....
Asked By Eric van Dijken
12-Mar-10 04:53 PM
In VB6...:
Teller=6
Debug.print Teller
gibt nichts, die immediate window bleibt leer!
msgbox(Teller)
gibt auch nichts, da kommt gar kein msgbox auf!
Wass ist loss?
Eric
Debug.print
(1)
Projekt
(1)
Meinst
(1)
Dijken
(1)
Teller
(1)
Wagner
(1)
Wass
(1)
Hast
(1)
Herfried K. Wagner [MVP] replied to Eric van Dijken
Am 12.03.2010 22:53, schrieb Eric van Dijken:
Meinst Du 'MsgBox Teller' oder 'Call MsgBox(Teller)'?
Hast Du das Projekt auch mit F5 gestartet?
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
ByVal eventArgs As System.EventArgs) Handles cmdInitialize.Click Dim oCtl As System.Windows.Forms.Control Debug.Print("- -- -- -- -- -- -- -- -- -- Begin DDE Test - -- -- -- -- -- -- -- -- -- -- --") g_lInstID = 0 ' Initialize the DDE subsystem. This only needs to be done MF_POSTMSGS, 0) Then If DdeInitialize(g_lInstID, AddressOf DDECallback, APPCMD_CLIENTONLY Or MF_SENDMSGS Or MF_POSTMSGS, 0) Then Debug.Print("DDE Initialize Failure.") TranslateError() Else Debug.Print("DDE Initialize Success.") End If 'Enable the command buttons. For Each oCtl In Controls 'UPGRADE_WARNING Integer) As Integer Dim lSize As Integer Dim sBuffer As String Dim Ret As Integer Debug.Print("In client callback. uType: " & uType) Select Case uType ' This is th eevent you'll receive
s1 As String, s2 As String s1 = 3D "4, 1" s2 = 3D "4, 2" = 20 Debug.Print s1 - s2 ' -0, 100000000000001 Debug.Print CCur(s1 - s2) ' -0, 1 Debug.Print CCur(s1) - CCur(s2) ' -0, 1 Debug.Print CDbl(s1 - s2) ' -0, 100000000000001 Debug.Print CDbl(s1) - CDbl(s2) ' -0, 100000000000001 Debug.Print
253 seconds to parse 748 files containing 563302 characters then i commented out a few debug.print statements (which were called for each file of course) the time went down to 421 milliseconds is that a normal impact from debug.print? does that (421 milliseconds) sound like a reasonable amount of time to read those characters if (_FileNotFound = = false) { try { using (StreamReader sr = File.OpenText(_fileName)) { GetCommentsFromStreamReader(sr); } } catch (Exception ex) { Debug.Print(ex.Message); throw; } } } private void GetCommentsFromStreamReader(StreamReader sr) { String input; while ((input = sr.ReadLine()) ! = null quote } Since the code you posted does not actually include any non-exception calls to Debug.Print(), there is no way to know for sure. But the debug console in VS is
the issue but. Using your code fragement and ammend as follows; Set searcher = New ManagementObjectSearcher(. . .) debug.print(Now) For Each queryObj In searcher.Get() '##### debug.print(Now) '. . do work here Next 'queryObj The time difference between the 2 debug.prints is Dim Searcher As ManagementObjectSearcher, queryObj As ManagementObject Searcher = New ManagementObjectSearcher("root \ CIMV2", "SELECT * FROM Win32_Product") Debug.Print ("1 -> " & Now) For Each queryObj As ManagementObject In Searcher.Get() Debug.Print (("2 -> " & Now) . . . . . DO WORK HERE . . . . . conditional Exit here. Next 'Work's done so clean up