<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" 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 = ""><HEAD>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<META content="MSHTML 6.00.2900.5945" name=GENERATOR><!--[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 vLink=purple link=blue bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hello Damien</FONT></DIV>
<DIV><FONT face=Arial size=2>I don't know for sure, but having just wrestled
with vb.net for the first time myself I understand some of your frustrations.
Many vb settings are built up from vb 'bit constants' that are 'added' together
to produce some overall effect.</FONT></DIV>
<DIV><FONT face=Arial size=2>In your case it might be, for example, that
fontstyle.bold = "0001 0000' (or whatever) and fontstyle.italics = "0000
0100".</FONT></DIV>
<DIV><FONT face=Arial size=2>When you AND them, therefore, you get '0000 0000',
whereas OR would produce '0001 0100', which I imagine would set both
styles.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Just a guess at this stage. Hope it
helps.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Regards</FONT></DIV>
<DIV><FONT face=Arial size=2>Robert T-A</FONT></DIV>
<DIV><FONT face=Arial size=2>Brighton SC</FONT></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=Damien.ATKINSON-BUCK@ivanhoe.com.au
href="mailto:Damien.ATKINSON-BUCK@ivanhoe.com.au">ATKINSON-BUCK, Damien</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=sofdev@edulists.com.au
href="mailto:sofdev@edulists.com.au">Year 12 Software Development Teachers'
Mailing List</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Thursday, June 10, 2010 3:47
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [Year 12 SofDev] vb.net
error</DIV>
<DIV><BR></DIV>
<DIV class=Section1>
<P class=MsoNormal><A name=_MailEndCompose><SPAN
style="FONT-SIZE: 10pt; COLOR: #1f497d; FONT-FAMILY: 'Arial','sans-serif'">Hi
folks,<o:p></o:p></SPAN></A></P>
<P class=MsoNormal><SPAN
style="FONT-SIZE: 10pt; COLOR: #1f497d; FONT-FAMILY: 'Arial','sans-serif'">
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: 10pt; 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><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"><IMG
id=Picture_x0020_5 height=304
src="cid:5236283F4C814C2982239D97B511ABC7@timmerarends" width=305></SPAN><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-SIZE: 10pt; 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><SPAN
style="FONT-SIZE: 10pt; 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><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
fnt = txtSomeWriting.Font<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-SIZE: 10pt; 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><SPAN
style="FONT-SIZE: 10pt; 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><SPAN
style="FONT-SIZE: 10pt; 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><SPAN
style="FONT-SIZE: 10pt; 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><SPAN
style="FONT-SIZE: 10pt; 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><SPAN
style="FONT-SIZE: 10pt; 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><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">
<SPAN style="COLOR: blue">Else<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-SIZE: 10pt; 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><SPAN
style="FONT-SIZE: 10pt; 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><SPAN
style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"><o:p> </o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"> <SPAN
style="COLOR: blue">End</SPAN> <SPAN
style="COLOR: blue">Sub</SPAN></SPAN><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"><o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"><o:p> </o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-SIZE: 10pt; 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: 10pt; FONT-FAMILY: 'Arial','sans-serif'"><o:p> </o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-SIZE: 10pt; 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: 10pt; COLOR: #1f497d; FONT-FAMILY: 'Arial','sans-serif'">Regards<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-SIZE: 10pt; COLOR: #1f497d; FONT-FAMILY: 'Arial','sans-serif'">Damien<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-SIZE: 10pt; COLOR: #1f497d; FONT-FAMILY: 'Arial','sans-serif'"><o:p> </o:p></SPAN></P>
<DIV>
<TABLE class=MsoNormalTable style="WIDTH: 522pt" cellSpacing=0 cellPadding=0
width=696 border=0>
<TBODY>
<TR>
<TD
style="PADDING-RIGHT: 0cm; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; PADDING-TOP: 0cm">
<P class=MsoNormal><B><SPAN
style="FONT-SIZE: 10pt; COLOR: #1f497d; FONT-FAMILY: 'Arial','sans-serif'">Damien
Atkinson-Buck</SPAN></B><SPAN
style="FONT-SIZE: 10pt; COLOR: #1f497d; FONT-FAMILY: 'Arial','sans-serif'"><BR>Member
of Academic Staff (Secondary)</SPAN><SPAN
style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"><o:p></o:p></SPAN></P>
<DIV>
<DIV>
<DIV>
<DIV class=MsoNormal><SPAN
style="FONT-SIZE: 10pt; COLOR: #1f497d; FONT-FAMILY: 'Arial','sans-serif'">
<HR style="WIDTH: 375pt" align=left width=500 SIZE=2>
</SPAN></DIV></DIV></DIV></DIV></TD></TR>
<TR>
<TD
style="PADDING-RIGHT: 0cm; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; PADDING-TOP: 0cm">
<TABLE class=MsoNormalTable style="WIDTH: 522pt" cellSpacing=0
cellPadding=0 width=696 border=0>
<TBODY>
<TR>
<TD
style="PADDING-RIGHT: 0cm; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; WIDTH: 123pt; PADDING-TOP: 0cm"
width=164>
<P class=MsoNormal><A href="http://myivanhoe.net/"><SPAN
style="FONT-SIZE: 11pt; FONT-FAMILY: 'Calibri','sans-serif'; TEXT-DECORATION: none"><IMG
id=Picture_x0020_2 height=64
alt=cid:image002.jpg@01CA7D93.5FFD22D0
src="cid:604F464B7DC2432594996F2E13E8538F@timmerarends" width=200
border=0></SPAN></A><SPAN
style="COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"><o:p></o:p></SPAN></P></TD>
<TD
style="PADDING-RIGHT: 0cm; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; WIDTH: 3.75pt; PADDING-TOP: 0cm"
width=5>
<P class=MsoNormal><SPAN
style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"> </SPAN><SPAN
style="COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"><o:p></o:p></SPAN></P></TD>
<TD
style="PADDING-RIGHT: 0cm; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; PADDING-TOP: 0cm">
<P class=MsoNormal><SPAN
style="FONT-SIZE: 7.5pt; COLOR: #1f497d; FONT-FAMILY: 'Arial','sans-serif'">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; COLOR: #1f497d; FONT-FAMILY: 'Arial','sans-serif'"><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="COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"><o:p></o:p></SPAN></P></TD></TR></TBODY></TABLE></TD></TR>
<TR>
<TD
style="PADDING-RIGHT: 0cm; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; PADDING-TOP: 0cm"></TD></TR>
<TR>
<TD
style="PADDING-RIGHT: 0cm; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; PADDING-TOP: 0cm"></TD></TR></TBODY></TABLE>
<P class=MsoNormal><SPAN lang=EN-US
style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"><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.
<P>
<HR>
<P></P>_______________________________________________<BR>http://www.edulists.com.au
- FAQ, Subscribe, Unsubscribe<BR>IT Software Development Mailing List kindly
supported by<BR>http://www.vcaa.vic.edu.au - Victorian Curriculum and
Assessment Authority
and<BR>http://www.vitta.org.au/vce/studies/infotech/softwaredevel3-4.html
<BR>http://www.vitta.org.au - VITTA Victorian Information Technology
Teachers Association Inc</BLOCKQUOTE></BODY></HTML>