<?xml version="1.0" encoding="ISO-8859-1"?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>CodeGuru Forums - Visual Basic 6.0 Programming</title>
		<link>http://forums.codeguru.com</link>
		<description>Ask questions about VB 6.0 (or earlier versions) or help others by answering their question.</description>
		<language>en</language>
		<lastBuildDate>Wed, 16 May 2012 13:48:27 GMT</lastBuildDate>
		<generator>vBulletin</generator>
		<ttl>60</ttl>
		<image>
			<url>http://forums.codeguru.com/images/misc/rss.jpg</url>
			<title>CodeGuru Forums - Visual Basic 6.0 Programming</title>
			<link>http://forums.codeguru.com</link>
		</image>
		<item>
			<title>Remote Debugging in Visual Basic 6.0</title>
			<link>http://forums.codeguru.com/showthread.php?t=523827&amp;goto=newpost</link>
			<pubDate>Wed, 16 May 2012 13:21:44 GMT</pubDate>
			<description><![CDATA[:wave:Hello everybody!!

I want to debug my visual basic 6.0 application on the remote computer.

For example:
The application and the visual studio 6.0 are existing in computer nr.1, but the result's from debugging I want to see on another computer for example computer nr.2, which is connected on the same LAN network.

please help]]></description>
			<content:encoded><![CDATA[<div>:wave:Hello everybody!!<br />
<br />
I want to debug my visual basic 6.0 application on the remote computer.<br />
<br />
For example:<br />
The application and the visual studio 6.0 are existing in computer nr.1, but the result's from debugging I want to see on another computer for example computer nr.2, which is connected on the same LAN network.<br />
<br />
please help</div>

]]></content:encoded>
			<category domain="http://forums.codeguru.com/forumdisplay.php?f=4">Visual Basic 6.0 Programming</category>
			<dc:creator>acects</dc:creator>
			<guid isPermaLink="true">http://forums.codeguru.com/showthread.php?t=523827</guid>
		</item>
		<item>
			<title>Coding question Deleting columns n rows</title>
			<link>http://forums.codeguru.com/showthread.php?t=523798&amp;goto=newpost</link>
			<pubDate>Tue, 15 May 2012 13:34:01 GMT</pubDate>
			<description><![CDATA[Hi all,
I am new to this forum and new to VB.
I would like to know how to delete enire columns ABDGJKLMPQ
and then delete entire rows when columns N and O present the value 0.

Here is a piece that ive tried to work with but it doesnt do as I wish

Dim i As Long, DelRng As Range
For i = 1 To LastRow
If Cells(i, "N").Value = 0 And Cells(i, "O").Value = 0 Then
Set DelRng = Union(Cells(i, "A"), Cells(i, "B"), Cells(i, "D"), Cells(i, "G"), Cells(i, "J"), Cells(i, "K"), Cells(i, "L"), Cells(i, "M"), Cells(i, "P"), Cells(i, "Q"))'
DelRng.ClearContents
Dim LastRow as Integer
LastRow = Cells(Rows.Count, "N").End(xlUp).Row

End If
Next


Any help is most welcome

thanks in advance]]></description>
			<content:encoded><![CDATA[<div>Hi all,<br />
I am new to this forum and new to VB.<br />
I would like to know how to delete enire columns ABDGJKLMPQ<br />
and then delete entire rows when columns N and O present the value 0.<br />
<br />
Here is a piece that ive tried to work with but it doesnt do as I wish<br />
<br />
Dim i As Long, DelRng As Range<br />
For i = 1 To LastRow<br />
If Cells(i, &quot;N&quot;).Value = 0 And Cells(i, &quot;O&quot;).Value = 0 Then<br />
Set DelRng = Union(Cells(i, &quot;A&quot;), Cells(i, &quot;B&quot;), Cells(i, &quot;D&quot;), Cells(i, &quot;G&quot;), Cells(i, &quot;J&quot;), Cells(i, &quot;K&quot;), Cells(i, &quot;L&quot;), Cells(i, &quot;M&quot;), Cells(i, &quot;P&quot;), Cells(i, &quot;Q&quot;))'<br />
DelRng.ClearContents<br />
Dim LastRow as Integer<br />
LastRow = Cells(Rows.Count, &quot;N&quot;).End(xlUp).Row<br />
<br />
End If<br />
Next<br />
<br />
<br />
Any help is most welcome<br />
<br />
thanks in advance</div>

]]></content:encoded>
			<category domain="http://forums.codeguru.com/forumdisplay.php?f=4">Visual Basic 6.0 Programming</category>
			<dc:creator>mitz4444</dc:creator>
			<guid isPermaLink="true">http://forums.codeguru.com/showthread.php?t=523798</guid>
		</item>
		<item>
			<title>Need help on Run-time error 3265</title>
			<link>http://forums.codeguru.com/showthread.php?t=523796&amp;goto=newpost</link>
			<pubDate>Tue, 15 May 2012 12:32:30 GMT</pubDate>
			<description><![CDATA[Hi guys!

So I'm a little rusty on VBA programming last time I did some VB was back in my college days :/

Here's my code:


Code:
---------
Public Sub TraiterSample()
 
   Dim ClefSampleRef As String 'Je suppose que c'est du texte
   Dim cptSample As Long
 
   Dim load_assays As dao.Database: Set load_assays = CurrentDb
   load_assays.QueryDefs("Empty_Result_temp").Execute
 
   Dim Populate_export As dao.Recordset: Set Populate_export = load_assays.OpenRecordset("Populate_export") 'rSample
 
   Dim Result_temp As dao.Recordset: Set Result_temp = load_assays.OpenRecordset("Result_temp", dbOpenDynaset) 'rResultat
 
   Do While Not Populate_export.EOF()
 
      If ClefSampleRef <> Populate_export![Sample_no] Then
         Result_temp.AddNew 'Ajoute un nouvel enregsitrement
         Result_temp![Sample_no] = Populate_export![Sample_no]
        Result_temp.Update
 
         ClefSampleRef = Populate_export![Sample_no] 'Note la nouvelle clef de référence
         cptSample = 0 'Reinitialise le compteur de valeur
      End If
 
     Result_temp.FindFirst ("[Sample_no]=""" & Populate_export![Sample_no] & """")
 
      If Not Result_temp.NoMatch Then
           Result_temp.Edit
           cptSample = cptSample + 1
          Result_temp.Fields("Au1_1ppm" & cptSample) = Populate_export![Au1_1ppm]  'Recopie la valeur dans le résultat dans la colonne voulue
         Else
           Error 5 'Cas impossible, soit il existait soit on l'a créé
      End If
 
      Populate_export.MoveNext 'Lit le sample suivant
   Loop
 
   Result_temp.Close: Set Result_temp = Nothing 'Ferme la source de données, libère la mémoire
   Populate_export.Close: Set Populate_export = Nothing 'Ferme la source de données, libère la mémoire
 
   Set load_assays = Nothing 'Libère la mémoire utilisé par l'objet db
End Sub
---------
I'm having the error 3265 which says:" Item not found in this collection" on line:


Code:
---------
Result_temp.Fields("Au1_1ppm" & cptSample) = Populate_export![Au1_1ppm]
---------
Populate_export![Au1_1ppm] has a value in it so the problem must be with the .Fields thing. After browsing, I've found out that most of the time, this error is caused by a misspelled field name or a reference to a field that does not exist. I've checked everything related to this field name (Au1_1ppm which is btw gold values from lab assay certificates) and everthing is fine.

To wrap it up, this piece of code is going down my Populate_export query which is linked to a Excel sheet. If it find a re-assay for the same sample number (2 identical sample number with 2 values), it places the value of the re-assay in a specific field, get rid of the Doublon and put everything in my Result_temp table. That way, I only got one entry with all the values instead of having multiple entries for one sample number.

Do you guys have any idea as to why I'm having this freaking error ? Also, if there's a way to optimize that code I'm open to all suggestions. As I said, I'm back to being a rookie in this :P

Thx a lot :)]]></description>
			<content:encoded><![CDATA[<div>Hi guys!<br />
<br />
So I'm a little rusty on VBA programming last time I did some VB was back in my college days :/<br />
<br />
Here's my code:<br />
<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">Public Sub TraiterSample()<br />
&nbsp;<br />
&nbsp;  Dim ClefSampleRef As String 'Je suppose que c'est du texte<br />
&nbsp;  Dim cptSample As Long<br />
&nbsp;<br />
&nbsp;  Dim load_assays As dao.Database: Set load_assays = CurrentDb<br />
&nbsp;  load_assays.QueryDefs(&quot;Empty_Result_temp&quot;).Execute<br />
&nbsp;<br />
&nbsp;  Dim Populate_export As dao.Recordset: Set Populate_export = load_assays.OpenRecordset(&quot;Populate_export&quot;) 'rSample<br />
&nbsp;<br />
&nbsp;  Dim Result_temp As dao.Recordset: Set Result_temp = load_assays.OpenRecordset(&quot;Result_temp&quot;, dbOpenDynaset) 'rResultat<br />
&nbsp;<br />
&nbsp;  Do While Not Populate_export.EOF()<br />
&nbsp;<br />
&nbsp; &nbsp; &nbsp; If ClefSampleRef &lt;&gt; Populate_export![Sample_no] Then<br />
&nbsp; &nbsp; &nbsp; &nbsp;  Result_temp.AddNew 'Ajoute un nouvel enregsitrement<br />
&nbsp; &nbsp; &nbsp; &nbsp;  Result_temp![Sample_no] = Populate_export![Sample_no]<br />
&nbsp; &nbsp; &nbsp; &nbsp; Result_temp.Update<br />
&nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp;  ClefSampleRef = Populate_export![Sample_no] 'Note la nouvelle clef de référence<br />
&nbsp; &nbsp; &nbsp; &nbsp;  cptSample = 0 'Reinitialise le compteur de valeur<br />
&nbsp; &nbsp; &nbsp; End If<br />
&nbsp;<br />
&nbsp; &nbsp;  Result_temp.FindFirst (&quot;[Sample_no]=&quot;&quot;&quot; &amp; Populate_export![Sample_no] &amp; &quot;&quot;&quot;&quot;)<br />
&nbsp;<br />
&nbsp; &nbsp; &nbsp; If Not Result_temp.NoMatch Then<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  Result_temp.Edit<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  cptSample = cptSample + 1<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Result_temp.Fields(&quot;Au1_1ppm&quot; &amp; cptSample) = Populate_export![Au1_1ppm]&nbsp; 'Recopie la valeur dans le résultat dans la colonne voulue<br />
&nbsp; &nbsp; &nbsp; &nbsp;  Else<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  Error 5 'Cas impossible, soit il existait soit on l'a créé<br />
&nbsp; &nbsp; &nbsp; End If<br />
&nbsp;<br />
&nbsp; &nbsp; &nbsp; Populate_export.MoveNext 'Lit le sample suivant<br />
&nbsp;  Loop<br />
&nbsp;<br />
&nbsp;  Result_temp.Close: Set Result_temp = Nothing 'Ferme la source de données, libère la mémoire<br />
&nbsp;  Populate_export.Close: Set Populate_export = Nothing 'Ferme la source de données, libère la mémoire<br />
&nbsp;<br />
&nbsp;  Set load_assays = Nothing 'Libère la mémoire utilisé par l'objet db<br />
End Sub</code><hr />
</div>I'm having the error 3265 which says:&quot; Item not found in this collection&quot; on line:<br />
<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">Result_temp.Fields(&quot;Au1_1ppm&quot; &amp; cptSample) = Populate_export![Au1_1ppm]</code><hr />
</div>Populate_export![Au1_1ppm] has a value in it so the problem must be with the .Fields thing. After browsing, I've found out that most of the time, this error is caused by a misspelled field name or a reference to a field that does not exist. I've checked everything related to this field name (Au1_1ppm which is btw gold values from lab assay certificates) and everthing is fine.<br />
<br />
To wrap it up, this piece of code is going down my Populate_export query which is linked to a Excel sheet. If it find a re-assay for the same sample number (2 identical sample number with 2 values), it places the value of the re-assay in a specific field, get rid of the Doublon and put everything in my Result_temp table. That way, I only got one entry with all the values instead of having multiple entries for one sample number.<br />
<br />
Do you guys have any idea as to why I'm having this freaking error ? Also, if there's a way to optimize that code I'm open to all suggestions. As I said, I'm back to being a rookie in this :P<br />
<br />
Thx a lot :)</div>

]]></content:encoded>
			<category domain="http://forums.codeguru.com/forumdisplay.php?f=4">Visual Basic 6.0 Programming</category>
			<dc:creator>Solidbry</dc:creator>
			<guid isPermaLink="true">http://forums.codeguru.com/showthread.php?t=523796</guid>
		</item>
		<item>
			<title>Heart Rate Help Please</title>
			<link>http://forums.codeguru.com/showthread.php?t=523727&amp;goto=newpost</link>
			<pubDate>Sun, 13 May 2012 00:10:00 GMT</pubDate>
			<description><![CDATA[Hi so i am trying to create a code so that when the user enters there 
age and there Resting heart rate it works out there Training heart rate
 
i have only just started coding 

the only problem i am having is that for example when i enter age 20 and
 a resting heart rate of 70 the training heart rate should be 148 but im
 getting a answer of 70-161 how can i make it so its a straight answer 
of 148.

i have tryed every formula under the sun that i could find out about heart rate
and i cant get it working

(i am using Visual Basic inside of word 2010)
 
thanks


Code:
---------
Private Sub Document_New()
Dim Response, varTHR As Integer, varConfirm, varAge As Integer
10 Response = InputBox("Enter Your Age in Years")

If Not IsNumeric(Response) Or Response <= 0 Then

varConfirm = MsgBox("Entered data is not valid ...." & vbCrLf & _
"Do You Wish To Quit ?", vbYesNo, "Confirm ")

If varConfirm = vbYes Then
Exit Sub
Else
GoTo 10
End If

Else
varAge = Response
End If


20 Response = InputBox("Enter Your Resting Heart Rate (RHR)", "Your RHR Please !!")

If Not IsNumeric(Response) Or Response <= 0 Then

If varConfirm = vbYes Then
Exit Sub
Else
GoTo 20
End If

Else

varTHR = 0.7 * (220 - varAge) + 0.3 * Response

End If

MsgBox "Your Calculated THR based on your Input " & vbCrLf & vbCrLf & _
"Age : " & varAge & vbCrLf & "RHR : " & Response & "----------" & vbCrLf & _
varTHR

GoTo 10
End Sub
---------
]]></description>
			<content:encoded><![CDATA[<div>Hi so i am trying to create a code so that when the user enters there <br />
age and there Resting heart rate it works out there Training heart rate<br />
 <br />
i have only just started coding <br />
<br />
the only problem i am having is that for example when i enter age 20 and<br />
 a resting heart rate of 70 the training heart rate should be 148 but im<br />
 getting a answer of 70-161 how can i make it so its a straight answer <br />
of 148.<br />
<br />
i have tryed every formula under the sun that i could find out about heart rate<br />
and i cant get it working<br />
<br />
(i am using Visual Basic inside of word 2010)<br />
 <br />
thanks<br />
<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">Private Sub Document_New()<br />
Dim Response, varTHR As Integer, varConfirm, varAge As Integer<br />
10 Response = InputBox(&quot;Enter Your Age in Years&quot;)<br />
<br />
If Not IsNumeric(Response) Or Response &lt;= 0 Then<br />
<br />
varConfirm = MsgBox(&quot;Entered data is not valid ....&quot; &amp; vbCrLf &amp; _<br />
&quot;Do You Wish To Quit ?&quot;, vbYesNo, &quot;Confirm &quot;)<br />
<br />
If varConfirm = vbYes Then<br />
Exit Sub<br />
Else<br />
GoTo 10<br />
End If<br />
<br />
Else<br />
varAge = Response<br />
End If<br />
<br />
<br />
20 Response = InputBox(&quot;Enter Your Resting Heart Rate (RHR)&quot;, &quot;Your RHR Please !!&quot;)<br />
<br />
If Not IsNumeric(Response) Or Response &lt;= 0 Then<br />
<br />
If varConfirm = vbYes Then<br />
Exit Sub<br />
Else<br />
GoTo 20<br />
End If<br />
<br />
Else<br />
<br />
varTHR = 0.7 * (220 - varAge) + 0.3 * Response<br />
<br />
End If<br />
<br />
MsgBox &quot;Your Calculated THR based on your Input &quot; &amp; vbCrLf &amp; vbCrLf &amp; _<br />
&quot;Age : &quot; &amp; varAge &amp; vbCrLf &amp; &quot;RHR : &quot; &amp; Response &amp; &quot;----------&quot; &amp; vbCrLf &amp; _<br />
varTHR<br />
<br />
GoTo 10<br />
End Sub</code><hr />
</div></div>

]]></content:encoded>
			<category domain="http://forums.codeguru.com/forumdisplay.php?f=4">Visual Basic 6.0 Programming</category>
			<dc:creator>iViewty</dc:creator>
			<guid isPermaLink="true">http://forums.codeguru.com/showthread.php?t=523727</guid>
		</item>
		<item>
			<title>How to pack an exe program with its components?</title>
			<link>http://forums.codeguru.com/showthread.php?t=523680&amp;goto=newpost</link>
			<pubDate>Thu, 10 May 2012 14:05:45 GMT</pubDate>
			<description>I have made a small tool with visual basic 6 and I want to pack it with its components, and become just one exe file...
Note: I need to make the program only one exe file not make an installation for it...
Which program should i use?
Thanks for helping!!! :sick:</description>
			<content:encoded><![CDATA[<div><font size="3">I have made a small tool with visual basic 6 and I want to pack it with its components, and become just one exe file...<br />
Note: I need to make the program only one exe file not make an installation for it...<br />
Which program should i use?<br />
Thanks for helping!!! :sick:</font></div>

]]></content:encoded>
			<category domain="http://forums.codeguru.com/forumdisplay.php?f=4">Visual Basic 6.0 Programming</category>
			<dc:creator>KurdUser</dc:creator>
			<guid isPermaLink="true">http://forums.codeguru.com/showthread.php?t=523680</guid>
		</item>
		<item>
			<title>What is the hex value for Fn key?</title>
			<link>http://forums.codeguru.com/showthread.php?t=523653&amp;goto=newpost</link>
			<pubDate>Wed, 09 May 2012 14:45:30 GMT</pubDate>
			<description>What is the hex value for Fn key? Please help. Thank you in advance:)</description>
			<content:encoded><![CDATA[<div>What is the hex value for Fn key? Please help. Thank you in advance:)</div>

]]></content:encoded>
			<category domain="http://forums.codeguru.com/forumdisplay.php?f=4">Visual Basic 6.0 Programming</category>
			<dc:creator>nikhildascl</dc:creator>
			<guid isPermaLink="true">http://forums.codeguru.com/showthread.php?t=523653</guid>
		</item>
		<item>
			<title>Encode and decode to binary file - urgent</title>
			<link>http://forums.codeguru.com/showthread.php?t=523645&amp;goto=newpost</link>
			<pubDate>Wed, 09 May 2012 10:52:33 GMT</pubDate>
			<description>Hi
I need a vbscript
that doing the following:
Taking an ini file and encode it to binary file.
Then I want to read the binary file values (decode ) back to my values.
Thanks in advance...</description>
			<content:encoded><![CDATA[<div>Hi<br />
I need a vbscript<br />
that doing the following:<br />
Taking an ini file and encode it to binary file.<br />
Then I want to read the binary file values (decode ) back to my values.<br />
Thanks in advance...</div>

]]></content:encoded>
			<category domain="http://forums.codeguru.com/forumdisplay.php?f=4">Visual Basic 6.0 Programming</category>
			<dc:creator>morb</dc:creator>
			<guid isPermaLink="true">http://forums.codeguru.com/showthread.php?t=523645</guid>
		</item>
		<item>
			<title>Unique ID by more than one user at a time</title>
			<link>http://forums.codeguru.com/showthread.php?t=523629&amp;goto=newpost</link>
			<pubDate>Tue, 08 May 2012 19:11:06 GMT</pubDate>
			<description><![CDATA[Hi Guys! this is Biplob. I have a question.


Code:
---------
Private Sub ID_CREATE()
Data1.Refresh
Data1.RecordSource = "select * from TableName order by ID"
Data1.Refresh

If Data1.Recordset.RecordCount > 0 Then
    Data1.Recordset.MoveLast
    ' FC/11-12/ = 9 Character
    X = Val(Mid(Data1.Recordset.Fields("ID"), 10)) + 1
Else
    X = 1
End If
If X <= 9 Then
    l2.Caption = "FC/11-12/0000" & X
ElseIf X <= 99 Then
    l2.Caption = "FC/11-12/000" & X
ElseIf X <= 999 Then
    l2.Caption = "FC/11-12/00" & X
ElseIf X <= 9999 Then
    l2.Caption = "FC/11-12/0" & X
Else
    l2.Caption = "FC/11-12/" & X
End If
End Sub
---------
The above code I use for Create an unique ID. This software runs in LAN, and more than one user use this same form to enter the admission data of students. The problem is if more than one user click the _A_dd button at a time, same ID generates instead of different ID and Error shows "Duplicate Entry".

My question is How to create different Student IDs if more than one user click the _A_dd Button at a time.]]></description>
			<content:encoded><![CDATA[<div>Hi Guys! this is Biplob. I have a question.<br />
<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left"><font color="Blue">Private Sub ID_CREATE()<br />
Data1.Refresh<br />
Data1.RecordSource = &quot;select * from TableName order by ID&quot;<br />
Data1.Refresh<br />
<br />
If Data1.Recordset.RecordCount &gt; 0 Then<br />
&nbsp; &nbsp; Data1.Recordset.MoveLast<br />
&nbsp; &nbsp; ' FC/11-12/ = 9 Character<br />
&nbsp; &nbsp; X = Val(Mid(Data1.Recordset.Fields(&quot;ID&quot;), 10)) + 1<br />
Else<br />
&nbsp; &nbsp; X = 1<br />
End If<br />
If X &lt;= 9 Then<br />
&nbsp; &nbsp; l2.Caption = &quot;FC/11-12/0000&quot; &amp; X<br />
ElseIf X &lt;= 99 Then<br />
&nbsp; &nbsp; l2.Caption = &quot;FC/11-12/000&quot; &amp; X<br />
ElseIf X &lt;= 999 Then<br />
&nbsp; &nbsp; l2.Caption = &quot;FC/11-12/00&quot; &amp; X<br />
ElseIf X &lt;= 9999 Then<br />
&nbsp; &nbsp; l2.Caption = &quot;FC/11-12/0&quot; &amp; X<br />
Else<br />
&nbsp; &nbsp; l2.Caption = &quot;FC/11-12/&quot; &amp; X<br />
End If<br />
End Sub</font></code><hr />
</div>The above code I use for Create an unique ID. This software runs in LAN, and more than one user use this same form to enter the admission data of students. The problem is if more than one user click the <u>A</u>dd button at a time, same ID generates instead of different ID and Error shows &quot;Duplicate Entry&quot;.<br />
<br />
My question is How to create different Student IDs if more than one user click the <u>A</u>dd Button at a time.</div>

]]></content:encoded>
			<category domain="http://forums.codeguru.com/forumdisplay.php?f=4">Visual Basic 6.0 Programming</category>
			<dc:creator>biplob.shee</dc:creator>
			<guid isPermaLink="true">http://forums.codeguru.com/showthread.php?t=523629</guid>
		</item>
		<item>
			<title>Webbrowser help men</title>
			<link>http://forums.codeguru.com/showthread.php?t=523622&amp;goto=newpost</link>
			<pubDate>Tue, 08 May 2012 14:55:35 GMT</pubDate>
			<description>Hi CG Forum

I need www.hfbot.iblogger.org in iframe in the textbox read


I write english very bad :S


I write or read to iframe in object</description>
			<content:encoded><![CDATA[<div>Hi CG Forum<br />
<br />
I need <a rel="nofollow" href="http://www.hfbot.iblogger.org" target="_blank">www.hfbot.iblogger.org</a> in iframe in the textbox read<br />
<br />
<br />
I write english very bad :S<br />
<br />
<br />
I write or read to iframe in object</div>

]]></content:encoded>
			<category domain="http://forums.codeguru.com/forumdisplay.php?f=4">Visual Basic 6.0 Programming</category>
			<dc:creator>exe676</dc:creator>
			<guid isPermaLink="true">http://forums.codeguru.com/showthread.php?t=523622</guid>
		</item>
		<item>
			<title>first letter of the text</title>
			<link>http://forums.codeguru.com/showthread.php?t=523588&amp;goto=newpost</link>
			<pubDate>Mon, 07 May 2012 06:09:38 GMT</pubDate>
			<description><![CDATA[Hi!! Im totally new to VB. so if my question/s is retarded in someway, please forgive me. :)

I need to check the first letter of the text whether is it start with "S", "G"  or "F".

what is the way to do it? condition, function, etc?]]></description>
			<content:encoded><![CDATA[<div>Hi!! Im totally new to VB. so if my question/s is retarded in someway, please forgive me. :)<br />
<br />
I need to check the first letter of the text whether is it start with &quot;S&quot;, &quot;G&quot;  or &quot;F&quot;.<br />
<br />
what is the way to do it? condition, function, etc?</div>

]]></content:encoded>
			<category domain="http://forums.codeguru.com/forumdisplay.php?f=4">Visual Basic 6.0 Programming</category>
			<dc:creator>ashwarrior</dc:creator>
			<guid isPermaLink="true">http://forums.codeguru.com/showthread.php?t=523588</guid>
		</item>
		<item>
			<title>PBWin Control RS232 interface with the U/F Convertor IC AD654  to VB</title>
			<link>http://forums.codeguru.com/showthread.php?t=523579&amp;goto=newpost</link>
			<pubDate>Sun, 06 May 2012 19:22:22 GMT</pubDate>
			<description><![CDATA[Please It would be impossible to write that in Visual Basic ? 
https://powerbasic.com/support/pbforums/showthread.php?p=405846#post405846



#PBFORMS CREATED V2.01
'------------------------------------------------------------------------------
' The first line in this file is a PB/Forms metastatement.
' It should ALWAYS be the first line of the file. Other
' PB/Forms metastatements are placed at the beginning and
' end of "Named Blocks" of code that should be edited
' with PBForms only. Do not manually edit or delete these
' metastatements or PB/Forms will not be able to reread
' the file correctly.  See the PB/Forms documentation for
' more information.
' Named blocks begin like this:    #PBFORMS BEGIN ...
' Named blocks end like this:      #PBFORMS END ...
' Other PB/Forms metastatements such as:
'     #PBFORMS DECLARATIONS
' are used by PB/Forms to insert additional code.
' Feel free to make changes anywhere else in the file.
'------------------------------------------------------------------------------

#COMPILE EXE
#DIM ALL

'------------------------------------------------------------------------------
'   ** Includes **
'------------------------------------------------------------------------------
#PBFORMS BEGIN INCLUDES 
#RESOURCE "UF_AD654.pbr"
%USEMACROS = 1
#INCLUDE ONCE "WIN32API.INC"
#INCLUDE ONCE "COMMCTRL.INC"
#INCLUDE ONCE "PBForms.INC"
#PBFORMS END INCLUDES
'------------------------------------------------------------------------------
DECLARE FUNCTION Open_SerialPort  LIB "port.dll" ALIAS "OPENCOM"(BYREF szSetup AS ASCIIZ) AS LONG
DECLARE SUB      Close_SerialPort LIB "port.dll" ALIAS "CLOSECOM"()
DECLARE FUNCTION dsr_in           LIB "port.dll" ALIAS "DSR"() AS WORD
DECLARE FUNCTION cts_in           LIB "port.dll" ALIAS "CTS"() AS WORD
DECLARE FUNCTION dcd_in           LIB "port.dll" ALIAS "DCD"() AS WORD
DECLARE FUNCTION ri_in            LIB "port.dll" ALIAS "RI"()  AS WORD
DECLARE SUB      rts_out          LIB "port.dll" ALIAS "RTS"(BYVAL iStatus AS WORD)
DECLARE SUB      txd_out          LIB "port.dll" ALIAS "TXD"(BYVAL iStatus AS WORD)
DECLARE SUB      dtr_out          LIB "port.dll" ALIAS "DTR"(BYVAL iStatus AS WORD)

DECLARE FUNCTION Real_Time        LIB "port.dll" ALIAS "REALTIME"(BYVAL iPriority AS WORD) AS LONG
DECLARE SUB      Delay            LIB "port.dll" ALIAS "DELAY"(BYVAL iDelay AS WORD)
DECLARE SUB      Delay_us         LIB "port.dll" ALIAS "DELAYUS"(BYVAL dwDelay AS DWORD)
DECLARE SUB      Time_Init        LIB "port.dll" ALIAS "TIMEINIT"()
DECLARE SUB      TimeInit_us      LIB "port.dll" ALIAS "TIMEINITUS"()
DECLARE FUNCTION Timer_Read       LIB "port.dll" ALIAS "TIMEREAD"() AS DWORD
DECLARE FUNCTION Timer_Read_us    LIB "port.dll" ALIAS "TIMEREADUS"() AS DWORD
'------------------------------------------------------------------------------
'   ** Constants **
'------------------------------------------------------------------------------
#PBFORMS BEGIN CONSTANTS 
%IDC_OPT1     = 1002
%IDC_OPT2     = 1003
%IDC_OPT3     = 1004
%IDC_TEXTBOX1 = 1001
%IDD_DIALOG1  =  101
%ID_TIMER1    =  200
#PBFORMS END CONSTANTS
'------------------------------------------------------------------------------
GLOBAL g_Resolution AS INTEGER
MACRO  CALIBRATION = 1.0000
'------------------------------------------------------------------------------
'   ** Declarations **
'------------------------------------------------------------------------------
DECLARE CALLBACK FUNCTION ShowDIALOG1Proc()
DECLARE FUNCTION ShowDIALOG1(BYVAL hParent AS DWORD) AS LONG
#PBFORMS DECLARATIONS
'------------------------------------------------------------------------------

'------------------------------------------------------------------------------
'   ** Main Application Entry Point **
'------------------------------------------------------------------------------
FUNCTION PBMAIN()
    PBFormsInitComCtls (%ICC_WIN95_CLASSES OR %ICC_DATE_CLASSES OR _
        %ICC_INTERNET_CLASSES)

    ShowDIALOG1 %HWND_DESKTOP
END FUNCTION
'------------------------------------------------------------------------------

'------------------------------------------------------------------------------
'   ** CallBacks **
'------------------------------------------------------------------------------
CALLBACK FUNCTION ShowDIALOG1Proc()

    SELECT CASE AS LONG CB.MSG
        CASE %WM_INITDIALOG
            Open_SerialPort("COM2:9600,N,8,1")
            SetTimer(CB.HNDL,%ID_TIMER1,500,&0)
            g_Resolution = 1

        CASE %WM_TIMER
            IF(CB.CTL = %ID_TIMER1) THEN
                LOCAL dblVoltage AS DOUBLE

                SELECT CASE g_Resolution
                    CASE 1
                        dblVoltage = Freq(100)  / 10 * CALIBRATION
                        CONTROL SET TEXT CB.HNDL, %IDC_TEXTBOX1, FORMAT$(dblVoltage,"###") & " mV"      '3:0

                    CASE 2
                        dblVoltage = Freq(1000) / 10 * CALIBRATION
                        CONTROL SET TEXT CB.HNDL, %IDC_TEXTBOX1, FORMAT$(dblVoltage,"###.#") & " mV"    '5:1

                    CASE 3
                        dblVoltage = Freq(100)  / 10 * CALIBRATION
                        CONTROL SET TEXT CB.HNDL, %IDC_TEXTBOX1, FORMAT$(dblVoltage,"###.##") & " mV"   '6:2
                    CASE ELSE

                END SELECT
            END IF

        CASE %WM_NCACTIVATE
            STATIC hWndSaveFocus AS DWORD
            IF ISFALSE CB.WPARAM THEN
                ' Save control focus
                hWndSaveFocus = GetFocus()
            ELSEIF hWndSaveFocus THEN
                ' Restore control focus
                SetFocus(hWndSaveFocus)
                hWndSaveFocus = 0
            END IF

        CASE %WM_COMMAND
            ' Process control notifications
            SELECT CASE AS LONG CB.CTL
                ' /* Inserted by PB/Forms 08-20-2011 10:25:09
                CASE %IDC_TEXTBOX1
                ' */


                CASE %IDC_OPT1
                    IF(CB.CTLMSG = %BN_CLICKED) THEN
                        SetTimer(CB.HNDL,%ID_TIMER1,1000,&0)
                        g_Resolution = 1
                    END IF

                CASE %IDC_OPT2
                    IF(CB.CTLMSG = %BN_CLICKED) THEN
                        SetTimer(CB.HNDL,%ID_TIMER1,1500,&0)
                        g_Resolution = 2
                    END IF

                CASE %IDC_OPT3
                    IF(CB.CTLMSG = %BN_CLICKED) THEN
                        SetTimer(CB.HNDL,%ID_TIMER1,3000,&0)
                        g_Resolution = 3
                    END IF

            END SELECT
    END SELECT
END FUNCTION
'------------------------------------------------------------------------------

'------------------------------------------------------------------------------
'   ** Dialogs **
'------------------------------------------------------------------------------
FUNCTION ShowDIALOG1(BYVAL hParent AS DWORD) AS LONG
    LOCAL lRslt  AS LONG

#PBFORMS BEGIN DIALOG %IDD_DIALOG1->->
    LOCAL hDlg   AS DWORD
    LOCAL hFont1 AS DWORD

    DIALOG NEW hParent, "Spanning 0..1V ", 201, 207, 127, 88, %WS_POPUP OR _
        %WS_BORDER OR %WS_DLGFRAME OR %WS_CAPTION OR %WS_SYSMENU OR _
        %WS_CLIPSIBLINGS OR %WS_VISIBLE OR %DS_MODALFRAME OR %DS_3DLOOK OR _
        %DS_NOFAILCREATE OR %DS_SETFONT, %WS_EX_CONTROLPARENT OR %WS_EX_LEFT _
        OR %WS_EX_LTRREADING OR %WS_EX_RIGHTSCROLLBAR, TO hDlg
    CONTROL ADD TEXTBOX, hDlg, %IDC_TEXTBOX1, "", 30, 8, 66, 18, %WS_CHILD OR _
        %WS_VISIBLE OR %WS_TABSTOP OR %ES_LEFT OR %ES_AUTOHSCROLL OR _
        %ES_READONLY, %WS_EX_CLIENTEDGE OR %WS_EX_LEFT OR %WS_EX_LTRREADING _
        OR %WS_EX_RIGHTSCROLLBAR
    CONTROL ADD OPTION,  hDlg, %IDC_OPT1, "1 mV", 32, 34, 64, 16
    CONTROL ADD OPTION,  hDlg, %IDC_OPT2, "0.1 mV", 32, 50, 64, 16
    CONTROL ADD OPTION,  hDlg, %IDC_OPT3, "0.01 mV", 32, 66, 64, 16

    FONT NEW "MS Sans Serif", 10, 1, %ANSI_CHARSET TO hFont1

    CONTROL SET FONT hDlg, %IDC_TEXTBOX1, hFont1
#PBFORMS END DIALOG

    DIALOG SHOW MODAL hDlg, CALL ShowDIALOG1Proc TO lRslt

#PBFORMS BEGIN CLEANUP %IDD_DIALOG1
    FONT END hFont1
#PBFORMS END CLEANUP

    FUNCTION = lRslt
END FUNCTION
'------------------------------------------------------------------------------
FUNCTION Freq(BYVAL PortTime AS INTEGER) AS DOUBLE
    LOCAL iCounter AS INTEGER
    LOCAL iAlt     AS INTEGER
    LOCAL iInput   AS INTEGER

    iCounter = 0
    Real_Time(-1)
    TimeInit_us()
    iAlt = CTS_in()

    DO WHILE(Timer_Read_us() < (1000 * PortTime))
        iInput = CTS_in()
        IF(iInput > iAlt) THEN iCounter += 1
        iAlt = iInput
    LOOP

    FUNCTION = ((iCounter / PortTime) * 1000)
    Real_Time(0)

END FUNCTION]]></description>
			<content:encoded><![CDATA[<div>Please It would be impossible to write that in Visual Basic ? <br />
<a rel="nofollow" href="https://powerbasic.com/support/pbforums/showthread.php?p=405846#post405846" target="_blank">https://powerbasic.com/support/pbfor...846#post405846</a><br />
<br />
<br />
<br />
#PBFORMS CREATED V2.01<br />
'------------------------------------------------------------------------------<br />
' The first line in this file is a PB/Forms metastatement.<br />
' It should ALWAYS be the first line of the file. Other<br />
' PB/Forms metastatements are placed at the beginning and<br />
' end of &quot;Named Blocks&quot; of code that should be edited<br />
' with PBForms only. Do not manually edit or delete these<br />
' metastatements or PB/Forms will not be able to reread<br />
' the file correctly.  See the PB/Forms documentation for<br />
' more information.<br />
' Named blocks begin like this:    #PBFORMS BEGIN ...<br />
' Named blocks end like this:      #PBFORMS END ...<br />
' Other PB/Forms metastatements such as:<br />
'     #PBFORMS DECLARATIONS<br />
' are used by PB/Forms to insert additional code.<br />
' Feel free to make changes anywhere else in the file.<br />
'------------------------------------------------------------------------------<br />
<br />
#COMPILE EXE<br />
#DIM ALL<br />
<br />
'------------------------------------------------------------------------------<br />
'   ** Includes **<br />
'------------------------------------------------------------------------------<br />
#PBFORMS BEGIN INCLUDES <br />
#RESOURCE &quot;UF_AD654.pbr&quot;<br />
%USEMACROS = 1<br />
#INCLUDE ONCE &quot;WIN32API.INC&quot;<br />
#INCLUDE ONCE &quot;COMMCTRL.INC&quot;<br />
#INCLUDE ONCE &quot;PBForms.INC&quot;<br />
#PBFORMS END INCLUDES<br />
'------------------------------------------------------------------------------<br />
DECLARE FUNCTION Open_SerialPort  LIB &quot;port.dll&quot; ALIAS &quot;OPENCOM&quot;(BYREF szSetup AS ASCIIZ) AS LONG<br />
DECLARE SUB      Close_SerialPort LIB &quot;port.dll&quot; ALIAS &quot;CLOSECOM&quot;()<br />
DECLARE FUNCTION dsr_in           LIB &quot;port.dll&quot; ALIAS &quot;DSR&quot;() AS WORD<br />
DECLARE FUNCTION cts_in           LIB &quot;port.dll&quot; ALIAS &quot;CTS&quot;() AS WORD<br />
DECLARE FUNCTION dcd_in           LIB &quot;port.dll&quot; ALIAS &quot;DCD&quot;() AS WORD<br />
DECLARE FUNCTION ri_in            LIB &quot;port.dll&quot; ALIAS &quot;RI&quot;()  AS WORD<br />
DECLARE SUB      rts_out          LIB &quot;port.dll&quot; ALIAS &quot;RTS&quot;(BYVAL iStatus AS WORD)<br />
DECLARE SUB      txd_out          LIB &quot;port.dll&quot; ALIAS &quot;TXD&quot;(BYVAL iStatus AS WORD)<br />
DECLARE SUB      dtr_out          LIB &quot;port.dll&quot; ALIAS &quot;DTR&quot;(BYVAL iStatus AS WORD)<br />
<br />
DECLARE FUNCTION Real_Time        LIB &quot;port.dll&quot; ALIAS &quot;REALTIME&quot;(BYVAL iPriority AS WORD) AS LONG<br />
DECLARE SUB      Delay            LIB &quot;port.dll&quot; ALIAS &quot;DELAY&quot;(BYVAL iDelay AS WORD)<br />
DECLARE SUB      Delay_us         LIB &quot;port.dll&quot; ALIAS &quot;DELAYUS&quot;(BYVAL dwDelay AS DWORD)<br />
DECLARE SUB      Time_Init        LIB &quot;port.dll&quot; ALIAS &quot;TIMEINIT&quot;()<br />
DECLARE SUB      TimeInit_us      LIB &quot;port.dll&quot; ALIAS &quot;TIMEINITUS&quot;()<br />
DECLARE FUNCTION Timer_Read       LIB &quot;port.dll&quot; ALIAS &quot;TIMEREAD&quot;() AS DWORD<br />
DECLARE FUNCTION Timer_Read_us    LIB &quot;port.dll&quot; ALIAS &quot;TIMEREADUS&quot;() AS DWORD<br />
'------------------------------------------------------------------------------<br />
'   ** Constants **<br />
'------------------------------------------------------------------------------<br />
#PBFORMS BEGIN CONSTANTS <br />
%IDC_OPT1     = 1002<br />
%IDC_OPT2     = 1003<br />
%IDC_OPT3     = 1004<br />
%IDC_TEXTBOX1 = 1001<br />
%IDD_DIALOG1  =  101<br />
%ID_TIMER1    =  200<br />
#PBFORMS END CONSTANTS<br />
'------------------------------------------------------------------------------<br />
GLOBAL g_Resolution AS INTEGER<br />
MACRO  CALIBRATION = 1.0000<br />
'------------------------------------------------------------------------------<br />
'   ** Declarations **<br />
'------------------------------------------------------------------------------<br />
DECLARE CALLBACK FUNCTION ShowDIALOG1Proc()<br />
DECLARE FUNCTION ShowDIALOG1(BYVAL hParent AS DWORD) AS LONG<br />
#PBFORMS DECLARATIONS<br />
'------------------------------------------------------------------------------<br />
<br />
'------------------------------------------------------------------------------<br />
'   ** Main Application Entry Point **<br />
'------------------------------------------------------------------------------<br />
FUNCTION PBMAIN()<br />
    PBFormsInitComCtls (%ICC_WIN95_CLASSES OR %ICC_DATE_CLASSES OR _<br />
        %ICC_INTERNET_CLASSES)<br />
<br />
    ShowDIALOG1 %HWND_DESKTOP<br />
END FUNCTION<br />
'------------------------------------------------------------------------------<br />
<br />
'------------------------------------------------------------------------------<br />
'   ** CallBacks **<br />
'------------------------------------------------------------------------------<br />
CALLBACK FUNCTION ShowDIALOG1Proc()<br />
<br />
    SELECT CASE AS LONG CB.MSG<br />
        CASE %WM_INITDIALOG<br />
            Open_SerialPort(&quot;COM2:9600,N,8,1&quot;)<br />
            SetTimer(CB.HNDL,%ID_TIMER1,500,&amp;0)<br />
            g_Resolution = 1<br />
<br />
        CASE %WM_TIMER<br />
            IF(CB.CTL = %ID_TIMER1) THEN<br />
                LOCAL dblVoltage AS DOUBLE<br />
<br />
                SELECT CASE g_Resolution<br />
                    CASE 1<br />
                        dblVoltage = Freq(100)  / 10 * CALIBRATION<br />
                        CONTROL SET TEXT CB.HNDL, %IDC_TEXTBOX1, FORMAT$(dblVoltage,&quot;###&quot;) &amp; &quot; mV&quot;      '3:0<br />
<br />
                    CASE 2<br />
                        dblVoltage = Freq(1000) / 10 * CALIBRATION<br />
                        CONTROL SET TEXT CB.HNDL, %IDC_TEXTBOX1, FORMAT$(dblVoltage,&quot;###.#&quot;) &amp; &quot; mV&quot;    '5:1<br />
<br />
                    CASE 3<br />
                        dblVoltage = Freq(100)  / 10 * CALIBRATION<br />
                        CONTROL SET TEXT CB.HNDL, %IDC_TEXTBOX1, FORMAT$(dblVoltage,&quot;###.##&quot;) &amp; &quot; mV&quot;   '6:2<br />
                    CASE ELSE<br />
<br />
                END SELECT<br />
            END IF<br />
<br />
        CASE %WM_NCACTIVATE<br />
            STATIC hWndSaveFocus AS DWORD<br />
            IF ISFALSE CB.WPARAM THEN<br />
                ' Save control focus<br />
                hWndSaveFocus = GetFocus()<br />
            ELSEIF hWndSaveFocus THEN<br />
                ' Restore control focus<br />
                SetFocus(hWndSaveFocus)<br />
                hWndSaveFocus = 0<br />
            END IF<br />
<br />
        CASE %WM_COMMAND<br />
            ' Process control notifications<br />
            SELECT CASE AS LONG CB.CTL<br />
                ' /* Inserted by PB/Forms 08-20-2011 10:25:09<br />
                CASE %IDC_TEXTBOX1<br />
                ' */<br />
<br />
<br />
                CASE %IDC_OPT1<br />
                    IF(CB.CTLMSG = %BN_CLICKED) THEN<br />
                        SetTimer(CB.HNDL,%ID_TIMER1,1000,&amp;0)<br />
                        g_Resolution = 1<br />
                    END IF<br />
<br />
                CASE %IDC_OPT2<br />
                    IF(CB.CTLMSG = %BN_CLICKED) THEN<br />
                        SetTimer(CB.HNDL,%ID_TIMER1,1500,&amp;0)<br />
                        g_Resolution = 2<br />
                    END IF<br />
<br />
                CASE %IDC_OPT3<br />
                    IF(CB.CTLMSG = %BN_CLICKED) THEN<br />
                        SetTimer(CB.HNDL,%ID_TIMER1,3000,&amp;0)<br />
                        g_Resolution = 3<br />
                    END IF<br />
<br />
            END SELECT<br />
    END SELECT<br />
END FUNCTION<br />
'------------------------------------------------------------------------------<br />
<br />
'------------------------------------------------------------------------------<br />
'   ** Dialogs **<br />
'------------------------------------------------------------------------------<br />
FUNCTION ShowDIALOG1(BYVAL hParent AS DWORD) AS LONG<br />
    LOCAL lRslt  AS LONG<br />
<br />
#PBFORMS BEGIN DIALOG %IDD_DIALOG1-&gt;-&gt;<br />
    LOCAL hDlg   AS DWORD<br />
    LOCAL hFont1 AS DWORD<br />
<br />
    DIALOG NEW hParent, &quot;Spanning 0..1V &quot;, 201, 207, 127, 88, %WS_POPUP OR _<br />
        %WS_BORDER OR %WS_DLGFRAME OR %WS_CAPTION OR %WS_SYSMENU OR _<br />
        %WS_CLIPSIBLINGS OR %WS_VISIBLE OR %DS_MODALFRAME OR %DS_3DLOOK OR _<br />
        %DS_NOFAILCREATE OR %DS_SETFONT, %WS_EX_CONTROLPARENT OR %WS_EX_LEFT _<br />
        OR %WS_EX_LTRREADING OR %WS_EX_RIGHTSCROLLBAR, TO hDlg<br />
    CONTROL ADD TEXTBOX, hDlg, %IDC_TEXTBOX1, &quot;&quot;, 30, 8, 66, 18, %WS_CHILD OR _<br />
        %WS_VISIBLE OR %WS_TABSTOP OR %ES_LEFT OR %ES_AUTOHSCROLL OR _<br />
        %ES_READONLY, %WS_EX_CLIENTEDGE OR %WS_EX_LEFT OR %WS_EX_LTRREADING _<br />
        OR %WS_EX_RIGHTSCROLLBAR<br />
    CONTROL ADD OPTION,  hDlg, %IDC_OPT1, &quot;1 mV&quot;, 32, 34, 64, 16<br />
    CONTROL ADD OPTION,  hDlg, %IDC_OPT2, &quot;0.1 mV&quot;, 32, 50, 64, 16<br />
    CONTROL ADD OPTION,  hDlg, %IDC_OPT3, &quot;0.01 mV&quot;, 32, 66, 64, 16<br />
<br />
    FONT NEW &quot;MS Sans Serif&quot;, 10, 1, %ANSI_CHARSET TO hFont1<br />
<br />
    CONTROL SET FONT hDlg, %IDC_TEXTBOX1, hFont1<br />
#PBFORMS END DIALOG<br />
<br />
    DIALOG SHOW MODAL hDlg, CALL ShowDIALOG1Proc TO lRslt<br />
<br />
#PBFORMS BEGIN CLEANUP %IDD_DIALOG1<br />
    FONT END hFont1<br />
#PBFORMS END CLEANUP<br />
<br />
    FUNCTION = lRslt<br />
END FUNCTION<br />
'------------------------------------------------------------------------------<br />
FUNCTION Freq(BYVAL PortTime AS INTEGER) AS DOUBLE<br />
    LOCAL iCounter AS INTEGER<br />
    LOCAL iAlt     AS INTEGER<br />
    LOCAL iInput   AS INTEGER<br />
<br />
    iCounter = 0<br />
    Real_Time(-1)<br />
    TimeInit_us()<br />
    iAlt = CTS_in()<br />
<br />
    DO WHILE(Timer_Read_us() &lt; (1000 * PortTime))<br />
        iInput = CTS_in()<br />
        IF(iInput &gt; iAlt) THEN iCounter += 1<br />
        iAlt = iInput<br />
    LOOP<br />
<br />
    FUNCTION = ((iCounter / PortTime) * 1000)<br />
    Real_Time(0)<br />
<br />
END FUNCTION</div>


	<br />
	<div style="padding:3px">

	

	

	

	
		<fieldset class="fieldset">
			<legend>Attached Files</legend>
			<table cellpadding="0" cellspacing="3" border="0">
			<tr>
	<td><img class="inlineimg" src="http://forums.codeguru.com/images/attach/zip.gif" alt="File Type: zip" width="16" height="16" border="0" style="vertical-align:baseline" /></td>
	<td><a href="http://forums.codeguru.com/attachment.php?attachmentid=29610&amp;d=1336332103">UF_AD654.zip</a> (273.1 KB)</td>
</tr>
			</table>
		</fieldset>
	

	</div>
]]></content:encoded>
			<category domain="http://forums.codeguru.com/forumdisplay.php?f=4">Visual Basic 6.0 Programming</category>
			<dc:creator>igor5</dc:creator>
			<guid isPermaLink="true">http://forums.codeguru.com/showthread.php?t=523579</guid>
		</item>
		<item>
			<title><![CDATA[[RESOLVED] MSFlexGrid Not Highlighting Row]]></title>
			<link>http://forums.codeguru.com/showthread.php?t=523575&amp;goto=newpost</link>
			<pubDate>Sun, 06 May 2012 15:55:03 GMT</pubDate>
			<description><![CDATA[I have an MSFlexGrid that I am manipulating in code, and everything works except for the highlighting of the row.  I can set the row, and update other labels on the form based on the selected row, but the row itself does not highlight.

If I click on the row, it does highlight.  I have the highlight property set to Always, and as stated if I click on the row it highlights.  But if when I use the following code, it does not highlight in either flexgrid:


Code:
---------
Private Sub cmdRandomRoll_Click()
    Dim intTemp As Integer
    Dim rstRecords As ADODB.Recordset
    Dim strSelect As String
    
    Set rstRecords = New ADODB.Recordset
    
    intTemp = Generate_Random_Number(100, 1)
    strSelect = "SELECT ID FROM tblExperimentNature WHERE " & intTemp & " >= RollLow AND " & intTemp & " <= RollHigh"
    rstRecords.Open strSelect, adoHUConnection, adOpenKeyset, adLockOptimistic
    rstRecords.MoveFirst
    
    For intTemp = 0 To grdNature.Rows - 1
        If grdNature.TextMatrix(intTemp, 0) = rstRecords!ID Then
            grdNature.Row = intTemp
            grdNature.RowSel = grdNature.Row
            grdNature.SetFocus
            Call grdNature_Click
            Exit For
        End If
    Next
    
    rstRecords.Close

    intTemp = Generate_Random_Number(100, 1)
    strSelect = "SELECT ID FROM tblExperimentType WHERE " & intTemp & ">= RollLow AND " & intTemp & " <= RollHigh"
    rstRecords.Open strSelect, adoHUConnection, adOpenKeyset, adLockOptimistic
    rstRecords.MoveFirst
    
    For intTemp = 0 To grdType.Rows - 1
        If grdType.TextMatrix(intTemp, 0) = rstRecords!ID Then
            grdType.Row = intTemp
            Call grdType_Click
            Exit For
        End If
    Next
    
    rstRecords.Close
    Set rstRecords = Nothing
End Sub
---------
You will see a few subroutines being called that I did not include, but these only generate a random number or populate a label on the form.

You'll also see that I'm selecting the row in 2 different ways:

1.  grdNature.Row is set, then grdNature.RowSel is set, and then grdNature gets focus; AND

2.  grdType.Row is set

Anybody know why the row is not being selected with the above code?  Can somebody tell me what I'm doing wrong?]]></description>
			<content:encoded><![CDATA[<div>I have an MSFlexGrid that I am manipulating in code, and everything works except for the highlighting of the row.  I can set the row, and update other labels on the form based on the selected row, but the row itself does not highlight.<br />
<br />
If I click on the row, it does highlight.  I have the highlight property set to Always, and as stated if I click on the row it highlights.  But if when I use the following code, it does not highlight in either flexgrid:<br />
<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">Private Sub cmdRandomRoll_Click()<br />
&nbsp; &nbsp; Dim intTemp As Integer<br />
&nbsp; &nbsp; Dim rstRecords As ADODB.Recordset<br />
&nbsp; &nbsp; Dim strSelect As String<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; Set rstRecords = New ADODB.Recordset<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; intTemp = Generate_Random_Number(100, 1)<br />
&nbsp; &nbsp; strSelect = &quot;SELECT ID FROM tblExperimentNature WHERE &quot; &amp; intTemp &amp; &quot; &gt;= RollLow AND &quot; &amp; intTemp &amp; &quot; &lt;= RollHigh&quot;<br />
&nbsp; &nbsp; rstRecords.Open strSelect, adoHUConnection, adOpenKeyset, adLockOptimistic<br />
&nbsp; &nbsp; rstRecords.MoveFirst<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; For intTemp = 0 To grdNature.Rows - 1<br />
&nbsp; &nbsp; &nbsp; &nbsp; If grdNature.TextMatrix(intTemp, 0) = rstRecords!ID Then<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; grdNature.Row = intTemp<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; grdNature.RowSel = grdNature.Row<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; grdNature.SetFocus<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Call grdNature_Click<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Exit For<br />
&nbsp; &nbsp; &nbsp; &nbsp; End If<br />
&nbsp; &nbsp; Next<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; rstRecords.Close<br />
<br />
&nbsp; &nbsp; intTemp = Generate_Random_Number(100, 1)<br />
&nbsp; &nbsp; strSelect = &quot;SELECT ID FROM tblExperimentType WHERE &quot; &amp; intTemp &amp; &quot;&gt;= RollLow AND &quot; &amp; intTemp &amp; &quot; &lt;= RollHigh&quot;<br />
&nbsp; &nbsp; rstRecords.Open strSelect, adoHUConnection, adOpenKeyset, adLockOptimistic<br />
&nbsp; &nbsp; rstRecords.MoveFirst<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; For intTemp = 0 To grdType.Rows - 1<br />
&nbsp; &nbsp; &nbsp; &nbsp; If grdType.TextMatrix(intTemp, 0) = rstRecords!ID Then<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; grdType.Row = intTemp<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Call grdType_Click<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Exit For<br />
&nbsp; &nbsp; &nbsp; &nbsp; End If<br />
&nbsp; &nbsp; Next<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; rstRecords.Close<br />
&nbsp; &nbsp; Set rstRecords = Nothing<br />
End Sub</code><hr />
</div>You will see a few subroutines being called that I did not include, but these only generate a random number or populate a label on the form.<br />
<br />
You'll also see that I'm selecting the row in 2 different ways:<br />
<br />
1.  grdNature.Row is set, then grdNature.RowSel is set, and then grdNature gets focus; AND<br />
<br />
2.  grdType.Row is set<br />
<br />
Anybody know why the row is not being selected with the above code?  Can somebody tell me what I'm doing wrong?</div>

]]></content:encoded>
			<category domain="http://forums.codeguru.com/forumdisplay.php?f=4">Visual Basic 6.0 Programming</category>
			<dc:creator>Leon Kennedy</dc:creator>
			<guid isPermaLink="true">http://forums.codeguru.com/showthread.php?t=523575</guid>
		</item>
		<item>
			<title><![CDATA[FindWindows & SendKeys]]></title>
			<link>http://forums.codeguru.com/showthread.php?t=523496&amp;goto=newpost</link>
			<pubDate>Thu, 03 May 2012 10:16:03 GMT</pubDate>
			<description><![CDATA[details about situation:
my job is to write some data in 2 app's. 
first app is a standalone app(company app) which is installed in my pc.
second app is a online web app(goverment app)
the data which must stored is this 2 app's is the same.
so i must work double.
my plan is to create my own app where i put this data and after that my app send data to this 2 app.
results:
for installed app i done(using findwindow and send keys)
issue:
i can see or find any window or control address in web app.
question:
is possible to find the address(hexa or decimal) in a web application ?
i try to use the zDump app to check if my code is wrong or the issue is a global one.
the results is the same. no addres find.
thanks for any sugestions or link's to tutorials pages]]></description>
			<content:encoded><![CDATA[<div>details about situation:<br />
my job is to write some data in 2 app's. <br />
first app is a standalone app(company app) which is installed in my pc.<br />
second app is a online web app(goverment app)<br />
the data which must stored is this 2 app's is the same.<br />
so i must work double.<br />
my plan is to create my own app where i put this data and after that my app send data to this 2 app.<br />
results:<br />
for installed app i done(using findwindow and send keys)<br />
issue:<br />
i can see or find any window or control address in web app.<br />
question:<br />
is possible to find the address(hexa or decimal) in a web application ?<br />
i try to use the zDump app to check if my code is wrong or the issue is a global one.<br />
the results is the same. no addres find.<br />
thanks for any sugestions or link's to tutorials pages</div>

]]></content:encoded>
			<category domain="http://forums.codeguru.com/forumdisplay.php?f=4">Visual Basic 6.0 Programming</category>
			<dc:creator>nexusm</dc:creator>
			<guid isPermaLink="true">http://forums.codeguru.com/showthread.php?t=523496</guid>
		</item>
		<item>
			<title>Anyone can help convert VB6.0 to VB 2010</title>
			<link>http://forums.codeguru.com/showthread.php?t=523491&amp;goto=newpost</link>
			<pubDate>Thu, 03 May 2012 07:34:59 GMT</pubDate>
			<description><![CDATA[Anyone can help me convert this vb6.0 codes to vb 2010?

Dim opt(9) As Integer

If opt(0) = 1 Then
    MSComm1.CommPort = opt(2)
    MSComm1.Settings = "38400,O,8,1"
    MSComm1.InputLen = 0
    MSComm1.PortOpen = True
    If MSComm2.PortOpen = True Then
        MSComm2.PortOpen = False
    End If
    MSComm1.Output = "Z" & vbCrLf
Else
    MSComm2.CommPort = opt(2)
    MSComm2.Settings = "38400,O,8,1"
    MSComm2.InputLen = 0
    MSComm2.PortOpen = True
    If MSComm1.PortOpen = True Then
        MSComm1.PortOpen = False
    End If
    MSComm2.Output = "Z" & vbCrLf
End If]]></description>
			<content:encoded><![CDATA[<div>Anyone can help me convert this vb6.0 codes to vb 2010?<br />
<br />
Dim opt(9) As Integer<br />
<br />
If opt(0) = 1 Then<br />
    MSComm1.CommPort = opt(2)<br />
    MSComm1.Settings = &quot;38400,O,8,1&quot;<br />
    MSComm1.InputLen = 0<br />
    MSComm1.PortOpen = True<br />
    If MSComm2.PortOpen = True Then<br />
        MSComm2.PortOpen = False<br />
    End If<br />
    MSComm1.Output = &quot;Z&quot; &amp; vbCrLf<br />
Else<br />
    MSComm2.CommPort = opt(2)<br />
    MSComm2.Settings = &quot;38400,O,8,1&quot;<br />
    MSComm2.InputLen = 0<br />
    MSComm2.PortOpen = True<br />
    If MSComm1.PortOpen = True Then<br />
        MSComm1.PortOpen = False<br />
    End If<br />
    MSComm2.Output = &quot;Z&quot; &amp; vbCrLf<br />
End If</div>

]]></content:encoded>
			<category domain="http://forums.codeguru.com/forumdisplay.php?f=4">Visual Basic 6.0 Programming</category>
			<dc:creator>XiongXiong</dc:creator>
			<guid isPermaLink="true">http://forums.codeguru.com/showthread.php?t=523491</guid>
		</item>
		<item>
			<title>Need some help ever time i open a project it say msdxm.ocx is missing</title>
			<link>http://forums.codeguru.com/showthread.php?t=523487&amp;goto=newpost</link>
			<pubDate>Thu, 03 May 2012 04:15:33 GMT</pubDate>
			<description>Hi, Everyone ever time I open a project I get a massage that says msdxm.ocx could not be found continue project any was . I found it in windows so I know I have it and I even downloaded msdxm.ocx and put that file in to my project folder, what dose this mean. And Im running windows 7 dose that mater .Thanks for your time</description>
			<content:encoded><![CDATA[<div>Hi, Everyone ever time I open a project I get a massage that says msdxm.ocx could not be found continue project any was . I found it in windows so I know I have it and I even downloaded msdxm.ocx and put that file in to my project folder, what dose this mean. And Im running windows 7 dose that mater .Thanks for your time</div>

]]></content:encoded>
			<category domain="http://forums.codeguru.com/forumdisplay.php?f=4">Visual Basic 6.0 Programming</category>
			<dc:creator>andrewjrmill825</dc:creator>
			<guid isPermaLink="true">http://forums.codeguru.com/showthread.php?t=523487</guid>
		</item>
	</channel>
</rss>

