<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>Beginner VB Forum RSS Feed (Replies Included)</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest posts from the 'Beginner VB' forum at Programmer's Heaven, including replies.</description>
    <language>en</language>
    <copyright>Copyright 2013 Programmers Heaven</copyright>
    <pubDate>Sat, 18 May 2013 02:09:20 -0700</pubDate>
    <lastBuildDate>Sat, 18 May 2013 02:09:20 -0700</lastBuildDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <image>
      <url>http://www.programmersheaven.com/images/ph.gif</url>
      <title>Programmers Heaven</title>
      <link>http://www.programmersheaven.com/</link>
      <width>88</width>
      <height>31</height>
    </image>
    <item>
      <title>How to disable "E" symbol in large digits?</title>
      <link>http://www.programmersheaven.com/mb/VB_Beginner/432064/432064/how-to-disable-e-symbol-in-large-digits/</link>
      <description>Hi!&lt;br /&gt;
&lt;br /&gt;
I'm creating Bytes Calculator in Visual Basic 2012.&lt;br /&gt;
I'm beginner on platform .net, before I was using VB6.&lt;br /&gt;
&lt;br /&gt;
In calculator is possible to convert e.g. PB to B.&lt;br /&gt;
So large symbols displays:&lt;br /&gt;
1 PB = 1,12589990684262E+15 B&lt;br /&gt;
&lt;br /&gt;
HOW TO DISABLE SYMBOL "E" TO SHOW NUMBER AS IS?&lt;br /&gt;
&lt;br /&gt;
Many many thanks for every help, reply or comments.&lt;br /&gt;
&lt;br /&gt;
Miro&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VB_Beginner/432064/432064/how-to-disable-e-symbol-in-large-digits/</guid>
      <pubDate>Mon, 13 May 2013 12:39:23 -0700</pubDate>
      <category>Beginner VB</category>
    </item>
    <item>
      <title>Hi guys, desperate for help with this exercise, anyone?</title>
      <link>http://www.programmersheaven.com/mb/VB_Beginner/430590/430590/hi-guys-desperate-for-help-with-this-exercise-anyone/</link>
      <description>its exercise that i need to complete it: procedures and functions but i havent clue how. &lt;br /&gt;
&lt;br&gt;&lt;br&gt;&lt;strong&gt;Attachment:&lt;/strong&gt; &lt;a href="http://www.programmersheaven.com/mb/DownloadAttachment.aspx?AttachmentID=2499"&gt;Exercise Functions and Procedures.doc&lt;/a&gt; (53760 bytes | downloaded 51 times)</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VB_Beginner/430590/430590/hi-guys-desperate-for-help-with-this-exercise-anyone/</guid>
      <pubDate>Mon, 10 Dec 2012 15:07:30 -0700</pubDate>
      <category>Beginner VB</category>
    </item>
    <item>
      <title>save to .txt</title>
      <link>http://www.programmersheaven.com/mb/VB_Beginner/430497/430497/save-to-txt/</link>
      <description>Please help.  I need to save to .txt with today's date as file name.  or with user input as file name.</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VB_Beginner/430497/430497/save-to-txt/</guid>
      <pubDate>Mon, 03 Dec 2012 20:52:14 -0700</pubDate>
      <category>Beginner VB</category>
    </item>
    <item>
      <title>Playing a sound file remotely?</title>
      <link>http://www.programmersheaven.com/mb/VB_Beginner/430325/430325/playing-a-sound-file-remotely/</link>
      <description>Here's the scenario...&lt;br /&gt;
&lt;br /&gt;
I work in a collections place, part of the way they do business is by requiring a general manager to hop on calls when debtors get to a certain point in a conversation.  At the moment, the collectors are basically shouting for a manager to come to their desks.  What I'm looking to do is to set up a form that will play a wav file requesting the general manager  from a dedicated machine on the LAN.  Basically a paging system run via PC.&lt;br /&gt;
We are all using Windows 7.&lt;br /&gt;
&lt;br /&gt;
So basically, what's the best way to have a button click fire a command to a remote machine to play a wav (or mp3) file?&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VB_Beginner/430325/430325/playing-a-sound-file-remotely/</guid>
      <pubDate>Tue, 20 Nov 2012 10:48:14 -0700</pubDate>
      <category>Beginner VB</category>
    </item>
    <item>
      <title>Help plz with mscomm</title>
      <link>http://www.programmersheaven.com/mb/VB_Beginner/429775/429775/help-plz-with-mscomm/</link>
      <description>Hello kevin for holland here..,&lt;br /&gt;
&lt;br /&gt;
i have the following device :&lt;br /&gt;
http://www.conrad.nl/ce/nl/product/750782/Voorvallenregistratie-voor-transponders/SHOP_AREA_25674&amp;amp;promotionareaSearchDetail=005&lt;br /&gt;
&lt;br /&gt;
the only thing i want to add in a program of mine is to see the &lt;br /&gt;
transponder that's ''NOW'' in the antennafield.&lt;br /&gt;
&lt;br /&gt;
as de manual says :(note: used google translate)&lt;br /&gt;
&lt;br /&gt;
Transponder number (T)&lt;br /&gt;
Command Description: Used to read a single transponder. If there are&lt;br /&gt;
no transponder in the field, gives the reader 'NOTAG'&lt;br /&gt;
as an answer. The transponder number is then 10&lt;br /&gt;
positions (eg AC3F00D1B4) as hexadecimal coded&lt;br /&gt;
ASCII character sequence indicated.&lt;br /&gt;
Format: &amp;lt;STX&amp;gt; &amp;lt;ADR&amp;gt; CT &amp;lt;CRC&amp;gt; &amp;lt;EOT&amp;gt;&lt;br /&gt;
Example: &amp;lt;STX&amp;gt; FFCT23 &amp;lt;EOT&amp;gt;&lt;br /&gt;
&amp;lt;STX&amp;gt; FFCT03C2208CFF64 &amp;lt;EOT&amp;gt;&lt;br /&gt;
reads the current transponder number 03C2208CFF.&lt;br /&gt;
&lt;br /&gt;
Can someone PLEASE help me with this .&lt;br /&gt;
to make a sourcecode only thats reading the transponder and puts it in a label/texbox or whatever.&lt;br /&gt;
&lt;br /&gt;
its driving me nuts , i dont know any thing about mscomm controll and the more i read about it the more confused ill become.&lt;br /&gt;
&lt;br /&gt;
if i have this i can make the rest of it my self (when needed). &lt;br /&gt;
&lt;br /&gt;
Thanks in advance!&lt;br /&gt;
&lt;br /&gt;
Regards, Kevin&lt;br /&gt;
(sorry for my bad english)&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VB_Beginner/429775/429775/help-plz-with-mscomm/</guid>
      <pubDate>Wed, 10 Oct 2012 08:24:28 -0700</pubDate>
      <category>Beginner VB</category>
    </item>
    <item>
      <title>Help plz with mscomm</title>
      <link>http://www.programmersheaven.com/mb/VB_Beginner/429774/429774/help-plz-with-mscomm/</link>
      <description>Hello kevin for holland here..,&lt;br /&gt;
&lt;br /&gt;
i have the following device :&lt;br /&gt;
http://www.conrad.nl/ce/nl/product/750782/Voorvallenregistratie-voor-transponders/SHOP_AREA_25674&amp;amp;promotionareaSearchDetail=005&lt;br /&gt;
&lt;br /&gt;
the only thing i want to add in a program of mine is to see the &lt;br /&gt;
transponder that's ''NOW'' in the antennafield.&lt;br /&gt;
&lt;br /&gt;
as de manual says :(note: used google translate)&lt;br /&gt;
&lt;br /&gt;
Transponder number (T)&lt;br /&gt;
Command Description: Used to read a single transponder. If there are&lt;br /&gt;
no transponder in the field, gives the reader 'NOTAG'&lt;br /&gt;
as an answer. The transponder number is then 10&lt;br /&gt;
positions (eg AC3F00D1B4) as hexadecimal coded&lt;br /&gt;
ASCII character sequence indicated.&lt;br /&gt;
Format: &amp;lt;STX&amp;gt; &amp;lt;ADR&amp;gt; CT &amp;lt;CRC&amp;gt; &amp;lt;EOT&amp;gt;&lt;br /&gt;
Example: &amp;lt;STX&amp;gt; FFCT23 &amp;lt;EOT&amp;gt;&lt;br /&gt;
&amp;lt;STX&amp;gt; FFCT03C2208CFF64 &amp;lt;EOT&amp;gt;&lt;br /&gt;
reads the current transponder number 03C2208CFF.&lt;br /&gt;
&lt;br /&gt;
Can someone PLEASE help me with this .&lt;br /&gt;
to make a sourcecode only thats reading the transponder and puts it in a label/texbox or whatever.&lt;br /&gt;
&lt;br /&gt;
its driving me nuts , i dont know any thing about mscomm controll and the more i read about it the more confused ill become.&lt;br /&gt;
&lt;br /&gt;
if i have this i can make the rest of it my self (when needed). &lt;br /&gt;
&lt;br /&gt;
Thanks in advance!&lt;br /&gt;
&lt;br /&gt;
Regards, Kevin&lt;br /&gt;
(sorry for my bad english)&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VB_Beginner/429774/429774/help-plz-with-mscomm/</guid>
      <pubDate>Wed, 10 Oct 2012 08:14:56 -0700</pubDate>
      <category>Beginner VB</category>
    </item>
    <item>
      <title>Greetings Everyone. Read Further</title>
      <link>http://www.programmersheaven.com/mb/VB_Beginner/427655/427655/greetings-everyone-read-further/</link>
      <description>I hope you all are ok.&lt;br /&gt;
My name is Carl and I want to learn a programming language and i have selected visual basic 6.0 to start from.. But there is something that has been bothering me from a long time and that is i can't seem to learn a programming language at all, i tried to learn php, c++, etc in the past but couldn't.. May be it is because i don't understand how the programming really goes..&lt;br /&gt;
I would really like to take an advice from you guys to help me in learning the programming language. and for the record, i have never programmed before at all..</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VB_Beginner/427655/427655/greetings-everyone-read-further/</guid>
      <pubDate>Mon, 27 Feb 2012 09:32:52 -0700</pubDate>
      <category>Beginner VB</category>
    </item>
    <item>
      <title>Re: Need help with loop program</title>
      <link>http://www.programmersheaven.com/mb/VB_Beginner/427520/427522/re-need-help-with-loop-program/#427522</link>
      <description>ohh wow I apologize for spam ...glitched I guess &lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VB_Beginner/427520/427522/re-need-help-with-loop-program/#427522</guid>
      <pubDate>Mon, 20 Feb 2012 12:51:01 -0700</pubDate>
      <category>Beginner VB</category>
    </item>
    <item>
      <title>Name sorting require assistance</title>
      <link>http://www.programmersheaven.com/mb/VB_Beginner/427521/427521/name-sorting-require-assistance/</link>
      <description>Here is the program directions :Design a program that asks the user for series of names (in no particular order). After the final person's name has been entered, the program should display the name that is first alphabetically and the name that is last alphabetically. For example, if the user enters the names Kristin, Joel, Beth, Zeb, and Chris, the program would display Adam and Zeb. Also the chart that I am supposed to follow is attached. &lt;br /&gt;
And here is the code that I've been going at for past 13 hrs. Please help me to figure it out. &lt;pre class="sourcecode"&gt; Module Module1
    Const MAX_Names = 6
    Sub Main()
        Dim name As String
        Dim count As Integer
        Dim highName as String
        Dim lowName as String
        count = 0
        Do Until count = MAX_Names
            Console.WriteLine("Enter the name: ")
            name = Console.ReadLine


        &amp;gt;&amp;gt;&amp;gt;&amp;gt;need some kind of condition that will test the names&amp;lt;&amp;lt;

            count = count + 1
        Loop
        
        Console.Write("Low name is:" + highName + vbCrLf)
        Console.Write("High name is:" + lowName + vbCrLf)
        
    End Sub
End Module&lt;/pre&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VB_Beginner/427521/427521/name-sorting-require-assistance/</guid>
      <pubDate>Mon, 20 Feb 2012 12:48:23 -0700</pubDate>
      <category>Beginner VB</category>
    </item>
    <item>
      <title>Need help with loop program</title>
      <link>http://www.programmersheaven.com/mb/VB_Beginner/427520/427520/need-help-with-loop-program/</link>
      <description>Here is the program directions :Design a program that asks the user for series of names (in no particular order). After the final person's name has been entered, the program should display the name that is first alphabetically and the name that is last alphabetically. For example, if the user enters the names Kristin, Joel, Beth, Zeb, and Chris, the program would display Adam and Zeb. Also the chart that I am supposed to follow is attached. &lt;br /&gt;
And here is the code that I've been going at for past 13 hrs. Please help me to figure it out. &lt;pre class="sourcecode"&gt; Module Module1
    Const MAX_Names = 6
    Sub Main()
        Dim name As String
        Dim count As Integer
        Dim highName as String
        Dim lowName as String
        count = 0
        Do Until count = MAX_Names
            Console.WriteLine("Enter the name: ")
            name = Console.ReadLine


        &amp;gt;&amp;gt;&amp;gt;&amp;gt;need some kind of condition that will test the names&amp;lt;&amp;lt;

            count = count + 1
        Loop
        
        Console.Write("Low name is:" + highName + vbCrLf)
        Console.Write("High name is:" + lowName + vbCrLf)
        
    End Sub
End Module&lt;/pre&gt;&lt;br /&gt;
&lt;br&gt;&lt;br&gt;&lt;strong&gt;Attachment:&lt;/strong&gt; &lt;a href="http://www.programmersheaven.com/mb/DownloadAttachment.aspx?AttachmentID=2312"&gt;Chart.pdf&lt;/a&gt; (66649 bytes | downloaded 68 times)</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VB_Beginner/427520/427520/need-help-with-loop-program/</guid>
      <pubDate>Mon, 20 Feb 2012 12:42:44 -0700</pubDate>
      <category>Beginner VB</category>
    </item>
    <item>
      <title>Need help with loop program</title>
      <link>http://www.programmersheaven.com/mb/VB_Beginner/427519/427519/need-help-with-loop-program/</link>
      <description>Here is the program directions :Design a program that asks the user for series of names (in no particular order). After the final person's name has been entered, the program should display the name that is first alphabetically and the name that is last alphabetically. For example, if the user enters the names Kristin, Joel, Beth, Zeb, and Chris, the program would display Adam and Zeb. Also the chart that I am supposed to follow is attached. &lt;br /&gt;
And here is the code that I've been going at for past 13 hrs. Please help me to figure it out. &lt;pre class="sourcecode"&gt; Module Module1
    Const MAX_Names = 6
    Sub Main()
        Dim name As String
        Dim count As Integer
        Dim highName as String
        Dim lowName as String
        count = 0
        Do Until count = MAX_Names
            Console.WriteLine("Enter the name: ")
            name = Console.ReadLine


        &amp;gt;&amp;gt;&amp;gt;&amp;gt;need some kind of condition that will test the names&amp;lt;&amp;lt;

            count = count + 1
        Loop
        
        Console.Write("Low name is:" + highName + vbCrLf)
        Console.Write("High name is:" + lowName + vbCrLf)
        
    End Sub
End Module&lt;/pre&gt;&lt;br /&gt;
&lt;br&gt;&lt;br&gt;&lt;strong&gt;Attachment:&lt;/strong&gt; &lt;a href="http://www.programmersheaven.com/mb/DownloadAttachment.aspx?AttachmentID=2311"&gt;Chart.pdf&lt;/a&gt; (66649 bytes | downloaded 47 times)</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VB_Beginner/427519/427519/need-help-with-loop-program/</guid>
      <pubDate>Mon, 20 Feb 2012 12:39:45 -0700</pubDate>
      <category>Beginner VB</category>
    </item>
    <item>
      <title>factorize big numbers</title>
      <link>http://www.programmersheaven.com/mb/VB_Beginner/426015/426015/factorize-big-numbers/</link>
      <description>Hi all...&lt;br /&gt;
&lt;br /&gt;
I'm using VB6 to write a program in which I need to factorize big numbers up to 10^20. &lt;br /&gt;
I already tried a few algorithms, but eather they can't generate big enough primefactors or they are much to slow...&lt;br /&gt;
&lt;br /&gt;
Now I wonder if there doesn't exist an API-function (is that the right name?) that I can use. Something from the kernel32-lib or so...&lt;br /&gt;
&lt;br /&gt;
Or, as last resort: is there an other (easy to learn) programming language that has better tools to do that kind of things?&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VB_Beginner/426015/426015/factorize-big-numbers/</guid>
      <pubDate>Thu, 01 Dec 2011 05:09:09 -0700</pubDate>
      <category>Beginner VB</category>
    </item>
    <item>
      <title>Saving user inputs and change</title>
      <link>http://www.programmersheaven.com/mb/VB_Beginner/425053/425053/saving-user-inputs-and-change/</link>
      <description>Hi,&lt;br /&gt;
&lt;br /&gt;
my software first software is nealry workin and i need to insert a save command. i have two question:&lt;br /&gt;
&lt;br /&gt;
first, is there a simple/fastest way to save everything than coding every textbox,radiobutton,etc... ? &lt;br /&gt;
eg: &lt;br /&gt;
  SaveSetting(name.Text, "settings", "plantname", 1000)&lt;br /&gt;
  GetSetting(name.Text, "settings", "plantname", "")&lt;br /&gt;
  (also will this work ???)&lt;br /&gt;
&lt;br /&gt;
and when i try to getsetting,software crash and its says that the value "path" i set to nothing...&lt;br /&gt;
I'm learning over the internet and this is the only way of saving i have found and i just can't find how to make it work :P&lt;br /&gt;
&lt;br /&gt;
Thank you for your help and advice !&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VB_Beginner/425053/425053/saving-user-inputs-and-change/</guid>
      <pubDate>Tue, 04 Oct 2011 07:52:50 -0700</pubDate>
      <category>Beginner VB</category>
    </item>
    <item>
      <title>Making IF statements wait for user input?</title>
      <link>http://www.programmersheaven.com/mb/VB_Beginner/424477/424477/making-if-statements-wait-for-user-input/</link>
      <description>I'm making a program that requires the user to define a folder for saving things in.&lt;br /&gt;
I'm using a Folder Browser Dialog to get the user to choose the folder, and then a dialog box pops up telling them which folder they've chosen and asking for confirmation. If they don't choose a folder, it's supposed to bring up another dialog box directing them to the menu where they can define one afterwards.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;If My.Settings.folderDefined = False Then
            Dim okay As Boolean 'this is whether the user is okay with the selected folder


            FolderBrowserDialog1.ShowDialog()
            My.Settings.defaultFolder = FolderBrowserDialog1.SelectedPath
            dlgFolderConfirm.Show()
            dlgFolderConfirm.lblNotifications.Text = My.Settings.defaultFolder &amp;amp; Chr(10) &amp;amp; "Is this okay?"

            If dlgFolderConfirm.DialogResult = System.Windows.Forms.DialogResult.Yes Then
                okay = True
            ElseIf dlgFolderConfirm.DialogResult = System.Windows.Forms.DialogResult.No Then
                okay = False
                dlgNotifications.Show()
                dlgNotifications.lblNotification.Text = "A folder has not been defined." &amp;amp; Chr(10) &amp;amp; "Go to Settings-&amp;gt;Define folder... to choose one."
            End If

        End If&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Problem is, what seems to happen is, it skims over the IF statements involving setting "okay" to True or False without waiting for the user to click 'yes' or 'no', so no matter what you select it doesn't do anything.&lt;br /&gt;
&lt;br /&gt;
I know this is ridiculously basic, which is making it all the more frustrating for me. Is there something I'm supposed to put in there to make it wait for input?&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VB_Beginner/424477/424477/making-if-statements-wait-for-user-input/</guid>
      <pubDate>Sun, 07 Aug 2011 00:35:49 -0700</pubDate>
      <category>Beginner VB</category>
    </item>
    <item>
      <title>This post has been deleted.</title>
      <link>http://www.programmersheaven.com/mb/VB_Beginner/422956/423814/this-post-has-been-deleted/#423814</link>
      <description>This post has been deleted.</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VB_Beginner/422956/423814/this-post-has-been-deleted/#423814</guid>
      <pubDate>Sun, 15 May 2011 10:56:58 -0700</pubDate>
      <category>Beginner VB</category>
    </item>
    <item>
      <title>Re: Visual Basic 6.0 on Windows 7 - Help Pls</title>
      <link>http://www.programmersheaven.com/mb/VB_Beginner/422956/423813/re-visual-basic-60-on-windows-7---help-pls/#423813</link>
      <description>Well vb 6 works on win 7 32-bit OS (i.e x86) with some errors  like when you drag a command button from one place to other then it will be shaggy while dragging.and also while deploying some of the .ocx added to the projects are outdated and no longer used by windows.but it wont cause you a problem because they are compensated by the advanced ones.and while installing the application written in vb 6 it will show a lot of copy errors depending on your windows build but just clicking IGNORE will make the installation success.on the vb 6 works perfectly with win 7 32-bit with some small but ignorable errors.i dont know abt  64-bits because i stopped using it long ago because it does not support 16-bit application such as c++ and cobol which im studying right now          &lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VB_Beginner/422956/423813/re-visual-basic-60-on-windows-7---help-pls/#423813</guid>
      <pubDate>Sun, 15 May 2011 10:40:56 -0700</pubDate>
      <category>Beginner VB</category>
    </item>
    <item>
      <title>Re: how to play sounds in VB6???</title>
      <link>http://www.programmersheaven.com/mb/VB_Beginner/372545/423792/re-how-to-play-sounds-in-vb6/#423792</link>
      <description>Try This&lt;br /&gt;
&lt;br /&gt;
Private Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA" _&lt;br /&gt;
        (ByVal lpszName As String, ByVal hModule As Long, _&lt;br /&gt;
        ByVal dwFlags As Long) As Long&lt;br /&gt;
&lt;br /&gt;
Dim RetVal as Long&lt;br /&gt;
&lt;br /&gt;
Private Sub cmdPlay()&lt;br /&gt;
	RetVal= PlaySound(App.Path &amp;amp; "\Media\accepted.wav", 0, &amp;amp;H0)&lt;br /&gt;
End If				A	A	   A&lt;br /&gt;
				|	|	   |&lt;br /&gt;
				|	|	   |&lt;br /&gt;
		Your Project Folder	|	   |&lt;br /&gt;
			Folder of where .WAV is    |&lt;br /&gt;
						File here&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VB_Beginner/372545/423792/re-how-to-play-sounds-in-vb6/#423792</guid>
      <pubDate>Sat, 14 May 2011 03:25:44 -0700</pubDate>
      <category>Beginner VB</category>
    </item>
    <item>
      <title>VBScript Issue w/ IE Object Displaying w/ focus</title>
      <link>http://www.programmersheaven.com/mb/VB_Beginner/423754/423754/vbscript-issue-w-ie-object-displaying-w-focus/</link>
      <description>I'm not sure if I'm in the correct forum or not, but I thought I&lt;br /&gt;
would give it a shot to see if someone can offer up some type of solution.  Let me preface this by saying that I am not very experienced at VBScript.  I've been trying to piece this together this small program from some examples.&lt;br /&gt;
&lt;br /&gt;
I'm trying to create a small desktop application using VBScript to present a menu to the user, allow selection of options 1-7, and then upload a file (based on user selection) via FTP to a host server.  &lt;br /&gt;
&lt;br /&gt;
Within this VBScript program, I'm trying to create a function that will create an IE window object that will display an HTML formatted menu with those 7 options.  There is a input box for the user to enter a single option 1 - 7.  I will then return the value that was entered by the user.&lt;br /&gt;
&lt;br /&gt;
The script I currently have will create the IE object, but the window does not have focus and will not display on top of any other open applications.  I am working on Windows XP.  I've seen this problem discussed on some other forums.  I've tried some suggestions that I've seen on some forums, but to no avail.  Does anyone have any tricks that will help me display this IE window with focus on top any other open apps?  We are soon upgrading to Windows 7.  Will that make and difference?  &lt;br /&gt;
&lt;br /&gt;
Any advice is much appreciated.  I had a suggestion today that I try an&lt;br /&gt;
additional piece of software called Z-Mover that will run in the background and pre-position any applications that open up.  But, I am hoping that I can do this without the additional software.  My code is listed below.  Thanks in advance for any suggestions.&lt;br /&gt;
&lt;br /&gt;
My Code:&lt;br /&gt;
&lt;br /&gt;
'-----------------------------------------------------------------------------&lt;br /&gt;
-&lt;br /&gt;
Function GetUserInput()&lt;br /&gt;
' This function uses Internet Explorer to&lt;br /&gt;
' create a dialog and prompt for user input.&lt;br /&gt;
'&lt;br /&gt;
' Argument:   [string] prompt text, e.g. "Please enter your name:"&lt;br /&gt;
' Returns:    [string] the user input typed in the dialog screen&lt;br /&gt;
'&lt;br /&gt;
   Dim objIE&lt;br /&gt;
   Dim UserPromptTable&lt;br /&gt;
&lt;br /&gt;
userPromptTable = "&amp;lt;table border=""0""&amp;gt; " _&lt;br /&gt;
   &amp;amp; "&amp;lt;tr&amp;gt;&amp;lt;td colspan=""3""&amp;gt;&amp;lt;h4&amp;gt;Please select payroll upload option:&lt;br /&gt;
&amp;lt;/h4&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt; " _&lt;br /&gt;
   &amp;amp; "&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt; " _&lt;br /&gt;
   &amp;amp; "&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;HOURLY:&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1.)&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Company 1&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt; " _&lt;br /&gt;
   &amp;amp; "&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;2.)&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Company 2&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt; " _&lt;br /&gt;
   &amp;amp; "&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;3.)&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Company 3&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt; " _&lt;br /&gt;
   &amp;amp; "&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;4.)&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Company 4&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt; " _&lt;br /&gt;
   &amp;amp; "&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;ADMIN:&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;5.)&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Company 5&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt; " _&lt;br /&gt;
   &amp;amp; "&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;6.)&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Company 6&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt; " _&lt;br /&gt;
   &amp;amp; "&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;7.)&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Company 7&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;"&lt;br /&gt;
&lt;br /&gt;
   ' Create an IE object&lt;br /&gt;
   Set objIE = CreateObject( "InternetExplorer.Application" )&lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
   ' Specify some of the IE window's settings&lt;br /&gt;
   objIE.Navigate "about:blank"&lt;br /&gt;
   objIE.Document.Title = "Input required " &amp;amp; String( 50, "." )&lt;br /&gt;
   objIE.ToolBar        = False&lt;br /&gt;
   objIE.Resizable      = False&lt;br /&gt;
   objIE.StatusBar      = False&lt;br /&gt;
   objIE.Width          = 360&lt;br /&gt;
   objIE.Height         = 360&lt;br /&gt;
&lt;br /&gt;
   ' Center the dialog window on the screen&lt;br /&gt;
   With objIE.Document.ParentWindow.Screen&lt;br /&gt;
       objIE.Left = (.AvailWidth  - objIE.Width ) \ 2&lt;br /&gt;
       objIE.Top  = (.Availheight - objIE.Height) \ 2&lt;br /&gt;
   End With&lt;br /&gt;
&lt;br /&gt;
   ' Wait till IE is ready&lt;br /&gt;
   Do While objIE.Busy&lt;br /&gt;
       WScript.Sleep 200&lt;br /&gt;
   Loop&lt;br /&gt;
   ' Insert the HTML code to prompt for user input&lt;br /&gt;
   objIE.Document.Body.InnerHTML = "&amp;lt;div align=""center""&amp;gt;&amp;lt;p&amp;gt;" &amp;amp;&lt;br /&gt;
userPromptTable _&lt;br /&gt;
                                 &amp;amp; "&amp;lt;/p&amp;gt;" &amp;amp; vbCrLf _&lt;br /&gt;
                                 &amp;amp; "&amp;lt;p&amp;gt;&amp;lt;input type=""text"" size=""1"" " _&lt;br /&gt;
                                 &amp;amp; "id=""UserInput""&amp;gt;&amp;lt;/p&amp;gt;" &amp;amp; vbCrLf _&lt;br /&gt;
                                 &amp;amp; "&amp;lt;p&amp;gt;&amp;lt;input type=""hidden"" id=""OK"" " _&lt;br /&gt;
                                 &amp;amp; "name=""OK"" value=""0""&amp;gt;" _&lt;br /&gt;
                                 &amp;amp; "&amp;lt;input type=""submit"" value="" OK "" "&lt;br /&gt;
_&lt;br /&gt;
                                 &amp;amp; "OnClick=""VBScript:OK.&lt;br /&gt;
Value=1""&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;"&lt;br /&gt;
   ' Hide the scrollbars&lt;br /&gt;
   objIE.Document.Body.Style.overflow = "auto"&lt;br /&gt;
   ' Make the window visible&lt;br /&gt;
   objIE.Visible = 1&lt;br /&gt;
   ' Set focus on input field&lt;br /&gt;
   objIE.Document.All.UserInput.Focus&lt;br /&gt;
   objShell.AppActivate objIE&lt;br /&gt;
&lt;br /&gt;
   ' Wait till the OK button has been clicked&lt;br /&gt;
   On Error Resume Next&lt;br /&gt;
   Do While objIE.Document.All.OK.Value = 0 &lt;br /&gt;
       WScript.Sleep 200&lt;br /&gt;
       ' Error handling code by Denis St-Pierre&lt;br /&gt;
       If Err Then ' user clicked red X (or alt-F4) to close IE window&lt;br /&gt;
           IELogin = Array( "", "" )&lt;br /&gt;
           objIE.Quit&lt;br /&gt;
           Set objIE = Nothing&lt;br /&gt;
           Exit Function&lt;br /&gt;
       End if&lt;br /&gt;
   Loop&lt;br /&gt;
   On Error Goto 0&lt;br /&gt;
&lt;br /&gt;
   ' Read the user input from the dialog window&lt;br /&gt;
   GetUserInput = objIE.Document.All.UserInput.Value&lt;br /&gt;
&lt;br /&gt;
   ' Close and release the object&lt;br /&gt;
   objIE.Quit&lt;br /&gt;
   Set objIE = Nothing&lt;br /&gt;
End Function&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VB_Beginner/423754/423754/vbscript-issue-w-ie-object-displaying-w-focus/</guid>
      <pubDate>Wed, 11 May 2011 11:28:03 -0700</pubDate>
      <category>Beginner VB</category>
    </item>
    <item>
      <title>Visual Basic 6.0 on Windows 7 - Help Pls</title>
      <link>http://www.programmersheaven.com/mb/VB_Beginner/422956/422956/visual-basic-60-on-windows-7---help-pls/</link>
      <description>Hi..Can Visual Basic 6.0 can run on Windows7??..and if I develop an application using Visual Basic 6.0,can it also run on Windows 7??..&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VB_Beginner/422956/422956/visual-basic-60-on-windows-7---help-pls/</guid>
      <pubDate>Fri, 01 Apr 2011 21:10:12 -0700</pubDate>
      <category>Beginner VB</category>
    </item>
    <item>
      <title>Help with VB Finding a Hex String</title>
      <link>http://www.programmersheaven.com/mb/VB_Beginner/422649/422649/help-with-vb-finding-a-hex-string/</link>
      <description>I am using the hex value "9C FF FF FF 64" as a North Star. I want the program to find that value then be able to count either forwards or backwards to find other hex values so the program knows what to change in the file.</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VB_Beginner/422649/422649/help-with-vb-finding-a-hex-string/</guid>
      <pubDate>Tue, 22 Mar 2011 10:20:53 -0700</pubDate>
      <category>Beginner VB</category>
    </item>
    <item>
      <title>Re: Radio buttons -</title>
      <link>http://www.programmersheaven.com/mb/VB_Beginner/421859/421870/re-radio-buttons--/#421870</link>
      <description>You should change TRadioButton.BackColor value in events you want, depending on rb state... &lt;br /&gt;
&lt;br /&gt;
something like &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If RadioButton1.Checked = True Then RadioButton1.BackColor = Color.Aqua&lt;br /&gt;
        Else RadioButton1.Checked = False then RadioButton1.BackColor = Color.Green &lt;br /&gt;
        End If&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.onedevteam.com/"&gt;http://www.onedevteam.com/&lt;/a&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VB_Beginner/421859/421870/re-radio-buttons--/#421870</guid>
      <pubDate>Sun, 20 Feb 2011 03:45:32 -0700</pubDate>
      <category>Beginner VB</category>
    </item>
    <item>
      <title>Radio buttons - change colour when selected, deselected and hovering</title>
      <link>http://www.programmersheaven.com/mb/VB_Beginner/421859/421859/radio-buttons---change-colour-when-selected-deselected-and-hovering/</link>
      <description>Sorry to be a pain but I was wondering if someone would be able to give me a few pointers on how to change the colour of a radio button when selected, deselected and hovered over. So far I've been using got focus, lost focus and mouse hover but I dont think thats quite right. My objective was to change the colour of radio boxes selected from different group boxes to enable the user to see what they have selected. Any help would be greatley appreciated.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VB_Beginner/421859/421859/radio-buttons---change-colour-when-selected-deselected-and-hovering/</guid>
      <pubDate>Sat, 19 Feb 2011 09:35:52 -0700</pubDate>
      <category>Beginner VB</category>
    </item>
    <item>
      <title>Re: VBscript install printer driver</title>
      <link>http://www.programmersheaven.com/mb/VB_Beginner/420738/420765/re-vbscript-install-printer-driver/#420765</link>
      <description>Looks like I solved my own problem.  Here is my finished working code:&lt;br /&gt;
&lt;pre class="sourcecode"&gt;strComputer = "."

Set objWMIService = GetObject("winmgmts:" _
&amp;amp; "{impersonationLevel=impersonate}!\\" &amp;amp; strComputer &amp;amp; "\root\cimv2")

Set colPrinters = objWMIService.ExecQuery _
    ("Select * From Win32_Printer Where DeviceID='ProDOC Printer'")
Set colPrintdrivers = objWMIService.ExecQuery _
	("Select * from Win32_PrinterDriver ")
	
flag = 0
'Look for laserjet driver in installed list
For Each objPrint in colPrintdrivers
	If objPrint.Name &amp;lt;&amp;gt; "HP Laserjet 4050 Series PCL6" Then
		flag = 1
	End if
Next
For Each objPrinter in colPrinters
	'set port to FILE:
    objPrinter.PortName = "FILE:"
    'install the printer driver if it wasn't found earlier
    If flag = 1 then
    	Set objDriver = objWMIService.Get("Win32_PrinterDriver")
		objWMIService.Security_.Privileges.AddAsString "SeLoadDriverPrivilege", True
		objDriver.Name = "HP Laserjet 4050 Series PCL6"
		objDriver.SupportedPlatform = "Windows NT x86"
		objDriver.Version = "3"
		errResult = objDriver.AddPrinterDriver(objDriver)
	 End If
    objPrinter.driverName = "HP Laserjet 4050 Series PCL6"
    objPrinter.Put_
Next
'display results
WScript.Echo ErrResult&lt;/pre&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VB_Beginner/420738/420765/re-vbscript-install-printer-driver/#420765</guid>
      <pubDate>Wed, 05 Jan 2011 17:09:56 -0700</pubDate>
      <category>Beginner VB</category>
    </item>
    <item>
      <title>Re: VBscript install printer driver</title>
      <link>http://www.programmersheaven.com/mb/VB_Beginner/420738/420764/re-vbscript-install-printer-driver/#420764</link>
      <description>Here's an update.  I found out after tinkering that the driver name of my HP Laserjet 4050 PCL6 is wrong.  I've tested this script with the laserjet 4 driver and that works.  Does anyone know the proper name for the laserjet 4050 PCL6?</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VB_Beginner/420738/420764/re-vbscript-install-printer-driver/#420764</guid>
      <pubDate>Wed, 05 Jan 2011 17:02:34 -0700</pubDate>
      <category>Beginner VB</category>
    </item>
    <item>
      <title>VBscript install printer driver</title>
      <link>http://www.programmersheaven.com/mb/VB_Beginner/420738/420738/vbscript-install-printer-driver/</link>
      <description>I couldn't find a VBscript forum so I hope this is ok.&lt;br /&gt;
&lt;br /&gt;
I am making a script that is supposed to change the port of the printer to FILE: (that's not my problem).  This script is also supposed to go through the list of installed printer drivers and if there is no HP Laserjet 4050 PCL6 installed then install the driver.  If it is installed then just change the driver of a specific printer to the Laserjet 4050 PCL6.  The problem I have is that I get an error 87 every time I run it.  I know it has something to do with the printer install.  If I comment that out the whole script runs fine.  Any ideas?&lt;br /&gt;
&lt;br /&gt;
Here is the code:&lt;br /&gt;
&lt;pre class="sourcecode"&gt;strComputer = "."

Set objWMIService = GetObject("winmgmts:" _
&amp;amp; "{impersonationLevel=impersonate}!\\" &amp;amp; strComputer &amp;amp; "\root\cimv2")

Set colPrinters = objWMIService.ExecQuery _
    ("Select * From Win32_Printer Where DeviceID='ProDOC Printer'")
Set colPrintdrivers = objWMIService.ExecQuery _
	("Select * from Win32_PrinterDriver ")
	
flag = 0
'Look for laserjet driver in installed list
For Each objPrint in colPrintdrivers
	If objPrint.Name &amp;lt;&amp;gt; "HP Laserjet 4050 PCL6" Then
		flag = 1
	End if
Next
For Each objPrinter in colPrinters
	'set port to FILE:
    objPrinter.PortName = "FILE:"
    'install the printer driver if it wasn't found earlier
    If flag = 1 then
    	Set objDriver = objWMIService.Get("Win32_PrinterDriver")
		objWMIService.Security_.Privileges.AddAsString "SeLoadDriverPrivilege", True
		objDriver.Name = "HP Laserjet 4050 PCL6"
		objDriver.SupportedPlatform = "Windows NT x86"
		objDriver.Version = "3"
		errResult = objDriver.AddPrinterDriver(objDriver)
	 End If
	'if the driver is installed, change the driver of the selected printer
    If flag = 0 Then
    	objPrinter.driverName = "HP Laserjet 4050 Series PCL6"
    End If
    objPrinter.Put_
Next
'display results
WScript.Echo ErrResult&lt;/pre&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VB_Beginner/420738/420738/vbscript-install-printer-driver/</guid>
      <pubDate>Tue, 04 Jan 2011 15:55:46 -0700</pubDate>
      <category>Beginner VB</category>
    </item>
  </channel>
</rss>