<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:p="urn:schemas-microsoft-com:office:powerpoint" xmlns:a="urn:schemas-microsoft-com:office:access" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema" xmlns:b="urn:schemas-microsoft-com:office:publisher" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:c="urn:schemas-microsoft-com:office:component:spreadsheet" xmlns:odc="urn:schemas-microsoft-com:office:odc" xmlns:oa="urn:schemas-microsoft-com:office:activation" xmlns:html="http://www.w3.org/TR/REC-html40" xmlns:q="http://schemas.xmlsoap.org/soap/envelope/" xmlns:rtc="http://microsoft.com/officenet/conferencing" xmlns:D="DAV:" xmlns:Repl="http://schemas.microsoft.com/repl/" xmlns:mt="http://schemas.microsoft.com/sharepoint/soap/meetings/" xmlns:x2="http://schemas.microsoft.com/office/excel/2003/xml" xmlns:ppda="http://www.passport.com/NameSpace.xsd" xmlns:ois="http://schemas.microsoft.com/sharepoint/soap/ois/" xmlns:dir="http://schemas.microsoft.com/sharepoint/soap/directory/" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:dsp="http://schemas.microsoft.com/sharepoint/dsp" xmlns:udc="http://schemas.microsoft.com/data/udc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sub="http://schemas.microsoft.com/sharepoint/soap/2002/1/alerts/" xmlns:ec="http://www.w3.org/2001/04/xmlenc#" xmlns:sp="http://schemas.microsoft.com/sharepoint/" xmlns:sps="http://schemas.microsoft.com/sharepoint/soap/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:udcs="http://schemas.microsoft.com/data/udc/soap" xmlns:udcxf="http://schemas.microsoft.com/data/udc/xmlfile" xmlns:udcp2p="http://schemas.microsoft.com/data/udc/parttopart" xmlns:wf="http://schemas.microsoft.com/sharepoint/soap/workflow/" xmlns:dsss="http://schemas.microsoft.com/office/2006/digsig-setup" xmlns:dssi="http://schemas.microsoft.com/office/2006/digsig" xmlns:mdssi="http://schemas.openxmlformats.org/package/2006/digital-signature" xmlns:mver="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns:mrels="http://schemas.openxmlformats.org/package/2006/relationships" xmlns:spwp="http://microsoft.com/sharepoint/webpartpages" xmlns:ex12t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:ex12m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:pptsl="http://schemas.microsoft.com/sharepoint/soap/SlideLibrary/" xmlns:spsl="http://microsoft.com/webservices/SharePointPortalServer/PublishedLinksService" xmlns:Z="urn:schemas-microsoft-com:" xmlns:st="" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><style>
<!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.object
        {mso-style-name:object;}
span.EmailStyle21
        {mso-style-type:personal-reply;
        font-family:"Arial","sans-serif";
        color:#1F497D;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.Section1
        {page:Section1;}
-->
</style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="2050" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-AU" link="blue" vlink="purple">
<div class="Section1">
<p class="MsoNormal"><a name="_MailEndCompose"><span style="font-size:10.0pt;
font-family:"Arial","sans-serif";color:#1F497D">Hi folks,<o:p></o:p></span></a></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";
color:#1F497D"> I’m just starting VB.Net with my year 11’s and have only ever used vb 6 before. The following code doesn’t make sense to me<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">I’m trying to just teach if else statements so using a couple of check boxes want the font in a textbox to change. In vb 6 you used to just say textbox1.fontbold=true and txtfontItalic
= true not it seems totally different<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;
font-family:"Arial","sans-serif""><img width="305" height="304" id="Picture_x0020_5" src="cid:image001.png@01CB08B4.48A7C0C0"></span><span style="font-size:10.0pt;
font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;
font-family:"Courier New"">
<span style="color:blue">Private</span> <span style="color:blue">Sub</span> btnGo_Click(<span style="color:blue">ByVal</span> sender
<span style="color:blue">As</span> System.Object, <span style="color:blue">ByVal</span> e
<span style="color:blue">As</span> System.EventArgs) <span style="color:blue">Handles</span> btnGo.Click<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;
font-family:"Courier New"">
<span style="color:blue">Dim</span> fnt <span style="color:blue">As</span> Font<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;
font-family:"Courier New""> fnt = txtSomeWriting.Font<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;
font-family:"Courier New"">
<span style="color:blue">If</span> chkItalics.Checked = <span style="color:blue">
True</span> <span style="color:blue">And</span> chkBold.Checked = <span style="color:blue">
True</span> <span style="color:blue">Then<o:p></o:p></span></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;
font-family:"Courier New"">
<span style="background:yellow;
mso-highlight:yellow">txtSomeWriting.Font = <span style="color:blue">
New</span> Font(fnt.Name, 8, FontStyle.Bold <span style="color:blue">Or</span> FontStyle.Italic)</span><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;
font-family:"Courier New"">
<span style="color:blue">ElseIf</span> chkBold.Checked = <span style="color:blue">
True</span> <span style="color:blue">Then<o:p></o:p></span></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;
font-family:"Courier New""> txtSomeWriting.Font =
<span style="color:blue">New</span> Font(fnt.Name, 8, FontStyle.Bold)<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;
font-family:"Courier New"">
<span style="color:blue">ElseIf</span> chkItalics.Checked = <span style="color:blue">
True</span> <span style="color:blue">Then<o:p></o:p></span></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;
font-family:"Courier New""> txtSomeWriting.Font =
<span style="color:blue">New</span> Font(fnt.Name, 8, FontStyle.Italic)<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;
font-family:"Courier New"">
<span style="color:blue">Else<o:p></o:p></span></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;
font-family:"Courier New""> txtSomeWriting.Font =
<span style="color:blue">New</span> Font(fnt.Name, 8, FontStyle.Regular)<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;
font-family:"Courier New"">
<span style="color:blue">End</span> <span style="color:blue">If<o:p></o:p></span></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;
font-family:"Courier New";color:blue"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">
<span style="color:blue">End</span> <span style="color:blue">Sub</span></span><span style="font-size:10.0pt;font-family:"Arial","sans-serif""><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">I don’t get why it is only working if I have an OR between the 2 fontstyles, not an AND when I am trying to make the textbox Bold Italic<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">Does anyone have any ideas? Thanks in advance.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";
color:#1F497D">Regards<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";
color:#1F497D">Damien<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";
color:#1F497D"><o:p> </o:p></span></p>
<div>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="696" style="width:522.0pt">
<tbody>
<tr>
<td style="padding:0cm 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Arial","sans-serif";
color:#1F497D">Damien Atkinson-Buck</span></b><span style="font-size:10.0pt;
font-family:"Arial","sans-serif";color:#1F497D"><br>
Member of Academic Staff (Secondary)</span><span style="font-size:11.0pt;
font-family:"Calibri","sans-serif";color:#1F497D"><o:p></o:p></span></p>
<div>
<div>
<div>
<div class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";
color:#1F497D">
<hr size="2" width="500" style="width:375.0pt" align="left">
</span></div>
</div>
</div>
</div>
</td>
</tr>
<tr>
<td style="padding:0cm 0cm 0cm 0cm">
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="696" style="width:522.0pt">
<tbody>
<tr>
<td width="164" style="width:123.0pt;padding:0cm 0cm 0cm 0cm">
<p class="MsoNormal"><a href="http://myivanhoe.net/"><span style="font-size:
11.0pt;font-family:"Calibri","sans-serif";text-decoration:none"><img border="0" width="200" height="64" id="Picture_x0020_2" src="cid:image002.jpg@01CB08B4.48A7C0C0" alt="cid:image002.jpg@01CA7D93.5FFD22D0"></span></a><span style="font-family:
"Calibri","sans-serif";color:#1F497D"><o:p></o:p></span></p>
</td>
<td width="5" style="width:3.75pt;padding:0cm 0cm 0cm 0cm">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D"> </span><span style="font-family:"Calibri","sans-serif";
color:#1F497D"><o:p></o:p></span></p>
</td>
<td style="padding:0cm 0cm 0cm 0cm">
<p class="MsoNormal"><span style="font-size:7.5pt;font-family:"Arial","sans-serif";
color:#1F497D">PO BOX 91 The Ridgeway, Ivanhoe, Victoria 3079 Australia<br>
Telephone +61 3 9490 3848 Facsimile +61 3 9490 3490<br>
</span><a href="mailto:damien.atkinson-buck@ivanhoe.com.au"><span style="font-size:7.5pt;font-family:"Arial","sans-serif"">mailto:damien.atkinson-buck@ivanhoe.com.au</span></a><span style="font-size:7.5pt;font-family:"Arial","sans-serif";color:#1F497D"><br>
</span><a href="http://myivanhoe.net/"><span style="font-size:7.5pt;
font-family:"Arial","sans-serif"">http://myivanhoe.net</span></a><span style="font-family:"Calibri","sans-serif";color:#1F497D"><o:p></o:p></span></p>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td style="padding:0cm 0cm 0cm 0cm"></td>
</tr>
<tr>
<td style="padding:0cm 0cm 0cm 0cm"></td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D"><o:p> </o:p></span></p>
</div>
</div>
<br>
<br>
<br>
<br>
Privacy, Virus and Copyright Warning<br>
<br>
The information contained in this electronic message (e-mail), and any files transmitted with it:<br>
<br>
* is intended for the named recipients only. If you have received this in error, please advise the sender and delete it and any copies immediately;<br>
* Any personal information in this email must be used in accordance with the Privacy Act 1988 and this always applies even if it has been sent to you in error.<br>
* represents the views of the sender and does not necessarily represent the views or formal advice of Ivanhoe Grammar School;<br>
* may be subject to Copyright, so no further use should be made of it without the author's permission.<br>
<br>
The School does not represent or warrant that the email or any files attached do not contain errors or are free from computer viruses or other defects nor does it accept responsibility for any loss or damage resulting directly or indirectly from the use of
the email or any attached files.
</body>
</html>