<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4421999031233037653</id><updated>2012-01-20T13:33:51.576-08:00</updated><title type='text'>yourProsoft</title><subtitle type='html'>virtuality belivers to provide IT solutions
&lt;br&gt;Owner: Wael AlGhool</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://yourprosoft.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4421999031233037653/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://yourprosoft.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Wael AlGhool</name><uri>http://www.blogger.com/profile/12348835436349517930</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_lU9sJzT5R6I/R-8xT4OO1YI/AAAAAAAAADE/xIxN20Hls3I/S220/29032008456_small.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>25</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4421999031233037653.post-5684158950193843435</id><published>2012-01-20T13:00:00.000-08:00</published><updated>2012-01-20T13:01:21.559-08:00</updated><title type='text'>MFC "encountered an improper argument" message</title><content type='html'>&lt;div class="Section1"&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;b&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:#632423"&gt;Hi there,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:10.0pt;font-family:&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:#632423"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;b&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:#632423"&gt;The story:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:10.0pt;font-family:&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:#632423"&gt;My MFC application "Schedule" that I work in 2 years ago faced by a very strange bug, the application is built using VC++, VS2008 on vista &lt;/span&gt;&lt;span style="font-size:10.0pt;font-family:&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:#632423"&gt;platform&lt;/span&gt;&lt;span style="font-size:10.0pt;font-family:&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:#632423"&gt; and configured to target vista platform by assigning WINVER=0x0600, _WIN32_WINNT=0x0600, _WIN32_WINDOWS=0x0410.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:10.0pt;font-family:&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:#632423"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:10.0pt;font-family:&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:#632423"&gt;It runs perfectly on whatever machine running WinXP/Vista, other O.S.s are not available to test on. An overseas customer claimed a bug when she tried to save documents, her machine was HP-dv6000 with WinXP installed. I tolled her to upgrade the machine up to WinXP-SP3, but she upgraded up to Windows7 and the bug still exist.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:10.0pt;font-family:&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:#632423"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:10.0pt;font-family:&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:#632423"&gt;The Bug is such a message says "encountered an improper argument", it emerged when she tried to save/open a file.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:10.0pt;font-family:&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:#632423"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" align="center" style="text-align:center;text-autospace:none; direction:ltr;unicode-bidi:embed"&gt;&lt;span style="font-family:&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:#632423"&gt;&lt;a href="http://3.bp.blogspot.com/-PKcgTs_K9co/TxnTry5crdI/AAAAAAAAAdU/BKLxteAiHz8/s1600/image001-754771.png"&gt;&lt;img src="http://3.bp.blogspot.com/-PKcgTs_K9co/TxnTry5crdI/AAAAAAAAAdU/BKLxteAiHz8/s320/image001-754771.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5699819552764636626" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;span style="font-size:10.0pt; font-family:&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;color:#632423"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:10.0pt;font-family:&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:#632423"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:10.0pt;font-family:&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:#632423"&gt;I googled every where but nobody has solution or a resolution, even in 2009 Microsoft tolled somebody that this issue is solved in VS2010, others talk about resource conflictions according to windows upgrades.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:10.0pt;font-family:&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:#632423"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:10.0pt;font-family:&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:#632423"&gt;After long time I decided to investigate, where I spent 12 hours of digging into MFC source code and files, and then discovered the problem.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:10.0pt;font-family:&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:#632423"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:10.0pt;font-family:&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:#632423"&gt;It was the following statement that throws exception because of an invalided resource ID.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:10.0pt;font-family:&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:green"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-indent:36.0pt;text-autospace: none;direction:ltr;unicode-bidi:embed"&gt;&lt;span style="font-size:10.0pt; font-family:&amp;quot;Courier New&amp;quot;;color:green"&gt;ENSURE(title.LoadString(nIDSTitle = bReplace ? AFX_IDS_SAVEFILE : AFX_IDS_SAVEFILECOPY));&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:10.0pt;font-family:&amp;quot;Courier New&amp;quot;; color:green"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:10.0pt;font-family:&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:#632423"&gt;"title" is a CString object that has to displayed in title bar of CFileDialog, it then be loaded first from a string resource AFX_IDS_SAVEFILE or AFX_IDS_SAVEFILECOPY which are not exist at the machine of the customer.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:10.0pt;font-family:&amp;quot;Courier New&amp;quot;; color:green"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:10.0pt;font-family:&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:#632423"&gt;I successfully simulated the same bug on my own machine using the following lines of code.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:10.0pt;font-family:&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:#632423"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:10.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;      &lt;span style="color:green"&gt;CString temp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:10.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;      &lt;span style="color:green"&gt;ENSURE(temp.LoadString(0xF012));// 0xF012 is invalide&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:10.0pt;font-family:&amp;quot;Courier New&amp;quot;; color:green"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:10.0pt;font-family:&amp;quot;Courier New&amp;quot;; color:green"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;b&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:#632423"&gt;What is ENSURE()?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:10.0pt;font-family:&amp;quot;Courier New&amp;quot;; color:green"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:10.0pt;font-family:&amp;quot;Courier New&amp;quot;; color:green"&gt;#define ENSURE(cond)          ENSURE_THROW(cond, ::AfxThrowInvalidArgException() ) &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:10.0pt;font-family:&amp;quot;Courier New&amp;quot;; color:green"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:10.0pt;font-family:&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:#632423"&gt;The following paragraph describes what is the macro ENSURE, I cut this paragraph from MSN and past it here.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:10.0pt;font-family:&amp;quot;Courier New&amp;quot;; color:green"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:10.0pt;font-family:&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:#0070C0"&gt;The purpose of these macros is to improve the validation of parameters. The macros prevent further processing of incorrect parameters in your code. Unlike the ASSERT macros, the ENSURE macros throw an exception in addition to generating an assertion.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:10.0pt;font-family:&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:#0070C0"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:10.0pt;font-family:&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:#0070C0"&gt;The macros behave in two ways, according to the project configuration. The macros call ASSERT and then throw an exception if the assertion fails. Thus, in Debug configurations (that is, where _DEBUG is defined) the macros produce an assertion and exception while in Release configurations, the macros produce only the exception (ASSERT does not evaluate the expression in Release configurations).&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:10.0pt;font-family:&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:#0070C0"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:10.0pt;font-family:&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:#0070C0"&gt;The macro ENSURE_ARG acts like the ENSURE macro.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:10.0pt;font-family:&amp;quot;Courier New&amp;quot;; color:green"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:10.0pt;font-family:&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:#632423"&gt;To solve this bug I made two steps, First: I replaced CWinAPP::OnFileOpen using the following code:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:10.0pt;font-family:&amp;quot;Courier New&amp;quot;; color:green"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;; color:green"&gt;//---------------------------------------------------------------------&lt;/span&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;;color:blue"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;; color:blue"&gt;void&lt;/span&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt; CScheduleApp::OnMyFileOpen()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;    &lt;span style="color:green"&gt;   //manual open using CFileDialog&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-indent:36.0pt;text-autospace: none;direction:ltr;unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family: &amp;quot;Courier New&amp;quot;"&gt;CString strDocFileName =  _T(&lt;span style="color:#A31515"&gt;""&lt;/span&gt;); &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;       CFileDialog *pDlg;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;       pDlg = &lt;span style="color:blue"&gt;new&lt;/span&gt;  CFileDialog (TRUE,_T(&lt;span style="color:#A31515"&gt;"yps"&lt;/span&gt;),strDocFileName,OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;       _T(&lt;span style="color:#A31515"&gt;"File (*.yps)|*.yps|All Files (*.*)|*.*||"&lt;/span&gt;),NULL);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;    &lt;span style="color:green"&gt;   //&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;       m_strCurFolder = m_strCurFolder.IsEmpty() ? GetParentFolder():m_strCurFolder;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;       pDlg-&amp;gt;m_ofn.lpstrInitialDir = m_strCurFolder.GetBuffer(MAX_PATH);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;       pDlg-&amp;gt;m_ofn.lpstrTitle = _T(&lt;span style="color:#A31515"&gt;"&lt;span lang="AR-SA" dir="RTL"&gt;فتح&lt;/span&gt;&lt;span dir="LTR"&gt;&lt;/span&gt;&lt;span dir="LTR"&gt;&lt;/span&gt;&lt;span dir="LTR"&gt;&lt;/span&gt;&lt;span dir="LTR"&gt;&lt;/span&gt;"&lt;/span&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;       &lt;span style="color:blue"&gt;if&lt;/span&gt;(pDlg-&amp;gt;DoModal()==IDOK)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;       {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;              strDocFileName = pDlg-&amp;gt;GetPathName();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;        &lt;span style="color:green"&gt;      //the next line is optained from the following mfc source file&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;              &lt;span style="color:green"&gt;//C:\Program Files\Microsoft Visual Studio 9.0\VC\atlmfc\src\mfc\docmgr.cpp&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;              AfxGetApp()-&amp;gt;OpenDocumentFile(strDocFileName);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;       }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;       m_strCurFolder.ReleaseBuffer();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;       &lt;span style="color:blue"&gt;delete&lt;/span&gt; pDlg;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;    &lt;span style="color:green"&gt;   //Keep track of obtained folder as default for next open operation&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;       m_strCurFolder = strDocFileName.IsEmpty() ? m_strCurFolder:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-indent:36.0pt;text-autospace: none;direction:ltr;unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family: &amp;quot;Courier New&amp;quot;"&gt;(strDocFileName.IsEmpty() ? _T(&lt;span style="color:#A31515"&gt;""&lt;/span&gt;):strDocFileName.Left(strDocFileName.ReverseFind(&lt;span style="color:#A31515"&gt;'\\'&lt;/span&gt;)+1));&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;    &lt;span style="color:green"&gt;   //AfxMessageBox(m_strCurFolder);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;       theApp.WriteString(_T(&lt;span style="color:#A31515"&gt;"CurUserFolder"&lt;/span&gt;),m_strCurFolder);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;; color:green"&gt;//---------------------------------------------------------------------&lt;/span&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;;color:blue"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:10.0pt;font-family:&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:#632423"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:10.0pt;font-family:&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:#632423"&gt;Second: I override CDocumment::DoSave() funtion to prevent it from calling AfxGetApp()-&amp;gt;DoPromptFileName that uses the buggy resource, here is the code:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;; color:green"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;; color:green"&gt;//---------------------------------------------------------------------&lt;/span&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;;color:blue"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;BOOL CScheduleDoc::DoSave(LPCTSTR lpszPathName, BOOL bReplace)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;       CString newName = lpszPathName;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;       &lt;span style="color:blue"&gt;if&lt;/span&gt; (newName.IsEmpty())&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;       {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;              CDocTemplate* pTemplate = GetDocTemplate();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;              ASSERT(pTemplate != NULL);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;              newName = m_strPathName;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;              &lt;span style="color:blue"&gt;if&lt;/span&gt; (bReplace &amp;amp;&amp;amp; newName.IsEmpty())&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;              {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;                     newName = m_strTitle;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;                     &lt;span style="color:green"&gt;// check for dubious filename&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;                     &lt;span style="color:blue"&gt;int&lt;/span&gt; iBad = newName.FindOneOf(_T(&lt;span style="color:#A31515"&gt;":/\\"&lt;/span&gt;));&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;                     &lt;span style="color:blue"&gt;if&lt;/span&gt; (iBad != -1)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;                           newName.ReleaseBuffer(iBad);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;                     &lt;span style="color:green"&gt;// append the default suffix if there is one&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;                     CString strExt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;                     &lt;span style="color:blue"&gt;if&lt;/span&gt; (pTemplate-&amp;gt;GetDocString(strExt, CDocTemplate::filterExt) &amp;amp;&amp;amp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;                       !strExt.IsEmpty())&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;                     {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;                            ASSERT(strExt[0] == &lt;span style="color:#A31515"&gt;'.'&lt;/span&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;                           &lt;span style="color:blue"&gt;int&lt;/span&gt; iStart = 0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;                           newName += strExt.Tokenize(_T(&lt;span style="color:#A31515"&gt;";"&lt;/span&gt;), iStart);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;                     }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;              }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;              &lt;span style="color:green"&gt;//Replace the bug lines with a new technique&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;              &lt;span style="color:green"&gt;//if (!AfxGetApp()-&amp;gt;DoPromptFileName(newName,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;              &lt;span style="color:green"&gt;//  bReplace ? AFX_IDS_SAVEFILE : AFX_IDS_SAVEFILECOPY,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;              &lt;span style="color:green"&gt;//  OFN_HIDEREADONLY | OFN_PATHMUSTEXIST, FALSE, pTemplate))&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;              &lt;span style="color:green"&gt;//     return FALSE;       // don't even attempt to save&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;; color:green"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;        &lt;span style="color:blue"&gt;      if&lt;/span&gt;(!MyDoPromptFileName(newName,bReplace))&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;              &lt;span style="color:blue"&gt;return&lt;/span&gt; &lt;span style="color:blue"&gt;false&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;       }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;       CWaitCursor wait;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;       &lt;span style="color:blue"&gt;if&lt;/span&gt; (!OnSaveDocument(newName))&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;       {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;              &lt;span style="color:blue"&gt;if&lt;/span&gt; (lpszPathName == NULL)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;              {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;                     &lt;span style="color:green"&gt;// be sure to delete the file&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;                     TRY&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;                     {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;                           CFile::Remove(newName);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;                     }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;                     CATCH_ALL(e)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;                     {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;                &lt;span style="color:green"&gt;           //the normal place for the following Macro is in mfc\stdafx.h&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;                     &lt;span style="color:green"&gt;       //I bring it here becuase it is used only here and I have no plan to use it anywhere&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;                &lt;span style="color:blue"&gt;           #define&lt;/span&gt; DELETE_EXCEPTION(e) &lt;span style="color:blue"&gt;do&lt;/span&gt; { &lt;span style="color:blue"&gt;if&lt;/span&gt;(e) { e-&amp;gt;Delete(); } } &lt;span style="color:blue"&gt;while&lt;/span&gt; (0)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;                &lt;span style="color:green"&gt;           //&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;                           TRACE(traceAppMsg, 0, &lt;span style="color:#A31515"&gt;"Warning: failed to delete file after failed SaveAs.\n"&lt;/span&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;                           DELETE_EXCEPTION(e);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;                     }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;                     END_CATCH_ALL&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;              }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;              &lt;span style="color:blue"&gt;return&lt;/span&gt; FALSE;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;       }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;       &lt;span style="color:green"&gt;// reset the title and change the document name&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;       &lt;span style="color:blue"&gt;if&lt;/span&gt; (bReplace)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;              SetPathName(newName);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;       &lt;span style="color:blue"&gt;return&lt;/span&gt; TRUE;        &lt;span style="color:green"&gt;// success&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;BOOL CScheduleDoc::MyDoPromptFileName(CString&amp;amp; fileName, &lt;span style="color: blue"&gt;bool&lt;/span&gt; bReplace)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;    CFileDialog *pDlg;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;    pDlg = &lt;span style="color:blue"&gt;new&lt;/span&gt;  CFileDialog (FALSE,_T(&lt;span style="color:#A31515"&gt;"yps"&lt;/span&gt;),fileName,OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;    _T(&lt;span style="color:#A31515"&gt;"Timetable File (*.yps)|*.yps|All Files (*.*)|*.*||"&lt;/span&gt;),NULL);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;    CString title = bReplace ? _T(&lt;span style="color:#A31515"&gt;"&lt;span lang="AR-SA" dir="RTL"&gt;حفظ&lt;/span&gt;&lt;span dir="LTR"&gt;&lt;/span&gt;&lt;span dir="LTR"&gt;&lt;/span&gt;&lt;span lang="AR-SA"&gt;&lt;span dir="LTR"&gt;&lt;/span&gt;&lt;span dir="LTR"&gt;&lt;/span&gt; &lt;span dir="RTL"&gt;جدول&lt;/span&gt;&lt;span dir="LTR"&gt;&lt;/span&gt;&lt;span dir="LTR"&gt;&lt;/span&gt;&lt;span dir="LTR"&gt;&lt;/span&gt;&lt;span dir="LTR"&gt;&lt;/span&gt; &lt;span dir="RTL"&gt;الحصص&lt;/span&gt;&lt;/span&gt;&lt;span dir="LTR"&gt;&lt;/span&gt;&lt;span dir="LTR"&gt;&lt;/span&gt;&lt;span dir="LTR"&gt;&lt;/span&gt;&lt;span dir="LTR"&gt;&lt;/span&gt;"&lt;/span&gt;):_T(&lt;span style="color:#A31515"&gt;"&lt;span lang="AR-SA" dir="RTL"&gt;حفظ&lt;/span&gt;&lt;span dir="LTR"&gt;&lt;/span&gt;&lt;span dir="LTR"&gt;&lt;/span&gt;&lt;span lang="AR-SA"&gt;&lt;span dir="LTR"&gt;&lt;/span&gt;&lt;span dir="LTR"&gt;&lt;/span&gt; &lt;span dir="RTL"&gt;جدول&lt;/span&gt;&lt;span dir="LTR"&gt;&lt;/span&gt;&lt;span dir="LTR"&gt;&lt;/span&gt;&lt;span dir="LTR"&gt;&lt;/span&gt;&lt;span dir="LTR"&gt;&lt;/span&gt; &lt;span dir="RTL"&gt;الحصص&lt;/span&gt;&lt;span dir="LTR"&gt;&lt;/span&gt;&lt;span dir="LTR"&gt;&lt;/span&gt;&lt;span dir="LTR"&gt;&lt;/span&gt;&lt;span dir="LTR"&gt;&lt;/span&gt; &lt;span dir="RTL"&gt;في&lt;/span&gt;&lt;span dir="LTR"&gt;&lt;/span&gt;&lt;span dir="LTR"&gt;&lt;/span&gt;&lt;span dir="LTR"&gt;&lt;/span&gt;&lt;span dir="LTR"&gt;&lt;/span&gt; &lt;span dir="RTL"&gt;ملف&lt;/span&gt;&lt;span dir="LTR"&gt;&lt;/span&gt;&lt;span dir="LTR"&gt;&lt;/span&gt;&lt;span dir="LTR"&gt;&lt;/span&gt;&lt;span dir="LTR"&gt;&lt;/span&gt; &lt;span dir="RTL"&gt;آخر&lt;/span&gt;&lt;/span&gt;&lt;span dir="LTR"&gt;&lt;/span&gt;&lt;span dir="LTR"&gt;&lt;/span&gt;&lt;span dir="LTR"&gt;&lt;/span&gt;&lt;span dir="LTR"&gt;&lt;/span&gt;"&lt;/span&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;    pDlg-&amp;gt;m_ofn.lpstrTitle = title;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;    &lt;span style="color:blue"&gt;if&lt;/span&gt;(pDlg-&amp;gt;DoModal()!=IDOK)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;        &lt;span style="color:blue"&gt;return&lt;/span&gt; FALSE;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;    fileName=pDlg-&amp;gt;GetPathName();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;    &lt;span style="color:blue"&gt;return&lt;/span&gt; TRUE;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;"&gt;}&lt;span style="color:green"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;; color:green"&gt;//---------------------------------------------------------------------&lt;/span&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;;color:blue"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:8.0pt;font-family:&amp;quot;Courier New&amp;quot;; color:green"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:left;text-autospace:none;direction:ltr; unicode-bidi:embed"&gt;&lt;span style="font-size:10.0pt;font-family:&amp;quot;Courier New&amp;quot;; color:green"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4421999031233037653-5684158950193843435?l=yourprosoft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yourprosoft.blogspot.com/feeds/5684158950193843435/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yourprosoft.blogspot.com/2012/01/mfc-encountered-improper-argument.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4421999031233037653/posts/default/5684158950193843435'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4421999031233037653/posts/default/5684158950193843435'/><link rel='alternate' type='text/html' href='http://yourprosoft.blogspot.com/2012/01/mfc-encountered-improper-argument.html' title='MFC &quot;encountered an improper argument&quot; message'/><author><name>Wael AlGhool</name><uri>http://www.blogger.com/profile/12348835436349517930</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_lU9sJzT5R6I/R-8xT4OO1YI/AAAAAAAAADE/xIxN20Hls3I/S220/29032008456_small.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-PKcgTs_K9co/TxnTry5crdI/AAAAAAAAAdU/BKLxteAiHz8/s72-c/image001-754771.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4421999031233037653.post-3858621309116906269</id><published>2011-06-30T06:52:00.000-07:00</published><updated>2011-06-30T07:04:16.069-07:00</updated><title type='text'>C# access webservice from behind proxy</title><content type='html'>&lt;span&gt;&lt;p align="justify"&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;I was trying to use C# .NET desktop application to access a webservice from my office, the web-service is behind a proxy firewall, I was annoyed by seeing the following error message &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;&lt;strong&gt;"-&lt;span class="Apple-style-span"&gt; &lt;span class="Apple-style-span"&gt;The request failed with HTTP status 407: Proxy Authentication Required&lt;/span&gt;&lt;/span&gt;"&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;/span&gt;By googling I found a solution that enables me to disable proxy &lt;span class="Apple-style-span" &gt;"&lt;a href="http://stackoverflow.com/questions/2131933/http-407-proxy-authentication-error-when-calling-a-web-service"&gt;http://stackoverflow.com/questions/2131933/http-407-proxy-authentication-error-when-calling-a-web-service&lt;/a&gt;"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To disable the proxy, in the App.config file add the following configuration&lt;br /&gt;&lt;span&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&amp;lt;system.net&amp;gt;&lt;br /&gt;&amp;lt;defaultProxy enabled="false" useDefaultCredentials="false"&amp;gt;&lt;br /&gt;&amp;lt;proxy/&amp;gt;&lt;br /&gt;&amp;lt;bypasslist/&amp;gt;&lt;br /&gt;&amp;lt;module/&amp;gt;&lt;br /&gt;&amp;lt;/defaultProxy&amp;gt;&lt;br /&gt;&amp;lt;/system.net&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;To enable the proxy and to use the default proxy settings(specified in IE) add this configuration in your App.config&lt;/p&gt;&lt;pre&gt;&lt;code&gt;&amp;lt;system.net&amp;gt;&lt;br /&gt;&amp;lt;defaultProxy enabled="true" useDefaultCredentials="true"&amp;gt;&lt;br /&gt;&amp;lt;proxy/&amp;gt;&lt;br /&gt;&amp;lt;bypasslist/&amp;gt;&lt;br /&gt;&amp;lt;module/&amp;gt;&lt;br /&gt;&amp;lt;/defaultProxy&amp;gt;&lt;br /&gt;&amp;lt;/system.net&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4421999031233037653-3858621309116906269?l=yourprosoft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yourprosoft.blogspot.com/feeds/3858621309116906269/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yourprosoft.blogspot.com/2011/06/c-access-webservice-from-behind-proxy.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4421999031233037653/posts/default/3858621309116906269'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4421999031233037653/posts/default/3858621309116906269'/><link rel='alternate' type='text/html' href='http://yourprosoft.blogspot.com/2011/06/c-access-webservice-from-behind-proxy.html' title='C# access webservice from behind proxy'/><author><name>Wael AlGhool</name><uri>http://www.blogger.com/profile/12348835436349517930</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_lU9sJzT5R6I/R-8xT4OO1YI/AAAAAAAAADE/xIxN20Hls3I/S220/29032008456_small.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4421999031233037653.post-2708515219178792489</id><published>2011-05-30T10:32:00.000-07:00</published><updated>2011-05-30T10:33:32.683-07:00</updated><title type='text'>Godaddy Email problem with hosted applications</title><content type='html'>&lt;div class="Section1"&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size:13.0pt;font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:black"&gt;My web application hosted on Godaddy can't send email messages after being uploaded there. But it works normally and can send email messages from my local machine. I tried many variations for SMTP configuration as follows but no-way for success:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size:13.0pt;font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:black"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size:10.0pt;color:black"&gt;1- This configuration is working from my local machine&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l1 level1 lfo1"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size:10.0pt;font-family:Symbol;color:black"&gt;&lt;span style="mso-list: Ignore"&gt;·&lt;span style="font:7.0pt &amp;quot;Times New Roman&amp;quot;"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span dir="LTR"&gt;&lt;/span&gt;&lt;span style="font-size: 10.0pt;color:black"&gt;SMTP: &lt;a href="http://smtp.yourprosoft.com/" target="_blank"&gt;smtp.mydomain.com&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l1 level1 lfo1"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size:10.0pt;font-family:Symbol;color:black"&gt;&lt;span style="mso-list: Ignore"&gt;·&lt;span style="font:7.0pt &amp;quot;Times New Roman&amp;quot;"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span dir="LTR"&gt;&lt;/span&gt;&lt;span style="font-size: 10.0pt;color:black"&gt;Port: 25&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l1 level1 lfo1"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size:10.0pt;font-family:Symbol;color:black"&gt;&lt;span style="mso-list: Ignore"&gt;·&lt;span style="font:7.0pt &amp;quot;Times New Roman&amp;quot;"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span dir="LTR"&gt;&lt;/span&gt;&lt;span style="font-size: 10.0pt;color:black"&gt;SSL: not enabled&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l1 level1 lfo1"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size:10.0pt;font-family:Symbol;color:black"&gt;&lt;span style="mso-list: Ignore"&gt;·&lt;span style="font:7.0pt &amp;quot;Times New Roman&amp;quot;"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span dir="LTR"&gt;&lt;/span&gt;&lt;span style="font-size: 10.0pt;color:black"&gt;user: &lt;a href="mailto:webmaster@mydomain.com"&gt;webmaster@mydomain.com&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l1 level1 lfo1"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size:10.0pt;font-family:Symbol;color:black"&gt;&lt;span style="mso-list: Ignore"&gt;·&lt;span style="font:7.0pt &amp;quot;Times New Roman&amp;quot;"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span dir="LTR"&gt;&lt;/span&gt;&lt;span style="font-size: 10.0pt;color:black"&gt;password: **********&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size:10.0pt;color:black"&gt;2- This configuration is not working&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l2 level1 lfo2"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size:10.0pt;font-family:Symbol;color:black"&gt;&lt;span style="mso-list: Ignore"&gt;·&lt;span style="font:7.0pt &amp;quot;Times New Roman&amp;quot;"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span dir="LTR"&gt;&lt;/span&gt;&lt;span style="font-size: 10.0pt;color:black"&gt;SMTP: &lt;a href="http://smtpout.secureserver.net/" target="_blank"&gt;smtpout.secureserver.net&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l2 level1 lfo2"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size:10.0pt;font-family:Symbol;color:black"&gt;&lt;span style="mso-list: Ignore"&gt;·&lt;span style="font:7.0pt &amp;quot;Times New Roman&amp;quot;"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span dir="LTR"&gt;&lt;/span&gt;&lt;span style="font-size: 10.0pt;color:black"&gt;Port: 25 or 80 or 3535 or 587&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l2 level1 lfo2"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size:10.0pt;font-family:Symbol;color:black"&gt;&lt;span style="mso-list: Ignore"&gt;·&lt;span style="font:7.0pt &amp;quot;Times New Roman&amp;quot;"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span dir="LTR"&gt;&lt;/span&gt;&lt;span style="font-size: 10.0pt;color:black"&gt;SSL: not enabled&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l2 level1 lfo2"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size:10.0pt;font-family:Symbol;color:black"&gt;&lt;span style="mso-list: Ignore"&gt;·&lt;span style="font:7.0pt &amp;quot;Times New Roman&amp;quot;"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span dir="LTR"&gt;&lt;/span&gt;&lt;span style="font-size: 10.0pt;color:black"&gt;Cedential user: &lt;a href="mailto:webmaster@mydomain.com"&gt;webmaster@mydomain.com&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l2 level1 lfo2"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size:10.0pt;font-family:Symbol;color:black"&gt;&lt;span style="mso-list: Ignore"&gt;·&lt;span style="font:7.0pt &amp;quot;Times New Roman&amp;quot;"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span dir="LTR"&gt;&lt;/span&gt;&lt;span style="font-size: 10.0pt;color:black"&gt;Cedential password: **********&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size:10.0pt;color:black"&gt;3- This configuration is not working&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l0 level1 lfo3"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size:10.0pt;font-family:Symbol;color:black"&gt;&lt;span style="mso-list: Ignore"&gt;·&lt;span style="font:7.0pt &amp;quot;Times New Roman&amp;quot;"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span dir="LTR"&gt;&lt;/span&gt;&lt;span style="font-size: 10.0pt;color:black"&gt;SMTP: &lt;a href="http://smtp.secureserver.net/" target="_blank"&gt;smtp.secureserver.net&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l0 level1 lfo3"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size:10.0pt;font-family:Symbol;color:black"&gt;&lt;span style="mso-list: Ignore"&gt;·&lt;span style="font:7.0pt &amp;quot;Times New Roman&amp;quot;"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span dir="LTR"&gt;&lt;/span&gt;&lt;span style="font-size: 10.0pt;color:black"&gt;Port: 25 or 80 or 3535 or 587&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l0 level1 lfo3"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size:10.0pt;font-family:Symbol;color:black"&gt;&lt;span style="mso-list: Ignore"&gt;·&lt;span style="font:7.0pt &amp;quot;Times New Roman&amp;quot;"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span dir="LTR"&gt;&lt;/span&gt;&lt;span style="font-size: 10.0pt;color:black"&gt;SSL: not enabled&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l0 level1 lfo3"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size:10.0pt;font-family:Symbol;color:black"&gt;&lt;span style="mso-list: Ignore"&gt;·&lt;span style="font:7.0pt &amp;quot;Times New Roman&amp;quot;"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span dir="LTR"&gt;&lt;/span&gt;&lt;span style="font-size: 10.0pt;color:black"&gt;Cedential user: &lt;a href="mailto:webmaster@mydomain.com"&gt;webmaster@mydomain.com&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l0 level1 lfo3"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-size:10.0pt;font-family:Symbol;color:black"&gt;&lt;span style="mso-list: Ignore"&gt;·&lt;span style="font:7.0pt &amp;quot;Times New Roman&amp;quot;"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span dir="LTR"&gt;&lt;/span&gt;&lt;span style="font-size: 10.0pt;color:black"&gt;Cedential password: **********&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size:13.0pt;font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:black"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size:14.0pt;font-family:&amp;quot;Calibri&amp;quot;,&amp;quot;sans-serif&amp;quot;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size:13.0pt;font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:black"&gt;I found the solution, and it was so old problem, since 2005, I found it in the following link:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size:13.0pt;font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:black"&gt;&lt;a href="http://forums.asp.net/t/939893.aspx/1?Problem+with+System+Net+Mail+on+GoDaddy" target="_blank"&gt;http://forums.asp.net/t/939893.aspx/1?Problem+with+System+Net+Mail+on+GoDaddy&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size:13.0pt;font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:black"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size:13.0pt;font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:black"&gt;The problem is that SMTP-server is not &lt;a href="http://smtpout.secureserver.net/" target="_blank"&gt;smtpout.secureserver.net&lt;/a&gt; as Godaddy tells me. But It is &lt;a href="http://relay-hosting.secureserver.net/" target="_blank"&gt;relay-hosting.secureserver.net&lt;/a&gt; that nobody tells me at all. There is no need for user name or password, relay is open for 1000 message per day for hosted applications.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size:13.0pt;font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:black"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4421999031233037653-2708515219178792489?l=yourprosoft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yourprosoft.blogspot.com/feeds/2708515219178792489/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yourprosoft.blogspot.com/2011/05/godaddy-email-problem-with-hosted.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4421999031233037653/posts/default/2708515219178792489'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4421999031233037653/posts/default/2708515219178792489'/><link rel='alternate' type='text/html' href='http://yourprosoft.blogspot.com/2011/05/godaddy-email-problem-with-hosted.html' title='Godaddy Email problem with hosted applications'/><author><name>Wael AlGhool</name><uri>http://www.blogger.com/profile/12348835436349517930</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_lU9sJzT5R6I/R-8xT4OO1YI/AAAAAAAAADE/xIxN20Hls3I/S220/29032008456_small.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4421999031233037653.post-8122324969677196805</id><published>2011-05-30T10:06:00.000-07:00</published><updated>2011-05-30T10:11:10.522-07:00</updated><title type='text'>jQuery simplemodal plugin typeError: 'tagName' is null or not an object.</title><content type='html'>Many thanks for Eric's effort he made to create the great simple modal jQuery plugin.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.ericmmartin.com/projects/simplemodal-demos/"&gt;http://www.ericmmartin.com/projects/simplemodal-demos/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I found a bug then fixed it, the bug is in $.modal.impl.create  function , I think it is not new for you, where you mentioned the solution when you commented to use 'form' instead 'body' for the property appendTo.&lt;br /&gt;&lt;br /&gt;First: the comment have to be modified to become {use '#aspnetForm'}  instead of {use 'form'}&lt;br /&gt;Second: in line number 344,  there is still hard coding problem of the word 'body', as follows.&lt;br /&gt;&lt;br /&gt;// add styling and attributes to the data&lt;br /&gt;// append to body to get correct dimensions, then move to wrap&lt;br /&gt;s.d.data = data&lt;br /&gt;.attr('id', data.attr('id') || s.o.dataId)&lt;br /&gt;.addClass('simplemodal-data')&lt;br /&gt;.css($.extend(s.o.dataCss, {&lt;br /&gt;display: 'none'&lt;br /&gt;}))&lt;br /&gt;.appendTo('body');&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I replaced the hard coded word with s.o.appendTo object such like {.appendTo(s.o.appendTo);}, and everything goes right.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4421999031233037653-8122324969677196805?l=yourprosoft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yourprosoft.blogspot.com/feeds/8122324969677196805/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yourprosoft.blogspot.com/2011/05/jquery-simplemodal-plugin-typeerror.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4421999031233037653/posts/default/8122324969677196805'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4421999031233037653/posts/default/8122324969677196805'/><link rel='alternate' type='text/html' href='http://yourprosoft.blogspot.com/2011/05/jquery-simplemodal-plugin-typeerror.html' title='jQuery simplemodal plugin typeError: &apos;tagName&apos; is null or not an object.'/><author><name>Wael AlGhool</name><uri>http://www.blogger.com/profile/12348835436349517930</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_lU9sJzT5R6I/R-8xT4OO1YI/AAAAAAAAADE/xIxN20Hls3I/S220/29032008456_small.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4421999031233037653.post-1298714499624862298</id><published>2011-03-28T01:01:00.000-07:00</published><updated>2011-03-28T02:08:03.127-07:00</updated><title type='text'>Firefox problem with iframe</title><content type='html'>&lt;p&gt;|&lt;br /&gt;|..primery.aspx&lt;br /&gt;|..rootpage.aspx&lt;br /&gt;|..|-l1&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;|-l2&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;|-l3&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;|..test.htm&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman'; font-size: medium; "&gt;|&lt;/span&gt;&lt;/p&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman'; font-size: medium; "&gt;&lt;span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "&gt;&lt;div&gt;I have HTML page (i.e. test.htm) in a website say          (&lt;span class="style5" style="border-collapse: separate; font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "&gt;http://172.16.16.20&lt;/span&gt;&lt;span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "&gt;), the page is deeply located into a 3rd level folder, to          access the page you have to write the URL as follows          (&lt;/span&gt;&lt;span class="style5" style="border-collapse: separate; font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "&gt;http:/172.16.16.20/l1/l2/l3/test.htm&lt;/span&gt;&lt;span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "&gt;), test.htm has iframe element with &lt;span class="Apple-style-span" style="color: rgb(51, 51, 255); "&gt;src="/rootpage.aspx" &lt;/span&gt;like following:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;..&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "&gt;&lt;span class="Apple-style-span" style="border-collapse: separate; font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "&gt;&lt;div&gt;&lt;div style="direction: ltr; " class="style1"&gt;&amp;lt;ifram src="/rootpage.aspx"&amp;gt;&amp;lt;/iframe&amp;gt;&lt;br /&gt;..&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify; "&gt;The "rootpage.aspx" with another page named "primary.aspx" are located in the          root folder of the website. And primary.aspx looks like the following:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;...&lt;/div&gt;&lt;/span&gt;&lt;span class="style1" style="border-collapse: separate; font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "&gt;&lt;div&gt;&lt;div style="direction: ltr; "&gt;&amp;lt;iframe src="/rootpage.aspx"&amp;gt;&amp;lt;/iframe&amp;gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;...&lt;/div&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="style2"&gt;&lt;span class="Apple-style-span"&gt;If you open primery.aspx , it is normal to expect          to see iframe of tset.htm that contain iframe of rootpage.aspx. That is true for          all browsers except Firefox. Unfortunately, Firefox will give the following          error:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The page cannot be displayed&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="border-collapse: separate; font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "&gt;&lt;div&gt;&lt;div class="style4"&gt;&lt;span class="Apple-style-span"&gt;You have attempted to execute a CGI, ISAPI, or              other executable program from a directory that does not allow programs to be              executed.&lt;br /&gt;Please try the following:&lt;br /&gt;* Contact the Web site administrator if you              believe this directory should allow execute access.&lt;br /&gt;HTTP Error 403.1 - Forbidden: Execute access is              denied.&lt;br /&gt;Internet Information Services (IIS)&lt;br /&gt;Technical Information (for support personnel)&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "&gt;&lt;div&gt;I go to          IIS&amp;amp;gt;&amp;amp;gt;website&amp;amp;gt;&amp;amp;gt;Properties&amp;amp;gt;&amp;amp;gt;HomeDirectory&amp;amp;gt;&amp;amp;gt;ApplicationSettings&amp;amp;gt;&amp;amp;gt;ExecutePermissions          and make it Scripts and Executables. After that Firefox gave me the next error:&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Server Error in '/' Application.&lt;/div&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="border-collapse: separate; font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "&gt;&lt;div&gt;&lt;div class="style4"&gt;&lt;span class="Apple-style-span"&gt;The resource cannot be found.&lt;br /&gt;Description: HTTP 404. The resource you are              looking for (or one of its dependencies) could have been removed, had its name              changed, or is temporarily unavailable. Please review the following URL and make              sure that it is spelled correctly.&lt;br /&gt;Requested URL: /l1/l2/l3/rootpage.aspx&lt;br /&gt;Version Information: Microsoft .NET Framework              Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify; "&gt;&lt;span class="Apple-style-span"&gt;From the last error message I understand that          Firefox iframe.src property behaves differently than other browsers, I put "/"          in front of the page name to tell the browser to go to root folder, but Firefox          believes that root is relative to iframe context not browser context.&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;To solve the problem I modifed       &lt;span class="style5" style="border-collapse: separate; font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "&gt;         src="/rootpage.aspx"&lt;/span&gt;&lt;span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "&gt;         to become     &lt;/span&gt;  &lt;span class="style5" style="border-collapse: separate; font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "&gt;         src="../../../rootpage.aspx"&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;Now everything goes right.&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "&gt;&lt;br /&gt;&lt;div&gt; &lt;/div&gt;&lt;br /&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4421999031233037653-1298714499624862298?l=yourprosoft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yourprosoft.blogspot.com/feeds/1298714499624862298/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yourprosoft.blogspot.com/2011/03/firefox-problem-with-iframe.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4421999031233037653/posts/default/1298714499624862298'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4421999031233037653/posts/default/1298714499624862298'/><link rel='alternate' type='text/html' href='http://yourprosoft.blogspot.com/2011/03/firefox-problem-with-iframe.html' title='Firefox problem with iframe'/><author><name>Wael AlGhool</name><uri>http://www.blogger.com/profile/12348835436349517930</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_lU9sJzT5R6I/R-8xT4OO1YI/AAAAAAAAADE/xIxN20Hls3I/S220/29032008456_small.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4421999031233037653.post-595943158407985372</id><published>2010-12-26T02:10:00.000-08:00</published><updated>2010-12-26T02:11:21.620-08:00</updated><title type='text'>old "dbo" database owner prevents service broker from working properly - SQL 2005</title><content type='html'>&lt;img src="cid:image001.gif@01CBA4FA.B4ED2210" v:src="cid:image001.gif@01CBA4FA.B4ED2210" v:shapes="_x0000_Mail" width=0 height=0 class=shape style='display:none;width:0;height:0'&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;v:background id="_x0000_s1025" o:bwmode="white" o:targetscreensize="800,600"&gt;   &lt;v:fill src="cid:image001.gif@01CBA4FA.B4ED2210" o:title="background_aftrnoon"     type="frame" /&gt;  &lt;/v:background&gt;&lt;/xml&gt;&lt;![endif]--&gt;  &lt;div class=Section1&gt;  &lt;p class=MsoNormal&gt;&lt;span style='font-family:"Times New Roman","serif"'&gt;I have cloned a virtual copy of Win2003 server that has SQL2005 already installed. The new server is planned to be disconnected from the domain of the original server and run separately.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='font-family:"Times New Roman","serif"'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='font-family:"Times New Roman","serif"'&gt;In SQL2005 I dropped all databases and restored my database that has service broker already enabled, the restored database was running very well on another server inside my old domain "AWQAF", this database also has a notification service running on top of a message queue called "messageQueue".&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='font-family:"Times New Roman","serif"'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='font-family:"Times New Roman","serif"'&gt;Service broker then didn't working as supposed or as it should to work like.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='font-family:"Times New Roman","serif"'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='font-family:"Times New Roman","serif"'&gt;I tried to check the status of the service broker using the following statement:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='text-autospace:none'&gt;&lt;span style='font-size:8.0pt; font-family:"Courier New";color:blue'&gt;SELECT&lt;/span&gt;&lt;span style='font-size:8.0pt; font-family:"Courier New";color:windowtext'&gt; is_broker_enabled &lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:blue'&gt;FROM&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:windowtext'&gt; &lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:green'&gt;sys.databases&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:windowtext'&gt; &lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:blue'&gt;WHERE&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:windowtext'&gt; &lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:blue'&gt;name&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:windowtext'&gt; &lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:gray'&gt;=&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:windowtext'&gt; &lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:red'&gt;'AfaqCMS'&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:gray'&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='font-family:"Times New Roman","serif"'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='font-family:"Times New Roman","serif"'&gt;It gives me 0 result, a mean of service broker is disabled. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='font-family:"Times New Roman","serif"'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='font-family:"Times New Roman","serif"'&gt;So, I tried to enable service broker using the following statement:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='text-autospace:none'&gt;&lt;span style='font-size:8.0pt; font-family:"Courier New";color:blue'&gt;ALTER&lt;/span&gt;&lt;span style='font-size:8.0pt; font-family:"Courier New";color:windowtext'&gt; &lt;/span&gt;&lt;span style='font-size: 8.0pt;font-family:"Courier New";color:blue'&gt;DATABASE&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:windowtext'&gt; [AfaqCMS] &lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:blue'&gt;SET&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:windowtext'&gt; NEW_BROKER &lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:blue'&gt;WITH&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:windowtext'&gt; &lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:blue'&gt;ROLLBACK&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:windowtext'&gt; IMMEDIATE&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:gray'&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='font-family:"Times New Roman","serif"'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='font-family:"Times New Roman","serif"'&gt;By trying to SEND/RECIVE messages using the following statements, I got dialog created without messages transmission:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='text-autospace:none'&gt;&lt;span style='font-size:8.0pt; font-family:"Courier New";color:blue'&gt;DECLARE&lt;/span&gt;&lt;span style='font-size: 8.0pt;font-family:"Courier New";color:windowtext'&gt; @NotificationDialog &lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:blue'&gt;uniqueidentifier&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:gray'&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='text-autospace:none'&gt;&lt;span style='font-size:8.0pt; font-family:"Courier New";color:blue'&gt;SET&lt;/span&gt;&lt;span style='font-size:8.0pt; font-family:"Courier New";color:windowtext'&gt; &lt;/span&gt;&lt;span style='font-size: 8.0pt;font-family:"Courier New";color:blue'&gt;QUOTED_IDENTIFIER&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:windowtext'&gt; &lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:blue'&gt;ON&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:gray'&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='text-autospace:none'&gt;&lt;span style='font-size:8.0pt; font-family:"Courier New";color:blue'&gt;BEGIN&lt;/span&gt;&lt;span style='font-size:8.0pt; font-family:"Courier New";color:windowtext'&gt; &lt;/span&gt;&lt;span style='font-size: 8.0pt;font-family:"Courier New";color:blue'&gt;DIALOG&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:windowtext'&gt; &lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:blue'&gt;CONVERSATION&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:windowtext'&gt; @NotificationDialog&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='text-autospace:none'&gt;&lt;span style='font-size:8.0pt; font-family:"Courier New";color:windowtext'&gt;  &lt;/span&gt;&lt;span style='font-size: 8.0pt;font-family:"Courier New";color:blue'&gt;FROM&lt;/span&gt;&lt;span style='font-size: 8.0pt;font-family:"Courier New";color:windowtext'&gt; &lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:blue'&gt;SERVICE&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:windowtext'&gt; ChangeNotifications&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='text-autospace:none'&gt;&lt;span style='font-size:8.0pt; font-family:"Courier New";color:windowtext'&gt;  &lt;/span&gt;&lt;span style='font-size: 8.0pt;font-family:"Courier New";color:blue'&gt;TO&lt;/span&gt;&lt;span style='font-size: 8.0pt;font-family:"Courier New";color:windowtext'&gt; &lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:blue'&gt;SERVICE&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:windowtext'&gt; &lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:red'&gt;'ChangeNotifications'&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='text-autospace:none'&gt;&lt;span style='font-size:8.0pt; font-family:"Courier New";color:windowtext'&gt;  &lt;/span&gt;&lt;span style='font-size: 8.0pt;font-family:"Courier New";color:blue'&gt;ON&lt;/span&gt;&lt;span style='font-size: 8.0pt;font-family:"Courier New";color:windowtext'&gt; &lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:blue'&gt;CONTRACT&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:windowtext'&gt; [http://schemas.microsoft.com/SQL/Notifications/PostQueryNotification]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='text-autospace:none'&gt;&lt;span style='font-size:8.0pt; font-family:"Courier New";color:windowtext'&gt;  &lt;/span&gt;&lt;span style='font-size: 8.0pt;font-family:"Courier New";color:blue'&gt;WITH&lt;/span&gt;&lt;span style='font-size: 8.0pt;font-family:"Courier New";color:windowtext'&gt; ENCRYPTION &lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:gray'&gt;=&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:windowtext'&gt; &lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:blue'&gt;OFF&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:gray'&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='text-autospace:none'&gt;&lt;span style='font-size:8.0pt; font-family:"Courier New";color:blue'&gt;SEND&lt;/span&gt;&lt;span style='font-size:8.0pt; font-family:"Courier New";color:windowtext'&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='text-autospace:none'&gt;&lt;span style='font-size:8.0pt; font-family:"Courier New";color:windowtext'&gt;       &lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:blue'&gt;ON&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:windowtext'&gt; &lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:blue'&gt;CONVERSATION&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:windowtext'&gt; @NotificationDialog &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='text-autospace:none'&gt;&lt;span style='font-size:8.0pt; font-family:"Courier New";color:windowtext'&gt;       &lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:blue'&gt;MESSAGE&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:windowtext'&gt; &lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:blue'&gt;TYPE&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:windowtext'&gt; [http://schemas.microsoft.com/SQL/Notifications/QueryNotification] &lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:gray'&gt;(&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:windowtext'&gt;N&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:red'&gt;'CommentHits'&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:gray'&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='text-autospace:none'&gt;&lt;span style='font-size:8.0pt; font-family:"Courier New";color:blue'&gt;SELECT&lt;/span&gt;&lt;span style='font-size:8.0pt; font-family:"Courier New";color:windowtext'&gt; @NotificationDialog&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:gray'&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New"; color:blue'&gt;RECEIVE&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New"; color:windowtext'&gt; &lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New"; color:gray'&gt;*&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New"; color:windowtext'&gt; &lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New"; color:blue'&gt;FROM&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New"; color:windowtext'&gt; ChangeMessagesQueue &lt;/span&gt;&lt;span style='font-size:8.0pt; font-family:"Courier New";color:gray'&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='font-family:"Times New Roman","serif"'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='font-family:"Times New Roman","serif"'&gt;By checking transmission queue of the system I found some errors around the original owner of the restored database.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New"; color:blue'&gt;SELECT&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New"; color:windowtext'&gt; &lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New"; color:gray'&gt;*&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New"; color:windowtext'&gt; &lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New"; color:blue'&gt;FROM&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New"; color:windowtext'&gt;  &lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New"; color:green'&gt;sys.transmission_queue&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:"Courier New"; color:green'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='font-family:"Times New Roman","serif"'&gt;A filed called &lt;/span&gt;&lt;span style='font-size:10.0pt;font-family:"Courier New"; color:green'&gt;"transmission_status" &lt;/span&gt;&lt;span style='font-family:"Times New Roman","serif"'&gt;is containing the following exception:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='text-autospace:none'&gt;&lt;span style='font-size:8.0pt; font-family:"Courier New";color:windowtext'&gt;An exception occurred &lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:blue'&gt;while&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:windowtext'&gt; enqueueing a &lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:blue'&gt;message&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:windowtext'&gt; &lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:gray'&gt;in&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:windowtext'&gt; the target &lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:blue'&gt;queue&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:gray'&gt;.&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:windowtext'&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='text-autospace:none'&gt;&lt;span style='font-size:8.0pt; font-family:"Courier New";color:windowtext'&gt;Error&lt;/span&gt;&lt;span style='font-size: 8.0pt;font-family:"Courier New";color:gray'&gt;:&lt;/span&gt;&lt;span style='font-size: 8.0pt;font-family:"Courier New";color:windowtext'&gt; 15404&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:gray'&gt;,&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:windowtext'&gt; State&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:gray'&gt;:&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:windowtext'&gt; 11. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New"; color:windowtext'&gt;Could &lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New"; color:gray'&gt;not&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New"; color:windowtext'&gt; obtain information about Windows NT &lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:blue'&gt;group&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:gray'&gt;/&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:fuchsia'&gt;user&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:windowtext'&gt; &lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:red'&gt;'AWQAF\adm_walghool'&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:gray'&gt;,&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:windowtext'&gt; error code 0x534&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:gray'&gt;.&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:green'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:"Courier New"; color:green'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span style='font-family:"Times New Roman","serif"'&gt;By deleting&lt;/span&gt;&lt;span style='font-size:10.0pt;font-family:"Courier New"; color:green'&gt; &lt;/span&gt;&lt;span style='font-size:10.0pt;font-family:"Courier New"; color:red'&gt;'AWQAF\adm_walghool'&lt;/span&gt;&lt;span style='font-size:10.0pt;font-family: "Courier New";color:green'&gt; &lt;/span&gt;&lt;span style='font-family:"Times New Roman","serif"'&gt;from all locations it can be existed in, I got another status: &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='text-autospace:none'&gt;&lt;span style='font-size:8.0pt; font-family:"Courier New";color:windowtext'&gt;An exception occurred &lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:blue'&gt;while&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:windowtext'&gt; enqueueing a &lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:blue'&gt;message&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:windowtext'&gt; &lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:gray'&gt;in&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:windowtext'&gt; the target &lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:blue'&gt;queue&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:gray'&gt;.&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:windowtext'&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='text-autospace:none'&gt;&lt;span style='font-size:8.0pt; font-family:"Courier New";color:windowtext'&gt;Error&lt;/span&gt;&lt;span style='font-size: 8.0pt;font-family:"Courier New";color:gray'&gt;:&lt;/span&gt;&lt;span style='font-size: 8.0pt;font-family:"Courier New";color:windowtext'&gt; 15517&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:gray'&gt;,&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:windowtext'&gt; State&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:gray'&gt;:&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:windowtext'&gt; 1. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='text-autospace:none'&gt;&lt;span style='font-size:8.0pt; font-family:"Courier New";color:windowtext'&gt;Cannot &lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:blue'&gt;execute&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:windowtext'&gt; &lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:blue'&gt;as&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:windowtext'&gt; the &lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:blue'&gt;database&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:windowtext'&gt; principal because the principal &amp;quot;dbo&amp;quot; does &lt;/span&gt;&lt;span style='font-size:8.0pt; font-family:"Courier New";color:gray'&gt;not&lt;/span&gt;&lt;span style='font-size:8.0pt; font-family:"Courier New";color:windowtext'&gt; exist&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:gray'&gt;,&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:windowtext'&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='text-autospace:none'&gt;&lt;span style='font-size:8.0pt; font-family:"Courier New";color:windowtext'&gt;this &lt;/span&gt;&lt;span style='font-size: 8.0pt;font-family:"Courier New";color:blue'&gt;type&lt;/span&gt;&lt;span style='font-size: 8.0pt;font-family:"Courier New";color:windowtext'&gt; &lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:blue'&gt;of&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:windowtext'&gt; principal cannot be impersonated&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New"; color:gray'&gt;,&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New"; color:windowtext'&gt; &lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New"; color:gray'&gt;or&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New"; color:windowtext'&gt; you do &lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New"; color:gray'&gt;not&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New"; color:windowtext'&gt; have permission&lt;/span&gt;&lt;span style='font-size:8.0pt; font-family:"Courier New";color:gray'&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='text-autospace:none'&gt;&lt;span style='font-size:10.0pt; font-family:"Courier New";color:gray'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='text-autospace:none'&gt;&lt;span style='font-family:"Times New Roman","serif"'&gt;Now I realized that it is the database owner that prevents service broker from working properly, So I run the following statement to get every things working successfully again:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='text-autospace:none'&gt;&lt;span style='font-size:8.0pt; font-family:"Courier New";color:blue'&gt;ALTER&lt;/span&gt;&lt;span style='font-size:8.0pt; font-family:"Courier New";color:windowtext'&gt; &lt;/span&gt;&lt;span style='font-size: 8.0pt;font-family:"Courier New";color:blue'&gt;AUTHORIZATION&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:windowtext'&gt; &lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:blue'&gt;ON&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:windowtext'&gt; &lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:blue'&gt;DATABASE&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:gray'&gt;::&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:windowtext'&gt;[AfaqCMS] &lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:blue'&gt;TO&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:windowtext'&gt; [SA]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='text-autospace:none'&gt;&lt;span style='font-size:10.0pt; font-family:"Courier New";color:windowtext'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='text-autospace:none'&gt;&lt;span style='font-family:"Times New Roman","serif"'&gt;Anthother statement can be used also:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='text-autospace:none'&gt;&lt;span style='font-size:10.0pt; font-family:"Courier New";color:windowtext'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='text-autospace:none'&gt;&lt;span style='font-size:8.0pt; font-family:"Courier New";color:blue'&gt;USE&lt;/span&gt;&lt;span style='font-size:8.0pt; font-family:"Courier New";color:windowtext'&gt; AfaqCMS&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='text-autospace:none'&gt;&lt;span style='font-size:8.0pt; font-family:"Courier New";color:windowtext'&gt;GO&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='text-autospace:none'&gt;&lt;span style='font-size:8.0pt; font-family:"Courier New";color:blue'&gt;EXEC&lt;/span&gt;&lt;span style='font-size:8.0pt; font-family:"Courier New";color:windowtext'&gt; dbo&lt;/span&gt;&lt;span style='font-size: 8.0pt;font-family:"Courier New";color:gray'&gt;.&lt;/span&gt;&lt;span style='font-size: 8.0pt;font-family:"Courier New";color:maroon'&gt;sp_changedbowner&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:windowtext'&gt; @loginame &lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:gray'&gt;=&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:windowtext'&gt; N&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:red'&gt;'zakauser'&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:gray'&gt;,&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:windowtext'&gt; @map &lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:gray'&gt;=&lt;/span&gt;&lt;span style='font-size:8.0pt;font-family:"Courier New";color:windowtext'&gt; false&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='text-autospace:none'&gt;&lt;span style='font-size:10.0pt; font-family:"Courier New";color:windowtext'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='text-autospace:none'&gt;&lt;span style='font-size:10.0pt; font-family:"Courier New";color:windowtext'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='text-autospace:none'&gt;&lt;span style='font-size:10.0pt; font-family:"Courier New";color:windowtext'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal style='text-autospace:none'&gt;&lt;span style='font-size:10.0pt; font-family:"Courier New";color:gray'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4421999031233037653-595943158407985372?l=yourprosoft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yourprosoft.blogspot.com/feeds/595943158407985372/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yourprosoft.blogspot.com/2010/12/old-dbo-database-owner-prevents-service.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4421999031233037653/posts/default/595943158407985372'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4421999031233037653/posts/default/595943158407985372'/><link rel='alternate' type='text/html' href='http://yourprosoft.blogspot.com/2010/12/old-dbo-database-owner-prevents-service.html' title='old &quot;dbo&quot; database owner prevents service broker from working properly - SQL 2005'/><author><name>Wael AlGhool</name><uri>http://www.blogger.com/profile/12348835436349517930</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_lU9sJzT5R6I/R-8xT4OO1YI/AAAAAAAAADE/xIxN20Hls3I/S220/29032008456_small.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4421999031233037653.post-3869100874648080874</id><published>2010-08-02T23:29:00.000-07:00</published><updated>2010-08-02T23:35:00.613-07:00</updated><title type='text'>What is the difference between ISO 9660, Joliet and UDF?</title><content type='html'>&lt;div align="center"&gt;&lt;strong&gt;CD-ROM File Systems&lt;/strong&gt; &lt;/div&gt;&lt;br /&gt;&lt;strong&gt;An ISO 9660&lt;/strong&gt; &lt;span style="color:#660000;"&gt;file system is a standard CD-ROM file system. Full ISO format requires all upper case characters or numbers, no spaces, very limited special characters, and no more than 30 characters in the name.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;strong&gt;Joliet&lt;/strong&gt; &lt;span style="color:#660000;"&gt;is the name of an extension to the ISO 9660 file system. Joliet format permits 64-character file names with lower-case alpha and other relaxed restrictions. It also relaxes the ISO requirement for directory nesting to no more than eight levels. It doesn't hurt to include the Joliet Directory if the names conform.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;UDF&lt;/strong&gt; &lt;span style="color:#660000;"&gt;is a hybrid filesystem that uses both UDF and ISO 9660. Also called a UDF bridge, it was commonly used until Microsoft incorporated support for UDF in its operating system. UDF permits 127 16-bit Unicode characters, or 254 8-bit Unicode characters. If any character in any name is not in the list of legal 8-bit Unicode characters, all names will be represented in 16-bit Unicode.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#000099;"&gt;However Joliet is no longer needed since the ISO 9660 standard has been extended in 3 different levels:&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#660000;"&gt;&lt;strong&gt;&lt;span style="color:#000099;"&gt;Level 1:&lt;/span&gt;&lt;/strong&gt; Filename cannot be longer than 8 chars , Filename extention cannot be longer than 3 chars.&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#000099;"&gt;Level 2:&lt;/span&gt;&lt;/strong&gt; Filename can be up to 255 chars long.&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#000099;"&gt;Level 3:&lt;/span&gt;&lt;/strong&gt; Same as level 2 but files can be written in multiple extents (-&gt; Packet writing).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#cc0000;"&gt;Normally a Mac can read both ISO 9660 and Joliet CDs.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4421999031233037653-3869100874648080874?l=yourprosoft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yourprosoft.blogspot.com/feeds/3869100874648080874/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yourprosoft.blogspot.com/2010/08/what-is-difference-between-iso-9660.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4421999031233037653/posts/default/3869100874648080874'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4421999031233037653/posts/default/3869100874648080874'/><link rel='alternate' type='text/html' href='http://yourprosoft.blogspot.com/2010/08/what-is-difference-between-iso-9660.html' title='What is the difference between ISO 9660, Joliet and UDF?'/><author><name>Wael AlGhool</name><uri>http://www.blogger.com/profile/12348835436349517930</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_lU9sJzT5R6I/R-8xT4OO1YI/AAAAAAAAADE/xIxN20Hls3I/S220/29032008456_small.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4421999031233037653.post-8743449003819880682</id><published>2010-06-28T21:55:00.000-07:00</published><updated>2010-06-28T22:04:30.803-07:00</updated><title type='text'>ClickOnce does not install fonts - Install fonts using C#</title><content type='html'>&lt;div class="Section1"&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-family:'Times New Roman','serif';"&gt;ClickOnce does not install fonts. ClickOnce is designed to be a non-impactful install, and installing fonts is considered impactful to a user's computer. ClickOnce is only a deployment technology, it does not offer any support for font installation, so this operation requires extra coding. We have to code the font installation logic in the application. To install font on client machines, we have to create code just like the following.&lt;?xml:namespace prefix = o /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-family:'Times New Roman','serif';"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-family:'Times New Roman','serif';"&gt;ClickOnce deloyment normally does not touch the system directories. This is an important difference with MSI deployment technology. ClickOnce deployment does not cover:&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Symbol;"&gt;&lt;span style="mso-list: Ignore"&gt;·&lt;span style="FONT: 7pt 'Times New Roman';font-size:100%;" &gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span dir="ltr"&gt;&lt;/span&gt;&lt;span style="font-family:'Times New Roman','serif';"&gt;"Install to GAC"(GAC is another system directory)&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Symbol;"&gt;&lt;span style="mso-list: Ignore"&gt;·&lt;span style="FONT: 7pt 'Times New Roman';font-size:100%;" &gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span dir="ltr"&gt;&lt;/span&gt;&lt;span style="font-family:'Times New Roman','serif';"&gt;"Write to Registry"&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Symbol;"&gt;&lt;span style="mso-list: Ignore"&gt;·&lt;span style="FONT: 7pt 'Times New Roman';font-size:100%;" &gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span dir="ltr"&gt;&lt;/span&gt;&lt;span style="font-family:'Times New Roman','serif';"&gt;"Install for All Users" etc... While these can all be done with MSI:&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Times New Roman','serif';"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-family:'Times New Roman','serif';"&gt;Take a look to "Key Differences" between ClickOnce and MSI:&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Times New Roman','serif';"&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/142dbbz4(VS.90).aspx"&gt;http://msdn.microsoft.com/en-us/library/142dbbz4(VS.90).aspx&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-family:'Times New Roman','serif';"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-family:'Times New Roman','serif';"&gt;So we have to code ourselves for the font installation, first: write file from embedded resource, second: add font to windows resources, third: add registry entry so the font is also available next session, finally: solve GDI+ bug, where GDI+ must be notified with this new added font, so, a scalable font resource file needs to be created, this scalable font resource file stores the name of a TrueType font file so that GDI knows where to find the file. To create a scalable font resource file, call the GDI function CreateScalableFontResource with an integer flag, the name of the font resource file to be generated, an existing TrueType font file name, and the path to the files if they do not contain a complete path.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-family:'Cambria','serif';"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span style="font-family:'Cambria','serif';"&gt;First:&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family:'Cambria','serif';"&gt; Special thanks for following threads:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-family:'Courier New';"&gt;&lt;a href="http://www.devnewsgroups.net/group/microsoft.public.dotnet.framework/topic52983.aspx"&gt;http://www.devnewsgroups.net/group/microsoft.public.dotnet.framework/topic52983.aspx&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;&lt;a href="http://www.daniweb.com/forums/thread231795.html"&gt;http://www.daniweb.com/forums/thread231795.html&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;&lt;a href="http://www.dotnetmonster.com/Uwe/Forum.aspx/winform/18215/ClickOnce-deployment-include-font"&gt;http://www.dotnetmonster.com/Uwe/Forum.aspx/winform/18215/ClickOnce-deployment-include-font&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;using&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; System;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;using&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; System.Collections.Generic;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;using&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; System.Linq;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;using&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; System.Text;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;using&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; Microsoft.Win32;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;using&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; System.Runtime.InteropServices;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;using&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; System.Drawing.Text;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;using&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; System.Windows.Forms;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;namespace&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; myNameSpace&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;class&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; &lt;/span&gt;&lt;span style="font-family:'Courier New';color:#2b91af;"&gt;InstallFonts&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:green;"&gt;// PInvoke to look up fonts path&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;[&lt;/span&gt;&lt;span style="font-family:'Courier New';color:#2b91af;"&gt;DllImport&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;(&lt;/span&gt;&lt;span style="font-family:'Courier New';color:#a31515;"&gt;"shfolder.dll"&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;, CharSet = &lt;/span&gt;&lt;span style="font-family:'Courier New';color:#2b91af;"&gt;CharSet&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;.Auto)]&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;private&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; &lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;static&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; &lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;extern&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; &lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;int&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; SHGetFolderPath(&lt;/span&gt;&lt;span style="font-family:'Courier New';color:#2b91af;"&gt;IntPtr&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; hwndOwner, &lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;int&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; nFolder, &lt;/span&gt;&lt;span style="font-family:'Courier New';color:#2b91af;"&gt;IntPtr&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; hToken, &lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;int&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; dwFlags, &lt;/span&gt;&lt;span style="font-family:'Courier New';color:#2b91af;"&gt;StringBuilder&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; lpszPath);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;private&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; &lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;const&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; &lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;int&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; CSIDL_FONTS = 0x0014;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;private&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; &lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;const&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; &lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;int&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; MAX_PATH = 260;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;private&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; &lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;static&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; &lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;string&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; GetFontsPath()&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:#2b91af;"&gt;StringBuilder&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; sb = &lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;new&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; &lt;/span&gt;&lt;span style="font-family:'Courier New';color:#2b91af;"&gt;StringBuilder&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;(MAX_PATH);&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;SHGetFolderPath(&lt;/span&gt;&lt;span style="font-family:'Courier New';color:#2b91af;"&gt;IntPtr&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;.Zero, CSIDL_FONTS, &lt;/span&gt;&lt;span style="font-family:'Courier New';color:#2b91af;"&gt;IntPtr&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;.Zero, 0, sb);&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;return&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; sb.ToString();&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:green;"&gt;// PInvoke to 'register' fonts and broadcast addition&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;[&lt;/span&gt;&lt;span style="font-family:'Courier New';color:#2b91af;"&gt;DllImport&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;(&lt;/span&gt;&lt;span style="font-family:'Courier New';color:#a31515;"&gt;"gdi32.dll"&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;)]&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;private&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; &lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;static&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; &lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;extern&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; &lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;int&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; AddFontResource(&lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;string&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; lpszFilename);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;[&lt;/span&gt;&lt;span style="font-family:'Courier New';color:#2b91af;"&gt;DllImport&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;(&lt;/span&gt;&lt;span style="font-family:'Courier New';color:#a31515;"&gt;"gdi32"&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;, EntryPoint = &lt;/span&gt;&lt;span style="font-family:'Courier New';color:#a31515;"&gt;"RemoveFontResource"&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;)]&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;private&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; &lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;static&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; &lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;extern&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; &lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;bool&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; RemoveFontResourceW(&lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;string&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; lpFileName);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;[&lt;/span&gt;&lt;span style="font-family:'Courier New';color:#2b91af;"&gt;DllImport&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;(&lt;/span&gt;&lt;span style="font-family:'Courier New';color:#a31515;"&gt;"gdi32.dll"&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;)]&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;private&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; &lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;static&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; &lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;extern&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; &lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;int&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; CreateScalableFontResource(&lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;uint&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; fdwHidden, &lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;string&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; lpszFontRes, &lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;string&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; lpszFontFile, &lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;string&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; lpszCurrentPath);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;private&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; &lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;static&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; &lt;/span&gt;&lt;span style="font-family:'Courier New';color:#2b91af;"&gt;IntPtr&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; HWND_BROADCAST = &lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;new&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; &lt;/span&gt;&lt;span style="font-family:'Courier New';color:#2b91af;"&gt;IntPtr&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;(0xffff);&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;private&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; &lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;const&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; &lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;uint&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; WM_FONTCHANGE = 0x001D;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;[&lt;/span&gt;&lt;span style="font-family:'Courier New';color:#2b91af;"&gt;DllImport&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;(&lt;/span&gt;&lt;span style="font-family:'Courier New';color:#a31515;"&gt;"user32.dll"&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;, CharSet = &lt;/span&gt;&lt;span style="font-family:'Courier New';color:#2b91af;"&gt;CharSet&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;.Auto)]&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;private&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; &lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;static&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; &lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;extern&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; &lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;int&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; SendMessage(&lt;/span&gt;&lt;span style="font-family:'Courier New';color:#2b91af;"&gt;IntPtr&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; hWnd, &lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;uint&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; Msg, &lt;/span&gt;&lt;span style="font-family:'Courier New';color:#2b91af;"&gt;IntPtr&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; wParam, &lt;/span&gt;&lt;span style="font-family:'Courier New';color:#2b91af;"&gt;IntPtr&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; lParam);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;public&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; &lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;static&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; &lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;void&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; InstallFont()&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;string&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; fontsPath = GetFontsPath();&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;string&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; ttfFile9 = System.IO.&lt;/span&gt;&lt;span style="font-family:'Courier New';color:#2b91af;"&gt;Path&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;.Combine(fontsPath, &lt;/span&gt;&lt;span style="font-family:'Courier New';color:#a31515;"&gt;"V100009_.TTF"&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;); ;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;string&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; fotFile9 = System.IO.&lt;/span&gt;&lt;span style="font-family:'Courier New';color:#2b91af;"&gt;Path&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;.Combine(fontsPath, &lt;/span&gt;&lt;span style="font-family:'Courier New';color:#a31515;"&gt;"V100009_.FOT"&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;); ;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;int&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; ret;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;if&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; (!System.IO.&lt;/span&gt;&lt;span style="font-family:'Courier New';color:#2b91af;"&gt;File&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;.Exists(ttfFile9))&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:green;"&gt;//Write file from embedded resource&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;System.IO.&lt;/span&gt;&lt;span style="font-family:'Courier New';color:#2b91af;"&gt;File&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;.WriteAllBytes(ttfFile9, &lt;/span&gt;&lt;span style="font-family:'Courier New';color:#2b91af;"&gt;MyFonts&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;.V100009_);&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:green;"&gt;//Allow GDI+ to be notified and determines the new fonts&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:green;"&gt;//to install a TrueType font, a scalable font resource file needs to be&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:green;"&gt;//created. This scalable font resource file stores the name of a TrueType&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:green;"&gt;//font file so that GDI knows where to find the file. To create a scalable&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:green;"&gt;//font resource file, call the GDI function CreateScalableFontResource with&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:green;"&gt;//an integer flag, the name of the font resource file to be generated, an&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:green;"&gt;//existing TrueType font file name, and the path to the files if they do not&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:green;"&gt;//contain a complete path.&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;ret = CreateScalableFontResource(0, fotFile9, ttfFile9, &lt;/span&gt;&lt;span style="font-family:'Courier New';color:#2b91af;"&gt;String&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;.Empty);&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:green;"&gt;//Add font resource&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;ret = AddFontResource(fotFile9);&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:green;"&gt;//Add registry entry so the font is also available next session&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:#2b91af;"&gt;Registry&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;.SetValue(&lt;/span&gt;&lt;span style="font-family:'Courier New';color:#a31515;"&gt;@"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts"&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;, &lt;/span&gt;&lt;span style="font-family:'Courier New';color:#a31515;"&gt;"C39HrP36DlTt (TrueType)"&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;, &lt;/span&gt;&lt;span style="font-family:'Courier New';color:#a31515;"&gt;"V100009_.TTF"&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;, &lt;/span&gt;&lt;span style="font-family:'Courier New';color:#2b91af;"&gt;RegistryValueKind&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;.String);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:green;"&gt;//Broadcast to let all top-level windows know about change&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;ret = SendMessage(HWND_BROADCAST, WM_FONTCHANGE, &lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;new&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; &lt;/span&gt;&lt;span style="font-family:'Courier New';color:#2b91af;"&gt;IntPtr&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;(0), &lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;new&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; &lt;/span&gt;&lt;span style="font-family:'Courier New';color:#2b91af;"&gt;IntPtr&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;(0));&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:green;"&gt;//Work around to use font after installing without restarting the installing application&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:green;"&gt;//It is GDI+ bug not .NET bug,&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:#2b91af;"&gt;PrivateFontCollection&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; oPFC9 = &lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;new&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; &lt;/span&gt;&lt;span style="font-family:'Courier New';color:#2b91af;"&gt;PrivateFontCollection&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;();&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;oPFC9.AddFontFile(ttfFile9);&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;}&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;}&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;}&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;}&lt;/span&gt;&lt;span style="font-family:'Calibri','sans-serif';"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4421999031233037653-8743449003819880682?l=yourprosoft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yourprosoft.blogspot.com/feeds/8743449003819880682/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yourprosoft.blogspot.com/2010/06/clickonce-does-not-install-fonts.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4421999031233037653/posts/default/8743449003819880682'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4421999031233037653/posts/default/8743449003819880682'/><link rel='alternate' type='text/html' href='http://yourprosoft.blogspot.com/2010/06/clickonce-does-not-install-fonts.html' title='ClickOnce does not install fonts - Install fonts using C#'/><author><name>Wael AlGhool</name><uri>http://www.blogger.com/profile/12348835436349517930</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_lU9sJzT5R6I/R-8xT4OO1YI/AAAAAAAAADE/xIxN20Hls3I/S220/29032008456_small.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4421999031233037653.post-7830023821677948062</id><published>2010-06-22T06:57:00.000-07:00</published><updated>2010-06-22T07:23:43.990-07:00</updated><title type='text'>An error occurred creating the configuration section handler for system.serviceModel/bindings</title><content type='html'>&lt;p class="style3"&gt;Suddenly I got a problem when trying to access a web service,&lt;br /&gt;the problem only occurred on my PC that has "&lt;strong&gt;Vista SP1 x64&lt;/strong&gt;"&lt;br /&gt;operating system, my workmates hasn't this problem at all, this is the exception&lt;br /&gt;string appeared:&lt;/p&gt;&lt;br /&gt;&lt;p class="style1"&gt;&lt;span style="font-size:85%;color:#3333ff;"&gt;System.TypeInitializationException: The type initializer for&lt;br /&gt;'my internal class name' threw an exception. ---&amp;gt;&lt;br /&gt;System.Configuration.ConfigurationErrorsException: An error occurred creating&lt;br /&gt;the configuration section handler for system.serviceModel/bindings: Could not&lt;br /&gt;load type&lt;br /&gt;'System.Security.Authentication.ExtendedProtection.Configuration.ExtendedProtectionPolicyElement'&lt;br /&gt;from assembly 'System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.&lt;br /&gt;(D:\Projects\Hajj1431\Sources\Desktop\Hajj\bin\Release\Hajj.exe.Config line 38)&lt;br /&gt;---&amp;gt; System.TypeLoadException: Could not load type&lt;br /&gt;'System.Security.Authentication.ExtendedProtection.Configuration.ExtendedProtectionPolicyElement'&lt;br /&gt;from assembly 'System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="style4"&gt;I googled and found some thing similar&lt;br /&gt;&lt;a href="http://geekswithblogs.net/mnf/archive/2008/11/14/could-not-load-type-system.servicemodel.configuration.bindingssectiongroup.aspx"&gt;&lt;br /&gt;here&lt;/a&gt;,&lt;br /&gt;&lt;a href="http://stackoverflow.com/questions/3004299/wcf-service-errors-after-installing-windowsxp-updates"&gt;&lt;br /&gt;here&lt;/a&gt;,&lt;br /&gt;&lt;a href="http://communitycentral.metastorm.com/t5/BPM-Installation-and/v9-SR1-Latest-windows-update-KB982168-seem-to-cause-Metastorm/m-p/1414/highlight/false"&gt;&lt;br /&gt;here&lt;/a&gt; and&lt;br /&gt;&lt;a href="http://social.msdn.microsoft.com/Forums/en-US/netfxnetcom/thread/853e2c1e-9216-46b3-b8e7-0594b64f01b4"&gt;&lt;br /&gt;here&lt;/a&gt;. All of them points to a corrupted windows update with code KB982168, I&lt;br /&gt;spend long time searching about KB982168 or any thing similar but nothing. Where&lt;br /&gt;all of the previous threads were talking about Win2003 and WinXP updates.&lt;/p&gt;&lt;br /&gt;&lt;p class="style4"&gt;I tried to restore my operating system to old date but Windows&lt;br /&gt;Restore was disabled by group policy created by Domain Admin.&lt;/p&gt;&lt;br /&gt;&lt;p class="style4"&gt;I tried to go deep in the problem to find which assembly cause&lt;br /&gt;the problem but it seems it is some thing larger than a single assembly.&lt;/p&gt;&lt;br /&gt;&lt;p class="style5"&gt;After long time of try and error I reached a solution by&lt;br /&gt;installing Vista Service Pack 2.&lt;/p&gt;&lt;br /&gt;&lt;p class="style5"&gt;Where, I noticed that Microsoft announced it will not support&lt;br /&gt;Vista without SP2, so, I realized that any update my not work properly without&lt;br /&gt;SP2, again searching, I found x64 version of mentioned SP2, it takes an hour to&lt;br /&gt;download and another hour or more to install, but finally web-services is back&lt;br /&gt;to work again.&lt;/p&gt;&lt;br /&gt;&lt;p class="style5"&gt;Thanks god ...&lt;/p&gt;&lt;br /&gt;&lt;p class="style5"&gt;&lt;strong&gt;Service Pack 2 (KB948465):&lt;br /&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;It is 745MB size and can be downloaded from this link:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=8ad69826-03d4-488c-8f26-074800c55bc3&amp;amp;amp;displaylang=en&amp;amp;displaylang=en"&gt;&lt;br /&gt;http://www.microsoft.com/downloads/details.aspx?FamilyID=8ad69826-03d4-488c-8f26-074800c55bc3&amp;amp;amp;displaylang=en&amp;amp;displaylang=en&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4421999031233037653-7830023821677948062?l=yourprosoft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yourprosoft.blogspot.com/feeds/7830023821677948062/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yourprosoft.blogspot.com/2010/06/error-occurred-creating-configuration.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4421999031233037653/posts/default/7830023821677948062'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4421999031233037653/posts/default/7830023821677948062'/><link rel='alternate' type='text/html' href='http://yourprosoft.blogspot.com/2010/06/error-occurred-creating-configuration.html' title='An error occurred creating the configuration section handler for system.serviceModel/bindings'/><author><name>Wael AlGhool</name><uri>http://www.blogger.com/profile/12348835436349517930</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_lU9sJzT5R6I/R-8xT4OO1YI/AAAAAAAAADE/xIxN20Hls3I/S220/29032008456_small.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4421999031233037653.post-2396661359884948424</id><published>2010-05-18T22:22:00.000-07:00</published><updated>2010-05-18T22:24:58.819-07:00</updated><title type='text'>The remote server returned an error: (502) Bad Gateway.</title><content type='html'>&lt;b&gt;&lt;span style="font-family:'Georgia','serif';color:red;"&gt;The remote server returned an error: (502) Bad Gateway.&lt;?xml:namespace prefix = o /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt; &lt;div class="Section1"&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-family:times new roman;"&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-size:100%;color:#990000;"&gt;Simply I want to access internet-world from inside my web-application using the following code.&lt;/span&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;public&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; &lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;static&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; &lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;string&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; BrowseURL(&lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;string&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; url)&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;&lt;span style="font-size:85%;"&gt;{&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:#2b91af;"&gt;HttpWebRequest&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; request = (&lt;/span&gt;&lt;span style="font-family:'Courier New';color:#2b91af;"&gt;HttpWebRequest&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;)&lt;/span&gt;&lt;span style="font-family:'Courier New';color:#2b91af;"&gt;WebRequest&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;.Create(url);&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;request.KeepAlive = &lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;false&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;request.ProtocolVersion = &lt;/span&gt;&lt;span style="font-family:'Courier New';color:#2b91af;"&gt;HttpVersion&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;.Version10;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;request.Method = &lt;/span&gt;&lt;span style="font-family:'Courier New';color:#a31515;"&gt;"GET"&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;request.Credentials = &lt;/span&gt;&lt;span style="font-family:'Courier New';color:#2b91af;"&gt;CredentialCache&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;.DefaultCredentials;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:green;"&gt;//&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;request.Proxy = &lt;/span&gt;&lt;span style="font-family:'Courier New';color:#2b91af;"&gt;WebProxy&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;.GetDefaultProxy();&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;request.Proxy.Credentials = &lt;/span&gt;&lt;span style="font-family:'Courier New';color:#2b91af;"&gt;CredentialCache&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;.DefaultCredentials;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:green;"&gt;//&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:#2b91af;"&gt;HttpWebResponse&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; response = (&lt;/span&gt;&lt;span style="font-family:'Courier New';color:#2b91af;"&gt;HttpWebResponse&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;)request.GetResponse();&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:#2b91af;"&gt;StreamReader&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; reader = &lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;new&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; &lt;/span&gt;&lt;span style="font-family:'Courier New';color:#2b91af;"&gt;StreamReader&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;(response.GetResponseStream(), &lt;/span&gt;&lt;span style="font-family:'Courier New';color:#2b91af;"&gt;Encoding&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;.GetEncoding(response.CharacterSet));&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;string&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; responseData = reader.ReadToEnd();&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;return&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; responseData;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;&lt;span style="font-size:85%;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;&lt;span style="font-size:85%;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt; &lt;/p&gt;&lt;p class="MsoNormal" align="justify"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:times new roman;"&gt;&lt;span style="font-size:100%;color:#990000;"&gt;On my development machine it works fine, but on production server I faced a problem of "Bad Gateway" when reaching GetResponse(), I realized that it was an authentication problem, and after some google_ing, I found a good &lt;/span&gt;&lt;/span&gt;&lt;a href="http://www.devnewsgroups.net/group/microsoft.public.exchange.development/topic36759.aspx"&gt;&lt;span style="font-family:times new roman;font-size:100%;color:#990000;"&gt;thread&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:times new roman;font-size:100%;color:#990000;"&gt; that speaks about solving Proxy problems with authentication. Now, the following code is working properly on my production environment.&lt;/span&gt;&lt;span style="font-family:'Georgia','serif';"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" align="justify"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:'Georgia','serif';"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt; &lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;public&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; &lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;static&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; &lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;string&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; BrowseURL(&lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;string&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; url)&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;&lt;span style="font-size:85%;"&gt;{&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;&lt;span style="font-size:85%;"&gt;HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;request.KeepAlive = &lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;false&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;&lt;span style="font-size:85%;"&gt;request.ProtocolVersion = HttpVersion.Version10;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;request.Method = &lt;/span&gt;&lt;span style="font-family:'Courier New';color:#a31515;"&gt;"GET"&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;&lt;span style="font-size:85%;"&gt;request.Credentials = CredentialCache.DefaultCredentials;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:green;"&gt;//that is the solution&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;WebProxy proxy = &lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;new&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; WebProxy(&lt;/span&gt;&lt;span style="font-family:'Courier New';color:#a31515;"&gt;"proxy "&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;);&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;proxy.Credentials = &lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;new&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; NetworkCredential(&lt;/span&gt;&lt;span style="font-family:'Courier New';color:#a31515;"&gt;"userName"&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;, &lt;/span&gt;&lt;span style="font-family:'Courier New';color:#a31515;"&gt;"Password"&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;, &lt;/span&gt;&lt;span style="font-family:'Courier New';color:#a31515;"&gt;"Domain"&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;);&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;&lt;span style="font-size:85%;"&gt;request.Proxy = proxy;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:green;"&gt;//&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;&lt;span style="font-size:85%;"&gt;HttpWebResponse response = (HttpWebResponse)request.GetResponse();&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:#2b91af;"&gt;StreamReader&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; reader = &lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;new&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; &lt;/span&gt;&lt;span style="font-family:'Courier New';color:#2b91af;"&gt;StreamReader&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;(response.GetResponseStream(), &lt;/span&gt;&lt;span style="font-family:'Courier New';color:#2b91af;"&gt;Encoding&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;.GetEncoding(response.CharacterSet));&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;string&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; responseData = reader.ReadToEnd();&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:blue;"&gt;return&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt; responseData;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';color:windowtext;"&gt;&lt;span style="font-size:85%;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4421999031233037653-2396661359884948424?l=yourprosoft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yourprosoft.blogspot.com/feeds/2396661359884948424/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yourprosoft.blogspot.com/2010/05/remote-server-returned-error-502-bad.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4421999031233037653/posts/default/2396661359884948424'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4421999031233037653/posts/default/2396661359884948424'/><link rel='alternate' type='text/html' href='http://yourprosoft.blogspot.com/2010/05/remote-server-returned-error-502-bad.html' title='The remote server returned an error: (502) Bad Gateway.'/><author><name>Wael AlGhool</name><uri>http://www.blogger.com/profile/12348835436349517930</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_lU9sJzT5R6I/R-8xT4OO1YI/AAAAAAAAADE/xIxN20Hls3I/S220/29032008456_small.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4421999031233037653.post-7775304555533535469</id><published>2010-05-15T01:11:00.000-07:00</published><updated>2010-05-15T01:30:12.000-07:00</updated><title type='text'>Conditional buidl Events using Viusal Studio 2008</title><content type='html'>&lt;div align="justify"&gt;&lt;span style="font-family:arial;"&gt;&lt;span style="color:#330000;"&gt;Sometimes you need some extra actions to be trigged after build, eg. copy exe files. To add an extra action, go to project properties and select “Build Events” tab. You can add the additional actions before and after build process.&lt;br /&gt;&lt;br /&gt;But what if some conditions are needed to check before performing your action. !&lt;br /&gt;&lt;br /&gt;Two things you have to investe in order to know how to make conditional build event in VS2008, first, is the command macros introduced by Microsoft in VS2008, second, is the batch file ".BAT" commands.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Command Macros are &lt;/span&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/c02as0cs(v=VS.71).aspx"&gt;&lt;span style="font-family:arial;"&gt;here&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;.&lt;br /&gt;BAT Commands are &lt;/span&gt;&lt;a href="http://www.aumha.org/a/batches.php"&gt;&lt;span style="font-family:arial;"&gt;here&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#ff0000;"&gt;Example:&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;color:#000099;"&gt;IF NOT $(ConfigurationName) == Release GOTO end&lt;br /&gt;Copy "$(SolutionDir)\$(ConfigurationName).exe" "$(TargetPath)"&lt;br /&gt;:end&lt;/span&gt; &lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4421999031233037653-7775304555533535469?l=yourprosoft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yourprosoft.blogspot.com/feeds/7775304555533535469/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yourprosoft.blogspot.com/2010/05/conditional-buidl-events-using-viusal.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4421999031233037653/posts/default/7775304555533535469'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4421999031233037653/posts/default/7775304555533535469'/><link rel='alternate' type='text/html' href='http://yourprosoft.blogspot.com/2010/05/conditional-buidl-events-using-viusal.html' title='Conditional buidl Events using Viusal Studio 2008'/><author><name>Wael AlGhool</name><uri>http://www.blogger.com/profile/12348835436349517930</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_lU9sJzT5R6I/R-8xT4OO1YI/AAAAAAAAADE/xIxN20Hls3I/S220/29032008456_small.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4421999031233037653.post-1204675037478938881</id><published>2010-05-05T07:39:00.000-07:00</published><updated>2010-05-05T07:39:58.253-07:00</updated><title type='text'>C++ Macro Concatination</title><content type='html'>You can use ## operator (double number sign) to concatinate two tokens (text or arguments) in macro invocation.&lt;br /&gt;&lt;br /&gt;Example:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;enum Types {T1,T2};&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;#define MakeDrivedClass(name, type) class name##type : public type##Base{}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;MakeDrivedClass(CMy,t1);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Output:&lt;br /&gt;&lt;span style="color: blue; font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;class CMyT1 :&amp;nbsp; public T1Base {};&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4421999031233037653-1204675037478938881?l=yourprosoft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yourprosoft.blogspot.com/feeds/1204675037478938881/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yourprosoft.blogspot.com/2010/05/c-macro-concatination.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4421999031233037653/posts/default/1204675037478938881'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4421999031233037653/posts/default/1204675037478938881'/><link rel='alternate' type='text/html' href='http://yourprosoft.blogspot.com/2010/05/c-macro-concatination.html' title='C++ Macro Concatination'/><author><name>Wael AlGhool</name><uri>http://www.blogger.com/profile/12348835436349517930</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_lU9sJzT5R6I/R-8xT4OO1YI/AAAAAAAAADE/xIxN20Hls3I/S220/29032008456_small.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4421999031233037653.post-2165404379246474835</id><published>2010-04-03T04:47:00.000-07:00</published><updated>2010-04-03T04:47:13.506-07:00</updated><title type='text'>500.19 IIS7 ERROR</title><content type='html'>&lt;span style="color: blue;"&gt;After createing a new ASP.NET application, and after publishing to certain folder, IIS7 refused to open the published site because of 500.19 error, IIS7 said that the requested page cannot be accessed because the related configuration data for the page is invalid.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_lU9sJzT5R6I/S7cpNINJxcI/AAAAAAAAAbY/nkXxtFBjG6U/s1600/500.19-Error.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="90" nt="true" src="http://3.bp.blogspot.com/_lU9sJzT5R6I/S7cpNINJxcI/AAAAAAAAAbY/nkXxtFBjG6U/s400/500.19-Error.jpg" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;But, in&amp;nbsp;fact it is a security issues that prevent mister IIS7 from accessing web.config file. Particularly, it was computername\IIS_IUSRS that must take some permisions, read this &lt;a href="http://support.microsoft.com/kb/942055"&gt;article&lt;/a&gt; for more information.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size: large;"&gt;Solution:&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="color: #660000;"&gt;Simply add the following groups&amp;nbsp;into security tab to solve this problem:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #660000;"&gt;1- Authenticated Users&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #660000;"&gt;2- Users (computername\Users)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_lU9sJzT5R6I/S7cp6PNXwxI/AAAAAAAAAbg/G7vLGP1OEjk/s1600/500.19-Error-Solution.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" nt="true" src="http://1.bp.blogspot.com/_lU9sJzT5R6I/S7cp6PNXwxI/AAAAAAAAAbg/G7vLGP1OEjk/s400/500.19-Error-Solution.jpg" width="291" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4421999031233037653-2165404379246474835?l=yourprosoft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yourprosoft.blogspot.com/feeds/2165404379246474835/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yourprosoft.blogspot.com/2010/04/50019-iis7-error.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4421999031233037653/posts/default/2165404379246474835'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4421999031233037653/posts/default/2165404379246474835'/><link rel='alternate' type='text/html' href='http://yourprosoft.blogspot.com/2010/04/50019-iis7-error.html' title='500.19 IIS7 ERROR'/><author><name>Wael AlGhool</name><uri>http://www.blogger.com/profile/12348835436349517930</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_lU9sJzT5R6I/R-8xT4OO1YI/AAAAAAAAADE/xIxN20Hls3I/S220/29032008456_small.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_lU9sJzT5R6I/S7cpNINJxcI/AAAAAAAAAbY/nkXxtFBjG6U/s72-c/500.19-Error.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4421999031233037653.post-6912579871446403228</id><published>2010-03-16T21:45:00.000-07:00</published><updated>2010-03-16T21:45:48.047-07:00</updated><title type='text'>Allow only one instance of any Windows Form, C#</title><content type='html'>&lt;div&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="color: #990000; font-size: small;"&gt;The ability to load forms once, is something essential in many applications. But, this is a simple way to do that:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;Boolean&lt;/span&gt; IsFormAlreadyLoaded(&lt;span style="color: blue;"&gt;string&lt;/span&gt; formToLoadName)&lt;/span&gt;&lt;br /&gt;{&lt;/span&gt;&lt;span style="color: green; font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Allow only one instance of any MDI child form in your MDI application&lt;/span&gt;&lt;span style="color: green; font-size: x-small;"&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; font-size: x-small;"&gt;foreach&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; (&lt;/span&gt;&lt;span style="color: #2b91af; font-size: x-small;"&gt;Form&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; frmChild &lt;/span&gt;&lt;span style="color: blue; font-size: x-small;"&gt;in&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;/span&gt;&lt;span style="color: blue; font-size: x-small;"&gt;this&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;.MdiChildren)&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;span style="color: blue; font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; (frmChild.Name == formToLoadName)&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; frmChild.Activate();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; font-size: x-small;"&gt;return&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;/span&gt;&lt;span style="color: blue; font-size: x-small;"&gt;true&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; font-size: x-small;"&gt;return&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;/span&gt;&lt;span style="color: blue; font-size: x-small;"&gt;false&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;; &lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4421999031233037653-6912579871446403228?l=yourprosoft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yourprosoft.blogspot.com/feeds/6912579871446403228/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yourprosoft.blogspot.com/2010/03/allow-only-one-instance-of-any-windows.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4421999031233037653/posts/default/6912579871446403228'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4421999031233037653/posts/default/6912579871446403228'/><link rel='alternate' type='text/html' href='http://yourprosoft.blogspot.com/2010/03/allow-only-one-instance-of-any-windows.html' title='Allow only one instance of any Windows Form, C#'/><author><name>Wael AlGhool</name><uri>http://www.blogger.com/profile/12348835436349517930</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_lU9sJzT5R6I/R-8xT4OO1YI/AAAAAAAAADE/xIxN20Hls3I/S220/29032008456_small.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4421999031233037653.post-9185706480226770220</id><published>2010-03-15T21:34:00.000-07:00</published><updated>2010-03-16T21:51:32.218-07:00</updated><title type='text'>Printer capabilities</title><content type='html'>&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;/span&gt;&lt;span style="font-family: Times, &amp;quot;Times New Roman&amp;quot;, serif; font-size: large;"&gt;This&amp;nbsp;is an excelent&amp;nbsp;&lt;/span&gt;&lt;a href="http://aclacl.brinkster.net/MFC/ch13e.htm"&gt;&lt;span style="font-family: Times, &amp;quot;Times New Roman&amp;quot;, serif; font-size: large;"&gt;article&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family: Times, &amp;quot;Times New Roman&amp;quot;, serif; font-size: large;"&gt; about printing&amp;nbsp;essentials, and,&amp;nbsp; here is my own experiments using some different printers:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;strong&gt;HP Officejet Pro All-in-One&lt;/strong&gt; &lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none; clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_lU9sJzT5R6I/S58IqR9BVNI/AAAAAAAAAa4/jLrwfVl2YDw/s1600-h/HP+Officejet+Pro+All-in-One.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_lU9sJzT5R6I/S58IqR9BVNI/AAAAAAAAAa4/jLrwfVl2YDw/s320/HP+Officejet+Pro+All-in-One.jpg" vt="true" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;strong&gt;HP Color LaserJet 3800&lt;/strong&gt; &lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none; clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_lU9sJzT5R6I/S58IiB9CKWI/AAAAAAAAAaw/1kTePaNyi9U/s1600-h/HP+Color+LaserJet+3800.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_lU9sJzT5R6I/S58IiB9CKWI/AAAAAAAAAaw/1kTePaNyi9U/s320/HP+Color+LaserJet+3800.jpg" vt="true" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;strong&gt;KONICA MINOLTA mc7450 PS&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_lU9sJzT5R6I/S58KAyFCw-I/AAAAAAAAAbA/2wFmRuKG9xc/s1600-h/KONICA+MINOLTA+mc7450+PS.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_lU9sJzT5R6I/S58KAyFCw-I/AAAAAAAAAbA/2wFmRuKG9xc/s320/KONICA+MINOLTA+mc7450+PS.jpg" vt="true" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4421999031233037653-9185706480226770220?l=yourprosoft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yourprosoft.blogspot.com/feeds/9185706480226770220/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yourprosoft.blogspot.com/2010/03/printer-capabilities.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4421999031233037653/posts/default/9185706480226770220'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4421999031233037653/posts/default/9185706480226770220'/><link rel='alternate' type='text/html' href='http://yourprosoft.blogspot.com/2010/03/printer-capabilities.html' title='Printer capabilities'/><author><name>Wael AlGhool</name><uri>http://www.blogger.com/profile/12348835436349517930</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_lU9sJzT5R6I/R-8xT4OO1YI/AAAAAAAAADE/xIxN20Hls3I/S220/29032008456_small.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_lU9sJzT5R6I/S58IqR9BVNI/AAAAAAAAAa4/jLrwfVl2YDw/s72-c/HP+Officejet+Pro+All-in-One.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4421999031233037653.post-5502043798412311480</id><published>2010-03-09T02:04:00.000-08:00</published><updated>2010-03-09T02:04:32.764-08:00</updated><title type='text'>ClickOnce signing error and its solution :)</title><content type='html'>&lt;strong&gt;&lt;span style="color: black;"&gt;This is the error: &lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;error: 0x80880253&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;The signer's certificate is not valid for signing.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;SignTool Error: An error occurred while attempting to sign: bin\Debug\app.publish\\setup.exe&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;A very good work but not work with me: &lt;a href="http://www.may.be/renewcert/"&gt;&lt;span style="font-size: x-small;"&gt;http://www.may.be/renewcert/&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;A very good comment that brings me to the road and solve the problem:&lt;br /&gt;&lt;a href="http://social.msdn.microsoft.com/Forums/en/winformssetup/thread/cebc2dff-1418-4be4-b3f7-9e158ed6b573"&gt;&lt;span style="font-size: x-small;"&gt;http://social.msdn.microsoft.com/Forums/en/winformssetup/thread/cebc2dff-1418-4be4-b3f7-9e158ed6b573&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This the magic comment:&lt;br /&gt;&lt;span style="color: red; font-family: Times, &amp;quot;Times New Roman&amp;quot;, serif; font-size: x-small;"&gt;Are you signing your ClickOnce deployment? If you go to the Signing tab for your project, do you have a certificate selected?&lt;/span&gt;&lt;br /&gt;&lt;span style="color: red; font-family: Times, &amp;quot;Times New Roman&amp;quot;, serif; font-size: x-small;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: red; font-family: Times, &amp;quot;Times New Roman&amp;quot;, serif; font-size: x-small;"&gt;If you are just pushing updates for the same application, you will want to&lt;strong&gt; &lt;span style="color: #990000;"&gt;track down the certificate file (pfx)&lt;/span&gt;&lt;/strong&gt; you used to use and sign with it instead of creating a new one, so the deployment does not think you created a new certificate.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #990000; font-family: Times, &amp;quot;Times New Roman&amp;quot;, serif; font-size: x-small;"&gt;&lt;strong&gt;If you are just deploying something new, you can create a test certificate and use that.&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: red; font-family: Times, &amp;quot;Times New Roman&amp;quot;, serif; font-size: x-small;"&gt;RobinS.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: red; font-family: Times, &amp;quot;Times New Roman&amp;quot;, serif; font-size: x-small;"&gt;GoldMail.com&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4421999031233037653-5502043798412311480?l=yourprosoft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yourprosoft.blogspot.com/feeds/5502043798412311480/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yourprosoft.blogspot.com/2010/03/clickonce-signing-error-and-its.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4421999031233037653/posts/default/5502043798412311480'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4421999031233037653/posts/default/5502043798412311480'/><link rel='alternate' type='text/html' href='http://yourprosoft.blogspot.com/2010/03/clickonce-signing-error-and-its.html' title='ClickOnce signing error and its solution :)'/><author><name>Wael AlGhool</name><uri>http://www.blogger.com/profile/12348835436349517930</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_lU9sJzT5R6I/R-8xT4OO1YI/AAAAAAAAADE/xIxN20Hls3I/S220/29032008456_small.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4421999031233037653.post-4890495938417399708</id><published>2010-03-07T22:55:00.000-08:00</published><updated>2010-03-08T02:00:25.691-08:00</updated><title type='text'>Identify yourself with Certificates</title><content type='html'>&lt;span style="color: red; font-family: Arial, Helvetica, sans-serif;"&gt;&lt;strong&gt;What is PFX file?&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;This file type is&amp;nbsp;an acronym of&amp;nbsp;"Personal Information Exchange" that can be opened with &lt;/span&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;"Microsoft Certificate Manager or Certificate Import Wizard".&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;This file is an Encrypted security file that stores SSL secure certificates used to authenticate a person or device, such as a computer or Web server; requires a password to be opened; can be installed by right-clicking the file and selecting "Install PFX."&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;More than one certificate can be stored in a single file in the following formats:&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;PFX,P12: Personal Information Exchange&lt;br /&gt;P7B: Cryptographic Message Syntax Standard-PKCS#7 Certificate&lt;br /&gt;SST: Microsoft Serialized Certificate Store&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color: red;"&gt;What SSL Is and Why You Need It?&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Doing business online without SSL is like leaving customer credit card numbers on the counter or offering a dressing room without a door&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;An SSL certificate is a bit of code on your web server that provides security for online communications. When a web browser contacts your secured web site, the SSL certificate enables an encrypted connection. It’s kind of like sealing a letter in an envelope before sending it through the mail.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;SSL certificates also inspire trust because each SSL certificate contains identification information. When you request an SSL certificate, a third party (such as Thawte or VeriSign) verifies your organization’s information and issues a unique certificate to you with that &lt;/span&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;information. This is known as the authentication process.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;An SSL certificate, or secure certificate, is a file installed on a secure Web server that identifies a website. This digital certificate establishes the identity and authenticity of the company or merchant so that online shoppers can trust that the website is secure and reliable. In order to verify that these sites are legitimate (they are who they say they are), the companies and their websites are verified by a third party, such as Verisign or Thawte.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Once the verification company establishes the legitimacy of an organization and the associated website, they will issue an SSL certificate (for the small fee of a few hundred dollars). This digital certificate is installed on the Web server and will be viewable when a user enters a secure area of the website. You can tell you are visiting a secure page when the URL starts with "https." To view the certificate, click the lock icon near one of the edges of your browser window.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Because digital certificates verify a company's current status, they do not last forever. SSL certificates typically expire every one to three years. If the certificate is not renewed in time, you may see an alert box pop up that says "This website's certificate has expired." This error has nothing to do with you or your computer, but is displayed because the Web server you connected to has not renewed its SSL certificate. While this does not necessarily mean the site is fraudulent, it does show that the site is less than professional.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color: red;"&gt;What Happens between the Web Browser and Server?&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;1.A browser attempts to connect to a web site secured with SSL. The browser requests that the web server identify itself. &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;2.The server sends the browser a copy of its SSL certificate. &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;3.The browser checks whether it trusts the SSL certificate. If so, it sends a message to the server. &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;4.The server sends back a digitally signed acknowledgement to start an SSL encrypted session. &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;5.Encrypted data is shared between the browser and the server.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color: #38761d;"&gt;Continue reading ...&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;a href="http://www.thawte.com/resources/ssl-information-center/get-started-with-ssl/index.html"&gt;http://www.thawte.com/resources/ssl-information-center/get-started-with-ssl/index.html&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.thawte.com/resources/ssl-information-center/get-started-with-ssl/how-ssl-works/index.html"&gt;http://www.thawte.com/resources/ssl-information-center/get-started-with-ssl/how-ssl-works/index.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color: red;"&gt;List of comercial certificate authorities&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ms995347.aspx"&gt;http://msdn.microsoft.com/en-us/library/ms995347.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;AOL (http://www.aol.com)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;A-Trust (http://www.a-trust.at)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Arge Daten (http://www.signatur.rtr.at/de/providers/providers/argedaten.html)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;AS Sertifitseerimiskeskuse (http://www.sk.ee)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Asociacion Nacional del Notariado Mexicano (http://www.notariadomexicano.org.mx)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Austria Telekom-Control Commission (http://www.signatur.rtr.at)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Autoridade Certificadora Raiz Brasileira (http://www.icpbrasil.gov.br)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Autoridad de Certificacion Firmaprofesional&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Baltimore (http://www.baltimore.com)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Belgacom E-Trust (http://www.e-trust.be)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;CC Signet (http://www.signet.pl)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;CAMERFIRMA (http://www.camerfirma.com)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Certic?mara S.A. (http://www.certicamara.com/)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Certisign (http://www.certisign.com.br/)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;CertPlus (http://www.certplus.com)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Colegio de Registradores&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Comodo Group (http://www.comodogroup.com/)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;ComSign (http://www.ComSign.co.il)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Correo&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Deutsche Telekom (http://www.telekom.de)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;DST (http://www.digsigtrust.com/)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Entrust (http://www.entrust.com/certificate_services/index.htm)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;eSign (http://www.esign.com.au/)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;EUnet International (http://www.eunet.fi/)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;FESTE (http://www.feste.org/)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;First Data Digital Certificates (http://www.firstdata.com/index.jsp)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;FNMT (http://www.ceres.fnmt.es/)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Gatekeeper Root CA (http://www.agimo.gov.au/infrastructure/gatekeeper)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;GeoTrust (http://www.geotrust.com)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;GlobalSign (http://www.globalsign.com/)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;GoDaddy (http://www.godaddy.com)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Hongkong Post (http://www.hongkongpost.gov.hk/product/cps/ecert/index.html))&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;IPS SERVIDORES (http://www.ips.es/)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;KMD (http://www.kmd-ca.dk)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;NetLock (http://www.netlock.hu/)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Post.Trust (http://www.post.trust.ie/)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;PTT Post (http://www.ptt-post.nl)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Quovadis (http://www.quovadis.bm/)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;RSA (http://www.rsasecurity.com/)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Saunalahden Serveri (http://www.saunalahti.fi/)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;SECOM Trust.net (http://www.secomtrust.net)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;SecureNet (http://www.securenetasia.com/)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;SecureSign (http://www2.jcsinc.co.jp)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Serasa (http://www.serasa.com/)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;SIA (https://ca.sia.it/)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Sonera (http://www.sonera.com/)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Spanish Property &amp;amp; Commerce Registry (https://www.registradores.org))&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;TC TrustCenter (http://www.trustcenter.de/)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;TDC (http://www.tdc.dk)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Thawte (http://www.thawte.com/)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Trustis Limited (http://www.trustis.com)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;TW Government Root Certification Authority&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Unizeto Certum (http://www.certum.pl)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;UserTRUST (http://www.usertrust.com/)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;ValiCert (http://www.valicert.com/)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Verisign (http://www.verisign.com/)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Visa&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Wells Fargo Root Certificate Authority (http://www.wellsfargo.com/certpolicy)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;XRamp (http://www.xramp.com)&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4421999031233037653-4890495938417399708?l=yourprosoft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yourprosoft.blogspot.com/feeds/4890495938417399708/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yourprosoft.blogspot.com/2010/03/what-pfx-and-ssl-are-and-why-you-need.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4421999031233037653/posts/default/4890495938417399708'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4421999031233037653/posts/default/4890495938417399708'/><link rel='alternate' type='text/html' href='http://yourprosoft.blogspot.com/2010/03/what-pfx-and-ssl-are-and-why-you-need.html' title='Identify yourself with Certificates'/><author><name>Wael AlGhool</name><uri>http://www.blogger.com/profile/12348835436349517930</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_lU9sJzT5R6I/R-8xT4OO1YI/AAAAAAAAADE/xIxN20Hls3I/S220/29032008456_small.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4421999031233037653.post-4052061902952269317</id><published>2010-03-04T00:27:00.000-08:00</published><updated>2010-03-04T00:27:18.452-08:00</updated><title type='text'>Some Internet culture around Flash</title><content type='html'>&lt;br /&gt;&lt;strong&gt;Adob, Learn Flash Professional CS4:&lt;/strong&gt;&lt;br /&gt;Learn how to use Flash Professional CS4 with tutorials selected by experts at Adobe.There's everything from Getting Started for beginners, to New Features, Workflows, and Overviews.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://tv.adobe.com/show/learn-flash-professional-cs4/"&gt;http://tv.adobe.com/show/learn-flash-professional-cs4/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;PixlToLife: learning made simple&lt;/strong&gt;&lt;br /&gt;Contians free flash tutorials: &lt;a href="http://www.pixel2life.com/tutorials/adobe_flash/"&gt;http://www.pixel2life.com/tutorials/adobe_flash/&lt;/a&gt;&lt;br /&gt;Also, includes these good tutorials: &lt;br /&gt;1- Making a Photoshoot Effect With jQuery &amp;amp; CSS: &lt;a href="http://www.pixel2life.com/viewtutorial/76739/making_a_photoshoot_effect_with_jquery_css/"&gt;http://www.pixel2life.com/viewtutorial/76739/making_a_photoshoot_effect_with_jquery_css/&lt;/a&gt;&lt;br /&gt;Which&amp;nbsp;depends on the following&amp;nbsp;tutorial:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; jQuery PhotoShoot Plugin 1.0: &lt;a href="http://tutorialzine.com/2010/02/jquery-photoshoot-plugin/"&gt;http://tutorialzine.com/2010/02/jquery-photoshoot-plugin/&lt;/a&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Where the author uses images from Flicker.&lt;br /&gt;&lt;strong&gt;Flicker:&lt;/strong&gt;&amp;nbsp;is huge store of shared images, &lt;a href="http://www.flickr.com/"&gt;http://www.flickr.com/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;2- Creating Ripples in the Medici Fountain: &lt;a href="http://www.pixel2life.com/viewtutorial/76115/creating_ripples_in_the_medici_fountain/"&gt;http://www.pixel2life.com/viewtutorial/76115/creating_ripples_in_the_medici_fountain/&lt;/a&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4421999031233037653-4052061902952269317?l=yourprosoft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yourprosoft.blogspot.com/feeds/4052061902952269317/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yourprosoft.blogspot.com/2010/03/some-internet-culture-around-flash.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4421999031233037653/posts/default/4052061902952269317'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4421999031233037653/posts/default/4052061902952269317'/><link rel='alternate' type='text/html' href='http://yourprosoft.blogspot.com/2010/03/some-internet-culture-around-flash.html' title='Some Internet culture around Flash'/><author><name>Wael AlGhool</name><uri>http://www.blogger.com/profile/12348835436349517930</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_lU9sJzT5R6I/R-8xT4OO1YI/AAAAAAAAADE/xIxN20Hls3I/S220/29032008456_small.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4421999031233037653.post-7764893367157594656</id><published>2010-03-01T22:10:00.000-08:00</published><updated>2010-03-16T22:18:03.109-07:00</updated><title type='text'>Simplified jQuery Poll-down menu, only an anchor and a div elements</title><content type='html'>&lt;style type="text/css"&gt;a{font-weight:bold;color:#36c}.style1 { font-size: medium;}.style2 { font-size: large;}.style3 { color: teal;}.style4 { color: #000000;}.style5 { font-size: x-large;}&lt;/style&gt;&lt;br /&gt;&lt;div style="direction: ltr;"&gt;&lt;span style="color: blue; font-size: x-small;"&gt;&lt;span class="style4"&gt;&lt;span class="style5"&gt;This code is adopted from another original &lt;a href="http://anotherdan.com/9/simple-drop-down-menu-with-jquery"&gt;article&lt;/a&gt;&lt;/span&gt;&lt;span class="style2"&gt;:&lt;/span&gt;&lt;/span&gt;&lt;span class="style2"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;&lt;span class="style1"&gt;It is a simple poll down menu construct from &amp;lt;a&amp;gt; alement and &amp;lt;div&amp;gt; element, just like that:&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;span class="style3" style="font-family: Georgia, 'Times New Roman', serif;"&gt;1.&amp;lt;a id="anchor" onclick="return false;" href=""&amp;gt;Menu title&amp;lt;/a&amp;gt;&lt;/span&gt;&lt;span class="style3"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="style3" style="font-family: Georgia, 'Times New Roman', serif;"&gt;2.&amp;lt;div id="div" style="display:none;position:absolute; z-index:1000;"&amp;gt;&lt;/span&gt;&lt;span class="style3"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="style3" style="font-family: Georgia, 'Times New Roman', serif;"&gt;3.&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;a href=""&amp;gt;element1 title&amp;lt;/a&amp;gt;&lt;/span&gt;&lt;span class="style3"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="style3" style="font-family: Georgia, 'Times New Roman', serif;"&gt;4.&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;a href=""&amp;gt;element2 title&amp;lt;/a&amp;gt;&lt;/span&gt;&lt;span class="style3"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="style3" style="font-family: Georgia, 'Times New Roman', serif;"&gt;5.&amp;lt;/div&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;img alt="menu" height="172" src="http://1.bp.blogspot.com/_lU9sJzT5R6I/S4t4w47UPEI/AAAAAAAAAZs/ADj7doRhcsQ/s320/SimplePolldownMenu.jpg" width="149" /&gt;&lt;/span&gt;&lt;span style="color: blue; font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt;function&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; MakeADIVMenu(anchor,div) {&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue; font-size: x-small;"&gt;var&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; timeoutID = -1;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(&lt;/span&gt;&lt;span style="color: #a31515; font-size: x-small;"&gt;'a#'&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; + anchor)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; .hover(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; font-size: x-small;"&gt;function&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;() {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; clearTimeout(timeoutID);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(&lt;/span&gt;&lt;span style="color: #a31515; font-size: x-small;"&gt;'#'&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; + div).css(&lt;/span&gt;&lt;span style="color: #a31515; font-size: x-small;"&gt;'position'&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;, &lt;/span&gt;&lt;span style="color: #a31515; font-size: x-small;"&gt;'absolute'&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(&lt;/span&gt;&lt;span style="color: #a31515; font-size: x-small;"&gt;'#'&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; + div).css(&lt;/span&gt;&lt;span style="color: #a31515; font-size: x-small;"&gt;'top'&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;, $(&lt;/span&gt;&lt;span style="color: #a31515; font-size: x-small;"&gt;'a#'&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; + anchor).position().top);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(&lt;/span&gt;&lt;span style="color: #a31515; font-size: x-small;"&gt;'#'&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; + div).css(&lt;/span&gt;&lt;span style="color: #a31515; font-size: x-small;"&gt;'left'&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;, $(&lt;/span&gt;&lt;span style="color: #a31515; font-size: x-small;"&gt;'a#'&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; + anchor).position().left - ($(&lt;/span&gt;&lt;span style="color: #a31515; font-size: x-small;"&gt;'#'&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; + div).width()/2));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(&lt;/span&gt;&lt;span style="color: #a31515; font-size: x-small;"&gt;'#'&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; + div).css({zIndex:20}).show(); &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; },&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; font-size: x-small;"&gt;function&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;() { timeoutID = setTimeout(&lt;/span&gt;&lt;span style="color: blue; font-size: x-small;"&gt;function&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;() { $(&lt;/span&gt;&lt;span style="color: #a31515; font-size: x-small;"&gt;'#'&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; + div).hide(); }, 2000); }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; );&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(&lt;/span&gt;&lt;span style="color: #a31515; font-size: x-small;"&gt;'#'&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; + div)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; .hover(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; font-size: x-small;"&gt;function&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;() {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; clearTimeout(timeoutID);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(&lt;/span&gt;&lt;span style="color: blue; font-size: x-small;"&gt;this&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .each(&lt;/span&gt;&lt;span style="color: blue; font-size: x-small;"&gt;function&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;() {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(&lt;/span&gt;&lt;span style="color: blue; font-size: x-small;"&gt;this&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;).css(&lt;/span&gt;&lt;span style="color: #a31515; font-size: x-small;"&gt;'position'&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;, &lt;/span&gt;&lt;span style="color: #a31515; font-size: x-small;"&gt;'absolute'&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(&lt;/span&gt;&lt;span style="color: blue; font-size: x-small;"&gt;this&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;).css(&lt;/span&gt;&lt;span style="color: #a31515; font-size: x-small;"&gt;'top'&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;, $(&lt;/span&gt;&lt;span style="color: #a31515; font-size: x-small;"&gt;'a#'&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; + anchor).position().top);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(&lt;/span&gt;&lt;span style="color: blue; font-size: x-small;"&gt;this&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;).css(&lt;/span&gt;&lt;span style="color: #a31515; font-size: x-small;"&gt;'left'&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;, $(&lt;/span&gt;&lt;span style="color: #a31515; font-size: x-small;"&gt;'a#'&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; + anchor).position().left - ($(&lt;/span&gt;&lt;span style="color: blue; font-size: x-small;"&gt;this&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;).width()/2));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(&lt;/span&gt;&lt;span style="color: blue; font-size: x-small;"&gt;this&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;).css({ zIndex: 20 }).show();});&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; },&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue; font-size: x-small;"&gt;function&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;() { $(&lt;/span&gt;&lt;span style="color: blue; font-size: x-small;"&gt;this&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;).hide(); }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; );&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: green; font-size: x-small;"&gt;//1.&amp;lt;a id="anchor" onclick="return false;" href=""&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //2.&amp;lt;div id="div" style="display:none"&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //3. &amp;lt;a href=""&amp;gt;element1&amp;lt;/a&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //4. &amp;lt;a href=""&amp;gt;element2&amp;lt;/a&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //5.&amp;lt;/div&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4421999031233037653-7764893367157594656?l=yourprosoft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yourprosoft.blogspot.com/feeds/7764893367157594656/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yourprosoft.blogspot.com/2010/03/simplified-jquery-poll-down-menu-only.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4421999031233037653/posts/default/7764893367157594656'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4421999031233037653/posts/default/7764893367157594656'/><link rel='alternate' type='text/html' href='http://yourprosoft.blogspot.com/2010/03/simplified-jquery-poll-down-menu-only.html' title='Simplified jQuery Poll-down menu, only an anchor and a div elements'/><author><name>Wael AlGhool</name><uri>http://www.blogger.com/profile/12348835436349517930</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_lU9sJzT5R6I/R-8xT4OO1YI/AAAAAAAAADE/xIxN20Hls3I/S220/29032008456_small.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_lU9sJzT5R6I/S4t4w47UPEI/AAAAAAAAAZs/ADj7doRhcsQ/s72-c/SimplePolldownMenu.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4421999031233037653.post-432379250373577512</id><published>2010-02-24T00:58:00.000-08:00</published><updated>2010-02-24T01:59:10.692-08:00</updated><title type='text'>IE8 compatibility</title><content type='html'>&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;IE8 doesn't support many standard rules of W3C-CSS3. One of them is&amp;nbsp;"background-origin" attribute,&amp;nbsp;this attribute is used to&amp;nbsp;define the origin of &amp;nbsp;background-image, where&amp;nbsp;it takes one value of&amp;nbsp;(border, padding or content).&lt;/div&gt;&lt;/div&gt;&lt;div class="separator" style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none; clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_lU9sJzT5R6I/S4ToFeaUqqI/AAAAAAAAAY8/i8qA8ak14Ek/s1600-h/box.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="242" kt="true" src="http://4.bp.blogspot.com/_lU9sJzT5R6I/S4ToFeaUqqI/AAAAAAAAAY8/i8qA8ak14Ek/s400/box.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none; clear: both; text-align: left;"&gt;• IE up to version 7 defaults to background-origin: border;&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;• IE 8 default behavior is background-origin: padding;&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;But IE8 behaves like IE7 untill you tell him to behave like himself "IE8", that by adding&amp;nbsp;the following meta tag to your HTML layout:&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;span style="color: blue;"&gt;&amp;lt;meta http-equiv="X-UA-Compatible" content="IE=8" /&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none; clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none; clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_lU9sJzT5R6I/S4T3XPZ9pSI/AAAAAAAAAZE/Lg92hjXSnKA/s1600-h/IE8-000.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="75" kt="true" src="http://4.bp.blogspot.com/_lU9sJzT5R6I/S4T3XPZ9pSI/AAAAAAAAAZE/Lg92hjXSnKA/s320/IE8-000.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div align="center" style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;IE8, before adding meta tag&lt;/div&gt;&lt;div align="center" style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_lU9sJzT5R6I/S4T3kfNfqmI/AAAAAAAAAZM/2vrfloOcXHQ/s1600-h/IE8-001.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="94" kt="true" src="http://3.bp.blogspot.com/_lU9sJzT5R6I/S4T3kfNfqmI/AAAAAAAAAZM/2vrfloOcXHQ/s320/IE8-001.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none; text-align: center;"&gt;IE8, after adding meta tag to behave like IE8&lt;br /&gt;&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;The following selectors and attributes are not supported also in IE: &lt;span style="color: red;"&gt;&lt;strong&gt;and there are still more!!!&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;span style="color: #990000; font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif; font-size: x-small;"&gt;:root { sRules }&lt;/span&gt;&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;span style="color: #990000; font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif; font-size: x-small;"&gt;:nth-child() { sRules }&lt;/span&gt;&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;span style="color: #990000; font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif; font-size: x-small;"&gt;:nth-last-child() { sRules }&lt;/span&gt;&lt;/div&gt;&lt;span style="color: #990000; font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif; font-size: x-small;"&gt;:nth-of-type() { sRules }&lt;/span&gt;&lt;br /&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;span style="color: #990000; font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif; font-size: x-small;"&gt;:nth-last-of-type() { sRules }&lt;/span&gt;&lt;/div&gt;&lt;span style="color: #990000; font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif; font-size: x-small;"&gt;:last-child { sRules }&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #990000; font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif; font-size: x-small;"&gt;:first-of-type { sRules }&lt;/span&gt;&lt;br /&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;span style="color: #990000; font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif; font-size: x-small;"&gt;:last-of-type { sRules }&lt;/span&gt;&lt;/div&gt;&lt;span style="color: #990000; font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif; font-size: x-small;"&gt;:only-child { sRules }&lt;/span&gt;&lt;br /&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;span style="color: #990000; font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif; font-size: x-small;"&gt;:only-of-type { sRules }&lt;/span&gt;&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;span style="color: #990000; font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif; font-size: x-small;"&gt;:empty { sRules }&lt;/span&gt;&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;span style="color: #990000; font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif; font-size: x-small;"&gt;:target { sRules }&lt;/span&gt;&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;span style="color: #990000; font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif; font-size: x-small;"&gt;:not(X) { sRules }&lt;/span&gt;&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;span style="color: #990000; font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif; font-size: x-small;"&gt;:enabled { sRules }&lt;/span&gt;&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;span style="color: #990000; font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif; font-size: x-small;"&gt;:disabled { sRules }&lt;/span&gt;&lt;/div&gt;&lt;span style="color: #990000; font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif; font-size: x-small;"&gt;:checked { sRules }&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #990000; font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif; font-size: x-small;"&gt;:indeterminate { sRules }&lt;/span&gt;&lt;br /&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;span style="color: #990000; font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif; font-size: x-small;"&gt;:default { sRules }&lt;/span&gt;&lt;/div&gt;&lt;span style="color: #990000; font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif; font-size: x-small;"&gt;:valid { sRules }&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #990000; font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif; font-size: x-small;"&gt;:invalid { sRules }&lt;/span&gt;&lt;br /&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;span style="color: #990000; font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif; font-size: x-small;"&gt;:in-range { sRules }&lt;/span&gt;&lt;/div&gt;&lt;span style="color: #990000; font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif; font-size: x-small;"&gt;:out-of-range { sRules }&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #990000; font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif; font-size: x-small;"&gt;:required { sRules }&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #990000; font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif; font-size: x-small;"&gt;:optional { sRules }&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #990000; font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif; font-size: x-small;"&gt;:read-only { sRules }&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #990000; font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif; font-size: x-small;"&gt;:read-write { sRules }&lt;/span&gt;&lt;br /&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;span style="font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif;"&gt;&lt;br /&gt;&lt;span style="color: #990000; font-size: x-small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="color: #990000; font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif; font-size: x-small;"&gt;::before { sRules }&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #990000; font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif; font-size: x-small;"&gt;::after { sRules }&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #990000; font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif; font-size: x-small;"&gt;::first-letter { sRules }&lt;/span&gt;&lt;br /&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;span style="color: #990000; font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif; font-size: x-small;"&gt;::first-line { sRules }&lt;/span&gt;&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;span style="color: #990000; font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif; font-size: x-small;"&gt;::selection { sRules }&lt;/span&gt;&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;span style="color: #990000; font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif; font-size: x-small;"&gt;::value { sRules }&lt;/span&gt;&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;span style="color: #990000; font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif; font-size: x-small;"&gt;::choices { sRules }&lt;/span&gt;&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;span style="color: #990000; font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif; font-size: x-small;"&gt;::repeat-item { sRules }&lt;/span&gt;&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;span style="color: #990000; font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif; font-size: x-small;"&gt;::repeat-index { sRules }&lt;/span&gt;&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;span style="font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif;"&gt;&lt;br /&gt;&lt;span style="color: #990000; font-size: x-small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;span style="color: #990000; font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif; font-size: x-small;"&gt;{ color-profile : sProfile }&lt;/span&gt;&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;span style="color: #990000; font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif; font-size: x-small;"&gt;{ rendering-intent : sIntent }&lt;/span&gt;&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;span style="color: #990000; font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif; font-size: x-small;"&gt;{ background : sBackground1,sBackground2, etc. }&lt;/span&gt;&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;span style="color: #990000; font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif; font-size: x-small;"&gt;{ background-clip : sClip }&lt;/span&gt;&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;span style="color: #990000; font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif; font-size: x-small;"&gt;{ background-origin : sOrigin }&lt;/span&gt;&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;span style="color: #990000; font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif; font-size: x-small;"&gt;{ background-break : sBreak }&lt;/span&gt;&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;span style="color: #990000; font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif; font-size: x-small;"&gt;{ background-size : sSize }&lt;/span&gt;&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;span style="font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif;"&gt;&lt;br /&gt;&lt;span style="color: #990000; font-size: x-small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;span style="color: #990000; font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif; font-size: x-small;"&gt;{ font-effect : sEffect }&lt;/span&gt;&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;span style="color: #990000; font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif; font-size: x-small;"&gt;{ font-emphasize : sEmphasize }&lt;/span&gt;&lt;/div&gt;&lt;span style="color: #990000; font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif; font-size: x-small;"&gt;{ font-size-adjust : sSizeAdjust }&lt;/span&gt;&lt;br /&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;span style="color: #990000; font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif; font-size: x-small;"&gt;{ font-smooth : sSmooth }&lt;/span&gt;&lt;/div&gt;&lt;span style="color: #990000; font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif; font-size: x-small;"&gt;{ font-stretch : sStretch }&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #990000; font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif; font-size: x-small;"&gt;{ hanging-punctuation : sHangingPunctuation }&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #990000; font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif; font-size: x-small;"&gt;{ punctuation-trim : sTrim }&lt;/span&gt;&lt;br /&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;span style="font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif;"&gt;&lt;br /&gt;&lt;span style="color: #990000; font-size: x-small;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="color: #990000; font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif; font-size: x-small;"&gt;{ border-break : sBreak }&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #990000; font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif; font-size: x-small;"&gt;{ border-image : sImage }&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #990000; font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif; font-size: x-small;"&gt;{ border-radius : sRadius }&lt;/span&gt;&lt;br /&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;span style="color: #990000; font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif; font-size: x-small;"&gt;{ box-shadow : sShadow }&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4421999031233037653-432379250373577512?l=yourprosoft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yourprosoft.blogspot.com/feeds/432379250373577512/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yourprosoft.blogspot.com/2010/02/ie8-compatibility.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4421999031233037653/posts/default/432379250373577512'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4421999031233037653/posts/default/432379250373577512'/><link rel='alternate' type='text/html' href='http://yourprosoft.blogspot.com/2010/02/ie8-compatibility.html' title='IE8 compatibility'/><author><name>Wael AlGhool</name><uri>http://www.blogger.com/profile/12348835436349517930</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_lU9sJzT5R6I/R-8xT4OO1YI/AAAAAAAAADE/xIxN20Hls3I/S220/29032008456_small.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_lU9sJzT5R6I/S4ToFeaUqqI/AAAAAAAAAY8/i8qA8ak14Ek/s72-c/box.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4421999031233037653.post-4954039052487803133</id><published>2010-02-12T23:11:00.000-08:00</published><updated>2010-02-12T23:28:29.321-08:00</updated><title type='text'>DIVs-tree size-measure and offset-calculation recurcive-algorithm, O(n)</title><content type='html'>&lt;strong&gt;&lt;span style="color: red;"&gt;&amp;lt;div&amp;gt; Tree size-measure and offset-calculation recurcive-algorithm, O(n) complexity&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #0c343d;"&gt;I have a tree of &amp;lt;div&amp;gt;s and want a rendering&amp;nbsp;algorithm to calculate total size and detailed offests, so, each &amp;lt;div&amp;gt; will&amp;nbsp;implement the following recursive algorithm.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;&amp;lt;div style="block"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;div style="block"&amp;gt;&lt;span style="color: red;"&gt;&amp;lt;div style="inline"&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div style="inline"&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div style="inline"&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;div style="block"&amp;gt;&lt;span style="color: red;"&gt;&amp;lt;div style="inline"&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div style="inline"&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div style="inline"&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp; &amp;lt;div style="block"&amp;gt;&lt;span style="background-color: white; color: red;"&gt;&amp;lt;div style="inline"&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div style="inline"&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div style="inline"&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_lU9sJzT5R6I/S3ZSMlWxqII/AAAAAAAAAYs/tCjDlOZe4Fw/s1600-h/divs.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" ct="true" src="http://4.bp.blogspot.com/_lU9sJzT5R6I/S3ZSMlWxqII/AAAAAAAAAYs/tCjDlOZe4Fw/s320/divs.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;strong&gt;Measure Algorithm:&lt;/strong&gt; &lt;br /&gt;&lt;span style="color: #990000;"&gt;. I'm &amp;lt;div&amp;gt; object, that is the single input to the algorithm&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #990000;"&gt;. I have mySize of (X,Y) and myOffset of (x,y)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #990000;"&gt;. Initilaize a runningOffset to equal myOffset&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #990000;"&gt;. Initialize runningInnerSize with (0,0)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;&lt;strong&gt;. Loop through my children:&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; . If child flow is INLINE, then, set child offset to runningOffset &lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; . If child flow is BLOCK, then, set child offset as follows:&lt;/span&gt; &lt;br /&gt;&lt;span style="color: #b45f06;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; . childOffset.x = myOffset.x &lt;/span&gt;&lt;br /&gt;&lt;span style="color: #b45f06;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; . childOffset.y = myOffset.y +&amp;nbsp;runningInnserSize.height&lt;/span&gt; &lt;br /&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; . Calculate childSize&amp;nbsp;by recursive call to Measure Algorithm&lt;/span&gt; &lt;br /&gt;&lt;span style="color: #b45f06;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; . childSize = Measure Algorithm&lt;/span&gt; &lt;br /&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; . If child flow is INLINE:&lt;/span&gt; &lt;br /&gt;&lt;span style="color: #b45f06;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; . Increment runningInnerSize.width by childSize.width &lt;/span&gt;&lt;br /&gt;&lt;span style="color: #b45f06;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;Keep runningInnerSize.height unchanged if it is longer than childSize.height&lt;/span&gt; &lt;br /&gt;&lt;span style="color: #bf9000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;else&amp;nbsp;&amp;nbsp;runningInnerSize.height=childSize.height&lt;/span&gt; &lt;br /&gt;&lt;span style="color: #b45f06;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; . Prepare runningOffset for next sibling "next child"&lt;/span&gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;. runningOffset.x&amp;nbsp;increment by childSize.width &lt;br /&gt;&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;. If child flow is BLOCK:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #b45f06;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; . Increment runningInnerSize.height by childSize.height&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #b45f06;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #b45f06;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;Keep runningInnerSize.width unchanged if it is longer than childSize.width&lt;/span&gt; &lt;br /&gt;&lt;span style="color: #bf9000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; . else runningInnerSize.width = childSize.width&lt;/span&gt; &lt;br /&gt;&lt;span style="color: #b45f06;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; . Prepare runningOffset for next sibling "next child"&lt;/span&gt; &lt;br /&gt;&lt;span style="color: #bf9000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; . runningOffset.x increment by childSize.width&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #990000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; . Change my size to srround runningInnerSize&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; . Keep track of runningInnerSize for latter use&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #990000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; . Return my size to the caller&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;. End of Algorithm&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4421999031233037653-4954039052487803133?l=yourprosoft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yourprosoft.blogspot.com/feeds/4954039052487803133/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yourprosoft.blogspot.com/2010/02/divs-tree-size-measure-and-offset.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4421999031233037653/posts/default/4954039052487803133'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4421999031233037653/posts/default/4954039052487803133'/><link rel='alternate' type='text/html' href='http://yourprosoft.blogspot.com/2010/02/divs-tree-size-measure-and-offset.html' title='DIVs-tree size-measure and offset-calculation recurcive-algorithm, O(n)'/><author><name>Wael AlGhool</name><uri>http://www.blogger.com/profile/12348835436349517930</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_lU9sJzT5R6I/R-8xT4OO1YI/AAAAAAAAADE/xIxN20Hls3I/S220/29032008456_small.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_lU9sJzT5R6I/S3ZSMlWxqII/AAAAAAAAAYs/tCjDlOZe4Fw/s72-c/divs.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4421999031233037653.post-5900622139869995737</id><published>2010-02-10T22:21:00.000-08:00</published><updated>2010-02-10T22:37:40.271-08:00</updated><title type='text'>Lambada as Predicate method, c#3.5</title><content type='html'>&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; List&amp;lt;string&amp;gt;&lt;string&gt; ZoneList = new List&lt;string&gt;();&lt;/span&gt;&lt;br /&gt;.&lt;br /&gt;.&lt;br /&gt;.&lt;br /&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (int i = 0; i&amp;nbsp;&amp;gt; 10; i++)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ZoneList.Add(i.ToString());&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: Courier New;"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: Courier New;"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: Courier New;"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (ZoneList.Exists(listItem =&amp;gt; listItem != notExistedWord))&lt;/span&gt; &lt;br /&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ZoneList.Add(notExistedWord);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #38761d; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: x-small;"&gt;&lt;span style="color: blue; font-size: small;"&gt;}&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: &amp;quot;Trebuchet MS&amp;quot;, sans-serif;"&gt;ZoneList.Exists(Predicate&amp;lt;string&amp;gt;&lt;string&gt;&lt;string&gt; match) is a List method that needs predicate-method as&amp;nbsp;input paramter, the Predicate-method must has a string input paramter and Boolean output parameter, the string input paramter will be used to carry one by one item of the List items for being proccessed inside predicate-method, alternativly, we can use lambada expression &lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;listItem =&amp;gt; listItem==searchedWord&lt;/span&gt;, where left side of =&amp;gt; is concidered input for the right side, this expression can be assigned to delegate just like that:&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;delegate Boolean SearchDelegate(string listItem);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;"&gt;SearchDelegate exists = listItem&amp;nbsp;=&amp;gt; listItem==searchedWord&lt;/span&gt; &lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: &amp;quot;Trebuchet MS&amp;quot;, sans-serif;"&gt;searchedWord is a variable that must be explicitly defined before lambada is defined, searchedWord will be stored for use even if it goes out of scope, this is&amp;nbsp;one rule of many lambada-variable-scope rules.&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4421999031233037653-5900622139869995737?l=yourprosoft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yourprosoft.blogspot.com/feeds/5900622139869995737/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yourprosoft.blogspot.com/2010/02/lambada-as-predicate-method-c35.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4421999031233037653/posts/default/5900622139869995737'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4421999031233037653/posts/default/5900622139869995737'/><link rel='alternate' type='text/html' href='http://yourprosoft.blogspot.com/2010/02/lambada-as-predicate-method-c35.html' title='Lambada as Predicate method, c#3.5'/><author><name>Wael AlGhool</name><uri>http://www.blogger.com/profile/12348835436349517930</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_lU9sJzT5R6I/R-8xT4OO1YI/AAAAAAAAADE/xIxN20Hls3I/S220/29032008456_small.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4421999031233037653.post-7354660020295156756</id><published>2010-01-29T06:32:00.000-08:00</published><updated>2010-01-30T05:35:49.147-08:00</updated><title type='text'>gdiplus.lib is inside Windows SDK</title><content type='html'>&lt;div&gt;&lt;span style="font-family:courier new;"&gt;I'm developing my C++ applications on VS2008 and Vista OS, and need to add &lt;em&gt;&lt;span style="color:#000099;"&gt;gdiplus.lib&lt;/span&gt;&lt;/em&gt; on my &lt;span style="font-size:85%;"&gt;Project/Properties/Linker/General/Application&amp;amp;Liberary&amp;amp;Directoris&lt;/span&gt;.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="color:#000099;"&gt;1- First read those links (&lt;em&gt;&lt;span style="font-size:85%;"&gt;if you prefer)&lt;/span&gt;&lt;/em&gt;:&lt;br /&gt;&lt;/span&gt;&lt;a href="http://blogs.msdn.com/windowssdk/archive/2006/11/08/windows-sdk-for-windows-vista-is-live.aspx"&gt;&lt;span style="font-size:85%;"&gt;Microsoft Windows SDK Blog&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;a href="http://msdn.microsoft.com/en-us/windowsserver/bb980924.aspx"&gt;&lt;span style="font-size:85%;"&gt;Windows SDK&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;a href="http://msdn.microsoft.com/en-us/windowsserver/dd146047.aspx"&gt;&lt;span style="font-size:85%;"&gt;Which SDK is Right for Me?&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Courier New;"&gt;&lt;a href="http://www.ucancode.net/Visual_C_MFC_Example/gdiplus-mfc-vc-sample-gdiplusstartup-gdiplusshutdown-draw-code.htm"&gt;&lt;span style="font-size:85%;"&gt;Using GDI+ with MFC or native C/VC++&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#000099;"&gt;2- Download and install ISO image of:&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="font-size:85%;"&gt;Windows SDK for Windows Server 2008 and .NET Framework 3.5&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;It provides the documentation, samples, header files, libraries, and tools (including C++ compilers) that you need to develop applications to run on Windows Server 2008 and the .NET Framework 3.5. This SDK is compatible with Visual Studio® 2008, including Visual Studio Express Editions, which are available free of charge.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="color:#ff0000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#000099;"&gt;3- Download and installing exe file of:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;color:#ff0000;"&gt;Microsoft Visual Studio 2008 Service Pack 1 Update (KB974479)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;There is a known incompatibility between the Microsoft Windows Software Development Kit for Windows Server 2008 and .NET Framework 3.5, and Microsoft Visual Studio 2008 Service Pack 1 which is manifested when the ATL Security Update (KB971092) is installed. This update addresses the issue. After you install this update, you may have to restart your computer.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Use Virtual-CD to open ISO&lt;a href="http://3.bp.blogspot.com/_lU9sJzT5R6I/S2L8DqpQx2I/AAAAAAAAAWw/BM0g2M9vxqI/s1600-h/vCD.jpg"&gt;&lt;img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 400px; DISPLAY: block; HEIGHT: 233px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5432181240479401826" border="0" alt="" src="http://3.bp.blogspot.com/_lU9sJzT5R6I/S2L8DqpQx2I/AAAAAAAAAWw/BM0g2M9vxqI/s400/vCD.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Allow autorun to start installing SDK&lt;a href="http://1.bp.blogspot.com/_lU9sJzT5R6I/S2L8DIaEezI/AAAAAAAAAWo/62Pk9pNpqsE/s1600-h/SDK.jpg"&gt;&lt;img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 400px; DISPLAY: block; HEIGHT: 281px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5432181231288875826" border="0" alt="" src="http://1.bp.blogspot.com/_lU9sJzT5R6I/S2L8DIaEezI/AAAAAAAAAWo/62Pk9pNpqsE/s400/SDK.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;When installation is finished, then restart and then install KB974479 &lt;a href="http://3.bp.blogspot.com/_lU9sJzT5R6I/S2MFdDel_OI/AAAAAAAAAW4/FCs6H2b7pVE/s1600-h/SDkWizard.jpg"&gt;&lt;img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 400px; DISPLAY: block; HEIGHT: 281px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5432191572246920418" border="0" alt="" src="http://3.bp.blogspot.com/_lU9sJzT5R6I/S2MFdDel_OI/AAAAAAAAAW4/FCs6H2b7pVE/s400/SDkWizard.jpg" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Right click project name and select Properties&lt;a href="http://1.bp.blogspot.com/_lU9sJzT5R6I/S2QvbFhyM3I/AAAAAAAAAXo/6ZvfnmChe4o/s1600-h/006.jpg"&gt;&lt;img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 400px; DISPLAY: block; HEIGHT: 267px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5432519192902513522" border="0" alt="" src="http://1.bp.blogspot.com/_lU9sJzT5R6I/S2QvbFhyM3I/AAAAAAAAAXo/6ZvfnmChe4o/s400/006.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Add libarary directory to General/Additional Library Directories&lt;a href="http://1.bp.blogspot.com/_lU9sJzT5R6I/S2QvPBtqhFI/AAAAAAAAAXY/qF3eN4m2yDk/s1600-h/004.jpg"&gt;&lt;img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 400px; DISPLAY: block; HEIGHT: 182px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5432518985720169554" border="0" alt="" src="http://1.bp.blogspot.com/_lU9sJzT5R6I/S2QvPBtqhFI/AAAAAAAAAXY/qF3eN4m2yDk/s400/004.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Add Gdiplus.lib to input/Aditional Dependencies, you may instead use "#pragma comment(lib,"gdiplus.lib")"&lt;a href="http://4.bp.blogspot.com/_lU9sJzT5R6I/S2QvOmzrK1I/AAAAAAAAAXQ/JSUQ3BGw2tQ/s1600-h/003.jpg"&gt;&lt;img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 400px; DISPLAY: block; HEIGHT: 182px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5432518978497620818" border="0" alt="" src="http://4.bp.blogspot.com/_lU9sJzT5R6I/S2QvOmzrK1I/AAAAAAAAAXQ/JSUQ3BGw2tQ/s400/003.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Adjust your stdafx.h by adding appropriate header, namespace and pragma "if pragma is needed"&lt;a href="http://3.bp.blogspot.com/_lU9sJzT5R6I/S2Qvazslu0I/AAAAAAAAAXg/FQQwYBmKjK8/s1600-h/005.jpg"&gt;&lt;img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 340px; DISPLAY: block; HEIGHT: 354px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5432519188115995458" border="0" alt="" src="http://3.bp.blogspot.com/_lU9sJzT5R6I/S2Qvazslu0I/AAAAAAAAAXg/FQQwYBmKjK8/s400/005.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;declare tokken member in CWinAppEx drived class&lt;a href="http://4.bp.blogspot.com/_lU9sJzT5R6I/S2QvOdIU0aI/AAAAAAAAAXI/z2U5ULMb4rI/s1600-h/002.jpg"&gt;&lt;img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 400px; DISPLAY: block; HEIGHT: 259px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5432518975899881890" border="0" alt="" src="http://4.bp.blogspot.com/_lU9sJzT5R6I/S2QvOdIU0aI/AAAAAAAAAXI/z2U5ULMb4rI/s400/002.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Initialize GDI+ inside CwinAppEx::InitInstance&lt;a href="http://3.bp.blogspot.com/_lU9sJzT5R6I/S2QvOHrcVvI/AAAAAAAAAXA/-W524GE94r0/s1600-h/001.jpg"&gt;&lt;img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 400px; DISPLAY: block; HEIGHT: 171px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5432518970141595378" border="0" alt="" src="http://3.bp.blogspot.com/_lU9sJzT5R6I/S2QvOHrcVvI/AAAAAAAAAXA/-W524GE94r0/s400/001.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Finalize GDI+ at the end of your application CWinAppEx::ExitInstance&lt;a href="http://4.bp.blogspot.com/_lU9sJzT5R6I/S2QzE-zuOGI/AAAAAAAAAXw/FRi8uaJwFq8/s1600-h/000.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 215px;" src="http://4.bp.blogspot.com/_lU9sJzT5R6I/S2QzE-zuOGI/AAAAAAAAAXw/FRi8uaJwFq8/s400/000.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5432523211188090978" /&gt;&lt;/a&gt;&lt;br /&gt;Start using GDI+ functionality to render your document&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_lU9sJzT5R6I/S2Q1X2kx3wI/AAAAAAAAAX4/y9_SZj5q8Vc/s1600-h/007.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 239px;" src="http://3.bp.blogspot.com/_lU9sJzT5R6I/S2Q1X2kx3wI/AAAAAAAAAX4/y9_SZj5q8Vc/s400/007.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5432525734418702082" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4421999031233037653-7354660020295156756?l=yourprosoft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yourprosoft.blogspot.com/feeds/7354660020295156756/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yourprosoft.blogspot.com/2010/01/gdipluslib-is-inside-windows-sdk.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4421999031233037653/posts/default/7354660020295156756'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4421999031233037653/posts/default/7354660020295156756'/><link rel='alternate' type='text/html' href='http://yourprosoft.blogspot.com/2010/01/gdipluslib-is-inside-windows-sdk.html' title='gdiplus.lib is inside Windows SDK'/><author><name>Wael AlGhool</name><uri>http://www.blogger.com/profile/12348835436349517930</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_lU9sJzT5R6I/R-8xT4OO1YI/AAAAAAAAADE/xIxN20Hls3I/S220/29032008456_small.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_lU9sJzT5R6I/S2L8DqpQx2I/AAAAAAAAAWw/BM0g2M9vxqI/s72-c/vCD.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4421999031233037653.post-3820619645597629123</id><published>2010-01-27T22:18:00.000-08:00</published><updated>2010-01-30T06:00:21.960-08:00</updated><title type='text'>GDI+ overview</title><content type='html'>&lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ms533798(VS.85).aspx"&gt;GDI+&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=6A63AB9C-DF12-4D41-933C-BE590FEAA05A"&gt;Download details: Platform SDK Redistributable: GDI+&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;Purpose. Microsoft Windows GDI+ is a class-based API for C/C++ programmers. It enables applications to use graphics and formatted text on both the video display and the printer.&lt;br /&gt;&lt;p&gt;Three parts of GDI+:&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:lucida grande;"&gt;&lt;span style="color:#990000;"&gt;1- 2-D vector graphics&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:lucida grande;"&gt;&lt;span style="color:#990000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:lucida grande;"&gt;&lt;span style="color:#990000;"&gt;2- Imaging&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:lucida grande;"&gt;&lt;span style="color:#990000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:lucida grande;"&gt;&lt;span style="color:#990000;"&gt;3- Typography&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:lucida grande;"&gt;&lt;span style="color:#990000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;The Structure of the Class-Based Interface:&lt;span style="font-family:lucida grande;"&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="color:#990000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:lucida grande;"&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="color:#990000;"&gt;&lt;span style="font-size:100%;"&gt;The C++ interface to Microsoft Windows GDI+ contains about 40 classes, 50 enumerations, and 6 structures. There are also a few functions that are not members of any class. The Graphics class is the core of the GDI+ interface; it is the class that actually draws lines, curves, figures, images, and text.&lt;br /&gt;&lt;br /&gt;Many classes work together with the Graphics class. For example, the Graphics::DrawLine method receives a pointer to a Pen object, which holds attributes (color, width, dash style, and the like) of the line to be drawn. The Graphics::FillRectangle method can receive a pointer to a LinearGradientBrush object, which works with the Graphics object to fill a rectangle with a gradually changing color. Font and StringFormat objects influence the way a Graphics object draws text. A Matrix object stores and manipulates the world transformation of a Graphics object, which is used to rotate, scale, and flip images.&lt;br /&gt;&lt;br /&gt;Certain classes serve primarily as structured data types. Some of those classes (for example, Rect, Point, and Size) are for general purposes. Others are for specialized purposes and are considered helper classes. For example, the BitmapData class is a helper for the Bitmap class, and the PathData class is a helper for the GraphicsPath class. GDI+ also defines a few structures that are used for organizing data. For example, the ColorMap structure holds a pair of Color objects that form one entry in a color conversion table.&lt;br /&gt;&lt;br /&gt;GDI+ defines several enumerations, which are collections of related constants. For example, the LineJoin enumeration contains the elements LineJoinBevel, LineJoinMiter, and LineJoinRound, which specify styles that can be used to join two lines.&lt;br /&gt;&lt;br /&gt;GDI+ provides a few functions that are not part of any class. Two of those functions are GdiplusStartup and GdiplusShutdown. You must call GdiplusStartup before you make any other GDI+ calls, and you must call GdiplusShutdown when you have finished using GDI+.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:lucida grande;"&gt;&lt;span style="color:#990000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;New Features:&lt;span style="font-family:lucida grande;"&gt;&lt;span style="color:#990000;"&gt; &lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:lucida grande;"&gt;&lt;strong&gt;&lt;span style="color:#3333ff;"&gt;Gradient Brushes&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;span style="font-family:lucida grande;"&gt;&lt;span style="color:#990000;"&gt;&lt;br /&gt;GDI+ expands on Windows Graphics Device Interface (GDI) by providing linear gradient and path gradient brushes for filling shapes, paths, and regions. Gradient brushes can also be used to draw lines, curves, and paths. When you fill a shape with a linear gradient brush, the color gradually changes as you move across the shape. For example, suppose you create a horizontal gradient brush by specifying blue at the left edge of a shape and green at the right edge. When you fill that shape with the horizontal gradient brush, it will gradually change from blue to green as you move from its left edge to its right edge. Similarly, a shape filled with a vertical gradient brush will change color as you move from top to bottom. The following illustration shows an ellipse filled with a horizontal gradient brush and a region filled with a diagonal gradient brush.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_lU9sJzT5R6I/S2E4SH5lh9I/AAAAAAAAAWA/SQPt-E346CQ/s1600-h/GDI%2B00.png"&gt;&lt;img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 350px; DISPLAY: block; HEIGHT: 138px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5431684509594912722" border="0" alt="" src="http://1.bp.blogspot.com/_lU9sJzT5R6I/S2E4SH5lh9I/AAAAAAAAAWA/SQPt-E346CQ/s400/GDI%2B00.png" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;When you fill a shape with a path gradient brush, you have a variety of options for specifying how the colors change as you move from one portion of the shape to another. One option is to have a center color and a boundary color so that the pixels change gradually from one color to the other as you move from the middle of the shape towards the outer edges. The following illustration shows a path (created from a pair of Bézier splines) filled with a path gradient brush.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_lU9sJzT5R6I/S2E4SfFSuYI/AAAAAAAAAWI/qZmKpvzjAfA/s1600-h/GDI%2B01.png"&gt;&lt;img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 251px; DISPLAY: block; HEIGHT: 137px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5431684515818027394" border="0" alt="" src="http://3.bp.blogspot.com/_lU9sJzT5R6I/S2E4SfFSuYI/AAAAAAAAAWI/qZmKpvzjAfA/s400/GDI%2B01.png" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:lucida grande;"&gt;&lt;strong&gt;&lt;span style="color:#3333ff;"&gt;Cardinal Splines&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;span style="font-family:lucida grande;"&gt;&lt;span style="color:#990000;"&gt;&lt;br /&gt;GDI+ supports cardinal splines, which are not supported in GDI. A cardinal spline is a sequence of individual curves joined to form a larger curve. The spline is specified by an array of points and passes through each point in that array. A cardinal spline passes smoothly (no sharp corners) through each point in the array and thus is more refined than a path created by connecting straight lines. The following illustration shows two paths, one created by connecting straight lines and one created as a cardinal spline.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_lU9sJzT5R6I/S2E4SmeS3CI/AAAAAAAAAWQ/IzKuzKRGT1s/s1600-h/GDI%2B02.png"&gt;&lt;img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 311px; DISPLAY: block; HEIGHT: 171px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5431684517801942050" border="0" alt="" src="http://4.bp.blogspot.com/_lU9sJzT5R6I/S2E4SmeS3CI/AAAAAAAAAWQ/IzKuzKRGT1s/s400/GDI%2B02.png" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:lucida grande;"&gt;&lt;strong&gt;&lt;span style="color:#3333ff;"&gt;Independent Path Objects&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;span style="font-family:lucida grande;"&gt;&lt;span style="color:#990000;"&gt;&lt;br /&gt;In GDI, a path belongs to a device context, and the path is destroyed as it is drawn. With GDI+, drawing is performed by a Graphics object, and you can create and maintain several GraphicsPath objects that are separate from the Graphics object. A GraphicsPath object is not destroyed by the drawing action, so you can use the same GraphicsPath object to draw a path several times.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:lucida grande;"&gt;&lt;span style="color:#990000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:lucida grande;"&gt;&lt;span style="color:#3333ff;"&gt;&lt;strong&gt;Transformations and the Matrix Object&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:lucida grande;"&gt;&lt;span style="color:#990000;"&gt;&lt;br /&gt;GDI+ provides the Matrix object, a powerful tool that makes transformations (rotations, translations, and so on) easy and flexible. A matrix object works in conjunction with the objects that are transformed. For example, a GraphicsPath object has a Transform method that receives the address of a Matrix object as an argument. A single 3×3 matrix can store one transformation or a sequence of transformations. The following illustration shows a path before and after a sequence of two transformations (first scale, then rotate).&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_lU9sJzT5R6I/S2E4S2Y_G3I/AAAAAAAAAWY/yngJ0yT0Vow/s1600-h/GDI%2B03.png"&gt;&lt;img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 251px; DISPLAY: block; HEIGHT: 231px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5431684522074643314" border="0" alt="" src="http://2.bp.blogspot.com/_lU9sJzT5R6I/S2E4S2Y_G3I/AAAAAAAAAWY/yngJ0yT0Vow/s400/GDI%2B03.png" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;&lt;strong&gt;&lt;span style="font-family:lucida grande;"&gt;&lt;br /&gt;Scalable Regions&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="font-family:lucida grande;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-family:lucida grande;"&gt;&lt;span style="color:#990000;"&gt;GDI+ expands greatly on GDI with its support for regions. In GDI, regions are stored in device coordinates, and the only transformation that can be applied to a region is a translation. GDI+ stores regions in world coordinates and allows a region to undergo any transformation (scaling, for example) that can be stored in a transformation matrix. The following illustration shows a region before and after a sequence of three transformations: scale, rotate, and translate.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:lucida grande;"&gt;&lt;span style="color:#3333ff;"&gt;&lt;strong&gt;Alpha Blending&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:lucida grande;"&gt;&lt;span style="color:#990000;"&gt;&lt;br /&gt;Note that in the previous figure, you can see the untransformed region (filled with red) through the transformed region (filled with a hatch brush). This is made possible by alpha blending, which is supported by GDI+. With alpha blending, you can specify the transparency of a fill color. A transparent color is blended with the background color — the more transparent you make a fill color, the more the background shows through. The following illustration shows four ellipses that are filled with the same color (red) at different transparency levels.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_lU9sJzT5R6I/S2E4TF2F1PI/AAAAAAAAAWg/g8iXPPgW9zA/s1600-h/GDI%2B04.png"&gt;&lt;img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 226px; DISPLAY: block; HEIGHT: 151px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5431684526223250674" border="0" alt="" src="http://1.bp.blogspot.com/_lU9sJzT5R6I/S2E4TF2F1PI/AAAAAAAAAWg/g8iXPPgW9zA/s400/GDI%2B04.png" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:lucida grande;"&gt;&lt;strong&gt;&lt;span style="color:#3333ff;"&gt;Support for Multiple Image Formats&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;span style="font-family:lucida grande;"&gt;&lt;span style="color:#990000;"&gt;&lt;br /&gt;GDI+ provides the Image, Bitmap, and Metafile classes, which allow you to load, save and manipulate images in a variety of formats. The following formats are supported: &lt;br /&gt;BMP&lt;br /&gt;Graphics Interchange Format (GIF)&lt;br /&gt;JPEG&lt;br /&gt;Exif&lt;br /&gt;PNG&lt;br /&gt;TIFF&lt;br /&gt;ICON&lt;br /&gt;WMF&lt;br /&gt;EMF&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:lucida grande;"&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="color:#990000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4421999031233037653-3820619645597629123?l=yourprosoft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yourprosoft.blogspot.com/feeds/3820619645597629123/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yourprosoft.blogspot.com/2010/01/gdi.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4421999031233037653/posts/default/3820619645597629123'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4421999031233037653/posts/default/3820619645597629123'/><link rel='alternate' type='text/html' href='http://yourprosoft.blogspot.com/2010/01/gdi.html' title='GDI+ overview'/><author><name>Wael AlGhool</name><uri>http://www.blogger.com/profile/12348835436349517930</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_lU9sJzT5R6I/R-8xT4OO1YI/AAAAAAAAADE/xIxN20Hls3I/S220/29032008456_small.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_lU9sJzT5R6I/S2E4SH5lh9I/AAAAAAAAAWA/SQPt-E346CQ/s72-c/GDI%2B00.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4421999031233037653.post-4422304451556281799</id><published>2010-01-27T21:22:00.000-08:00</published><updated>2010-01-27T21:59:33.290-08:00</updated><title type='text'>GDI Mapping Modes Explaind</title><content type='html'>&lt;div&gt;&lt;br /&gt;GDI Mapping Modes Explained&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;&lt;span style="font-size:78%;"&gt;Date: 8 May 1997&lt;br /&gt;Author: Rich Goldstein, MD  (goldstei@interport.net)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-size:85%;"&gt;NOTE: Also, take a look &lt;a href="http://www.bobpowell.net/mappingmodes.htm"&gt;this article&lt;/a&gt; (http://www.bobpowell.net/mappingmodes.htm)&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;strong&gt;&lt;span style="color:#660000;"&gt;Overview&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;span style="font-size:85%;"&gt;Each device context (DC, represented by TDC and derivatives in OWL) has the ability to maintain a coordinate system separate and distinct from the device it represents. So while the display may be a 640x480 or 800x600 or whatever pixels in dimension, we can tell the DC that the coordinate space uses some other units.&lt;br /&gt;&lt;br /&gt;The result is the existence of 2 coordinate systems: the DEVICE coordinate system, and the LOGICAL coordinate system.&lt;br /&gt;&lt;br /&gt;In general, DEVICE coordinates are established by the device or it's related drivers. So for the monitor, the display driver determines the DEVICE coordinates (0,0 in the top left, width,height in pixels in the lower right). These are rarely if ever changed programmatically (the exceptions, of course, include changing screen or printer resolution, or paper orientation, etc.).&lt;br /&gt;&lt;br /&gt;The LOGICAL coordinates relate to the device context (DC) and are established by the mapping mode, viewport origin and extents, and window origin and extents. All DC related functions accept LOGICAL coordinates, unless explicitly stated (e.g. DPtoLP, which converts DEVICE coordinates to LOGICAL coordinates).&lt;br /&gt;&lt;br /&gt;The system maps your LOGICAL coordinates to the DEVICE coordinates using the viewport/window origins and extents.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;So WHAT ARE THEY, ALREADY???&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Origins&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;span style="font-size:85%;"&gt;OK, let's start with the window, which is expressed in LOGICAL coordinates.&lt;br /&gt;&lt;br /&gt;SetWindowOrg() tells the DC the LOGICAL point that maps to the DEVICE point (0,0). So if you call SetWindowOrg(100,100) for a window, the LOGICAL point (100,100) occurs in the top left corner. (Hold on, this was the easy one...)&lt;br /&gt;&lt;br /&gt;SetViewportOrg() tells the DC which DEVICE coordinate maps to LOGICAL point (0,0). So calling SetViewportOrg() with half the width and height of your window (in pixels), for example, sets the LOGICAL point (0,0) to the center of the window.&lt;br /&gt;&lt;br /&gt;SetWindowOrg() and SetViewportOrg() can be called on any Mapping Mode. They serve to offset the origin of one system within the other. They have no effect on the relative distances specified by the two coordinate systems.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_lU9sJzT5R6I/S2EjOc1u8EI/AAAAAAAAAV4/wAg_xeiPHGY/s1600-h/mappin2.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 300px;" src="http://3.bp.blogspot.com/_lU9sJzT5R6I/S2EjOc1u8EI/AAAAAAAAAV4/wAg_xeiPHGY/s400/mappin2.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5431661356752236610" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_lU9sJzT5R6I/S2EjOPmfg2I/AAAAAAAAAVw/dfzA3PuOC6A/s1600-h/mappin1.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 300px;" src="http://3.bp.blogspot.com/_lU9sJzT5R6I/S2EjOPmfg2I/AAAAAAAAAVw/dfzA3PuOC6A/s400/mappin1.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5431661353198650210" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;strong&gt;&lt;span style="color:#660000;"&gt;Mapping Modes&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#000000;"&gt;There are several mapping modes, some of which are constrained to a fixed relationship between DEVICE and LOGICAL coordinate systems. &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#000000;"&gt;Here is the list:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="color:#3333ff;"&gt;Name/Constant            Constrained?             Logical Unit  &lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-family:arial;"&gt;MM_TEXT (default)             Yes                               Pixel  &lt;br /&gt;MM_LOENGLISH                 Yes                              0.01 inch  &lt;br /&gt;MM_HIENGLISH                  Yes                              0.001 inch  &lt;br /&gt;MM_LOMETRIC                  Yes                              0.1 mm  &lt;br /&gt;MM_HIMETRIC                   Yes                               0.01 mm  &lt;br /&gt;MM_TWIPS                        Yes                               1/20 of a point, or 1/1440 of an inch&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-family:arial;"&gt;  &lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color:#ff6600;"&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-family:arial;"&gt;MM_ISOTROPIC                No                                User Defined  &lt;br /&gt;MM_ANISOTROPIC           No                                User Defined&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;span style="font-size:85%;"&gt;For the 'constrained' modes, all you are allowed is to change the origin of the logical system using either SetWindowOrg or SetViewportOrg.&lt;br /&gt;&lt;br /&gt;This means that if I set the mapping mode to MM_LOENGLISH, the point (0,0) and (0,100) are 1 inch apart (1 Logical inch, defined by the device capabilities, see GetDeviceCaps())&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Extents&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;span style="font-size:85%;"&gt;The extent is the maximum value of an axis. Extents are a little trickier, because how they are interpreted depends on the mapping mode. They are only appropriate for the non-constrained modes, MM_ISOTROPIC and MM_ANISOTROPIC.&lt;br /&gt;&lt;br /&gt;The difference between these two modes is that MM_ISOTROPIC takes the parameters you pass to SetViewportExt and SetWindowExt as 'suggestions' (see below) and adjusts the extents so the the x and y axis coordinates represent the same distance on the device. This way, a LOGICAL unit in the x direction is the same length (in terms of the output) as a LOGICAL unit in the y direction (this is not intuitive... some printers may have different resolutions in the two axes... this mode ensures that the LOGICAL units are equivalent in space).&lt;br /&gt;&lt;br /&gt;MM_ANISOTROPIC differs in that the parameters passed to SetViewportExt and SetWindowExt are taken literally. Windows make no adjustment. Therefore, you can have very different coordinate systems in the two axes.&lt;br /&gt;&lt;br /&gt;SetWindowExt and SetViewportExt are used as a team. These two functions set some internal members in the DC, which are used to map points between coordinate systems. As such, each is essentially meaningless taken alone.&lt;br /&gt;&lt;br /&gt;SetWindowExt tells the DC that a rectangle with the LOGICAL width and height passed in, has the DEVICE width and height passed in via SetViewportExt. Confused yet?&lt;br /&gt;&lt;br /&gt;Let's say that I call SetViewportExt for a display device with the parameters 100,50. Taken alone, that's rather meaningless. Now I call SetWindowExt with parameters 100,100. This means that for each LOGICAL unit in the x direction, I will move 1 DEVICE unit. On the other hand, for each LOGICAL unit I move in the y direction, I move 1/2 a unit in the DEVICE coordinate.&lt;br /&gt;&lt;br /&gt;These functions can also be called with negative numbers. When the sign of the parameters to SetWindowExt and SetViewportExt a different, the direction of the axes changes. So that the positive y direction can be up, instead of the usual default of down, if I call:&lt;br /&gt;SetWindowExt(1,-1);&lt;br /&gt;SetViewportExt(1,1);&lt;br /&gt;&lt;br /&gt;One LOGICAL x unit translates to 1 DEVICE x unit, but 1 LOGICAL y unit translates to 1 DEVICE y unit, in the opposite direction.&lt;br /&gt;&lt;br /&gt;Basically, here is the formula used (by Windows) to convert LOGICAL points to DEVICE points:&lt;br /&gt;&lt;br /&gt;where xD = the DEVICE coordinate&lt;br /&gt;and xL = the LOGICAL coordinate&lt;br /&gt;&lt;br /&gt;xD = (xL - xWindowOrg)*(xViewportExt/xWindowExt) + xViewportOrg&lt;br /&gt;&lt;br /&gt;If that makes anything clearer.&lt;br /&gt;How Windows handles extents for MM_ISOTROPIC&lt;br /&gt;&lt;br /&gt;Assuming that SetWindowExt is called BEFORE SetViewportExt (recommended), how the adjustments are made depends on the actual physical dimensions of the extents passed to SetViewportExt. Since device coordinates are not necessarily in equal units in the two axes, they are probably adjusted internally according to LOGPIXELSX/LOGPIXELSY.&lt;br /&gt;&lt;br /&gt;If the physical dimensions of the Viewport Extents are wider than they are tall, the x extent is adjusted so that it's LOGICAL units are equal to the LOGICAL units for the y axis (as defined by the y parameters passed to SetWindowExt / SetViewportExt).&lt;br /&gt;&lt;br /&gt;If the physical dimensions of the Viewport Extents are taller than they are wide, the y extent is adjusted.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4421999031233037653-4422304451556281799?l=yourprosoft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yourprosoft.blogspot.com/feeds/4422304451556281799/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yourprosoft.blogspot.com/2010/01/gdi-mapping-modes-explaind.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4421999031233037653/posts/default/4422304451556281799'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4421999031233037653/posts/default/4422304451556281799'/><link rel='alternate' type='text/html' href='http://yourprosoft.blogspot.com/2010/01/gdi-mapping-modes-explaind.html' title='GDI Mapping Modes Explaind'/><author><name>Wael AlGhool</name><uri>http://www.blogger.com/profile/12348835436349517930</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_lU9sJzT5R6I/R-8xT4OO1YI/AAAAAAAAADE/xIxN20Hls3I/S220/29032008456_small.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_lU9sJzT5R6I/S2EjOc1u8EI/AAAAAAAAAV4/wAg_xeiPHGY/s72-c/mappin2.jpg' height='72' width='72'/><thr:total>0</thr:total></entry></feed>
