<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: QTP DOTNetFactory (1): Creating a Custom Form</title>
	<atom:link href="http://relevantcodes.com/qtp-dotnetfactory-creating-a-custom-form/feed/" rel="self" type="application/rss+xml" />
	<link>http://relevantcodes.com/qtp-dotnetfactory-creating-a-custom-form/</link>
	<description>A Test Development Resource for HP QuickTest Professional.</description>
	<lastBuildDate>Thu, 09 Feb 2012 12:13:41 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
	<item>
		<title>By: Bitu Das</title>
		<link>http://relevantcodes.com/qtp-dotnetfactory-creating-a-custom-form/#comment-12712</link>
		<dc:creator>Bitu Das</dc:creator>
		<pubDate>Tue, 21 Dec 2010 19:35:17 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=333#comment-12712</guid>
		<description>Hi Anshoo,
How can I set the backhround color and background image of  a form created using dotnetfactory?
Please advise.</description>
		<content:encoded><![CDATA[<p>Hi Anshoo,<br />
How can I set the backhround color and background image of  a form created using dotnetfactory?<br />
Please advise.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anshoo Arora</title>
		<link>http://relevantcodes.com/qtp-dotnetfactory-creating-a-custom-form/#comment-743</link>
		<dc:creator>Anshoo Arora</dc:creator>
		<pubDate>Tue, 27 Oct 2009 02:55:31 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=333#comment-743</guid>
		<description>Bibek,

I didn&#039;t know you had a blog too! I tried to access the link, but its locked?</description>
		<content:encoded><![CDATA[<p>Bibek,</p>
<p>I didn&#8217;t know you had a blog too! I tried to access the link, but its locked?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anshoo Arora</title>
		<link>http://relevantcodes.com/qtp-dotnetfactory-creating-a-custom-form/#comment-740</link>
		<dc:creator>Anshoo Arora</dc:creator>
		<pubDate>Mon, 26 Oct 2009 23:36:56 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=333#comment-740</guid>
		<description>Hi Bibek,

Please try this:

&lt;pre&gt;
Set oForm = DotNetFactory.CreateInstance(&quot;System.Windows.Forms.Form&quot;, &quot;System.Windows.Forms&quot;)
Set oButtonOK = DotNetFactory.CreateInstance(&quot;System.Windows.Forms.Button&quot;, &quot;System.Windows.Forms&quot;)
Set oButtonCancel = DotNetFactory.CreateInstance(&quot;System.Windows.Forms.Button&quot;, &quot;System.Windows.Forms&quot;)
Set DiagReturn = DotNetFactory.CreateInstance(&quot;System.Windows.Forms.DialogResult&quot;, &quot;System.Windows.Forms&quot;)
Set oPoint = DotNetFactory.CreateInstance(&quot;System.Drawing.Point&quot;,&quot;System.Drawing&quot;, x, y)

With oPoint
	.x = 5
	.y = 5
End With

With oButtonOK
	.Text = &quot;OK&quot;
	.Location = oPoint
	.DialogResult = DiagReturn.Ok
End With

With oPoint
	.x = 5
	.y = 35
End With

With oButtonCancel
	.Text = &quot;Cancel&quot;
	.Location = oPoint
	.DialogResult = DiagReturn.Cancel
End With

With oForm
	.Height = 500
	.Controls.Add oButtonOK
	.Controls.Add oButtonCancel
	.ShowDialog
End With

If oForm.DialogResult = DiagReturn.Ok Then
	&#039;Code to open another form
	MsgBox &quot;Opening another form..&quot;
End If

If oForm.DialogResult = DiagReturn.Cancel Then
	&#039;Code to do something else
	MsgBox &quot;Doing something else..&quot;
End If

Set oForm = Nothing
Set oButton = Nothing
Set DiagReturn = Nothing
Set oPoint = Nothing
&lt;/pre&gt;

I haven&#039;t tested this code yet. If you experience any issues with it, please let me know and we&#039;ll work together to find a solution that works for you.</description>
		<content:encoded><![CDATA[<p>Hi Bibek,</p>
<p>Please try this:</p>
<pre>
Set oForm = DotNetFactory.CreateInstance("System.Windows.Forms.Form", "System.Windows.Forms")
Set oButtonOK = DotNetFactory.CreateInstance("System.Windows.Forms.Button", "System.Windows.Forms")
Set oButtonCancel = DotNetFactory.CreateInstance("System.Windows.Forms.Button", "System.Windows.Forms")
Set DiagReturn = DotNetFactory.CreateInstance("System.Windows.Forms.DialogResult", "System.Windows.Forms")
Set oPoint = DotNetFactory.CreateInstance("System.Drawing.Point","System.Drawing", x, y)

With oPoint
	.x = 5
	.y = 5
End With

With oButtonOK
	.Text = "OK"
	.Location = oPoint
	.DialogResult = DiagReturn.Ok
End With

With oPoint
	.x = 5
	.y = 35
End With

With oButtonCancel
	.Text = "Cancel"
	.Location = oPoint
	.DialogResult = DiagReturn.Cancel
End With

With oForm
	.Height = 500
	.Controls.Add oButtonOK
	.Controls.Add oButtonCancel
	.ShowDialog
End With

If oForm.DialogResult = DiagReturn.Ok Then
	'Code to open another form
	MsgBox "Opening another form.."
End If

If oForm.DialogResult = DiagReturn.Cancel Then
	'Code to do something else
	MsgBox "Doing something else.."
End If

Set oForm = Nothing
Set oButton = Nothing
Set DiagReturn = Nothing
Set oPoint = Nothing
</pre>
<p>I haven&#8217;t tested this code yet. If you experience any issues with it, please let me know and we&#8217;ll work together to find a solution that works for you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bibek Khatiwara</title>
		<link>http://relevantcodes.com/qtp-dotnetfactory-creating-a-custom-form/#comment-724</link>
		<dc:creator>Bibek Khatiwara</dc:creator>
		<pubDate>Mon, 26 Oct 2009 05:32:56 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=333#comment-724</guid>
		<description>Hi Anshoo! thnx I have created a form and added a text box and a button (”ok”)..it’s done..but i want to display the message eg:”done” is anyone clicks on the button..so what is the syntax for buton click..

&lt;pre&gt;
With oForm
    .Height =500
    .Controls.Add oButton
End with

With oButton
        If oButton is clicked then ‘i’m searching for this code..plz help as 
        oButton.Click is not working
        display message
    End if
End with
&lt;/pre&gt;
    Thank you in advance!</description>
		<content:encoded><![CDATA[<p>Hi Anshoo! thnx I have created a form and added a text box and a button (”ok”)..it’s done..but i want to display the message eg:”done” is anyone clicks on the button..so what is the syntax for buton click..</p>
<pre>
With oForm
    .Height =500
    .Controls.Add oButton
End with

With oButton
        If oButton is clicked then ‘i’m searching for this code..plz help as
        oButton.Click is not working
        display message
    End if
End with
</pre>
<p>    Thank you in advance!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anshoo Arora</title>
		<link>http://relevantcodes.com/qtp-dotnetfactory-creating-a-custom-form/#comment-652</link>
		<dc:creator>Anshoo Arora</dc:creator>
		<pubDate>Wed, 21 Oct 2009 00:16:33 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=333#comment-652</guid>
		<description>Thanks Devendra! Its been quite a long time. How have you been?</description>
		<content:encoded><![CDATA[<p>Thanks Devendra! Its been quite a long time. How have you been?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Devendra Sharma</title>
		<link>http://relevantcodes.com/qtp-dotnetfactory-creating-a-custom-form/#comment-650</link>
		<dc:creator>Devendra Sharma</dc:creator>
		<pubDate>Tue, 20 Oct 2009 19:26:45 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=333#comment-650</guid>
		<description>Great Anshoo!!</description>
		<content:encoded><![CDATA[<p>Great Anshoo!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: QTP &#38; DOTNetFactory - Creating a Custom Form with Multiple Objects (by Anshoo Arora) &#124; Relevant Codes</title>
		<link>http://relevantcodes.com/qtp-dotnetfactory-creating-a-custom-form/#comment-91</link>
		<dc:creator>QTP &#38; DOTNetFactory - Creating a Custom Form with Multiple Objects (by Anshoo Arora) &#124; Relevant Codes</dc:creator>
		<pubDate>Sat, 05 Sep 2009 19:52:11 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=333#comment-91</guid>
		<description>[...] QTP &amp; DOTNetFactory &#8211; Creating a Custom Form [...]</description>
		<content:encoded><![CDATA[<p>[...] QTP &amp; DOTNetFactory &#8211; Creating a Custom Form [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: QTP &#38; DOTNetFactory: Adding a CheckBox Control (by Anshoo Arora) &#124; Relevant Codes</title>
		<link>http://relevantcodes.com/qtp-dotnetfactory-creating-a-custom-form/#comment-81</link>
		<dc:creator>QTP &#38; DOTNetFactory: Adding a CheckBox Control (by Anshoo Arora) &#124; Relevant Codes</dc:creator>
		<pubDate>Fri, 04 Sep 2009 23:36:38 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=333#comment-81</guid>
		<description>[...] QTP &amp; DOTNetFactory &#8211; Creating a Custom Form [...]</description>
		<content:encoded><![CDATA[<p>[...] QTP &amp; DOTNetFactory &#8211; Creating a Custom Form [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: QTP &#38; DOTNetFactory (6): Adding a RadioButton Control (by Anshoo Arora) &#124; Relevant Codes</title>
		<link>http://relevantcodes.com/qtp-dotnetfactory-creating-a-custom-form/#comment-79</link>
		<dc:creator>QTP &#38; DOTNetFactory (6): Adding a RadioButton Control (by Anshoo Arora) &#124; Relevant Codes</dc:creator>
		<pubDate>Fri, 04 Sep 2009 23:35:38 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=333#comment-79</guid>
		<description>[...] QTP &amp; DOTNetFactory &#8211; Creating a Custom Form [...]</description>
		<content:encoded><![CDATA[<p>[...] QTP &amp; DOTNetFactory &#8211; Creating a Custom Form [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anshoo Arora</title>
		<link>http://relevantcodes.com/qtp-dotnetfactory-creating-a-custom-form/#comment-78</link>
		<dc:creator>Anshoo Arora</dc:creator>
		<pubDate>Fri, 04 Sep 2009 22:21:00 +0000</pubDate>
		<guid isPermaLink="false">http://relevantcodes.com/?p=333#comment-78</guid>
		<description>Thanks! :)</description>
		<content:encoded><![CDATA[<p>Thanks! :)</p>
]]></content:encoded>
	</item>
</channel>
</rss>

