c# convert pdf to multipage tiff : Add textbox to pdf online SDK control project wpf azure winforms UWP Visual_Basic20-part1672

CodingStandards
Count
count
thenumberofitemsinaset
SelectedCount
Min
minimum
theminimumvalueinaset
BalanceMin
Max
maximum
themaximumvalueinaset
RateHigh
First
first
thefirstelementofaset
CustomerFirst
Last
last
thelastelementofaset
InvoiceLast
Cur
current
thecurrentelementofaset
ReportCur
Next
next
thenextelementofaset
AuthorNext
Prev
previous
thepreviouselementofaset
DatePrev
Atfirst,placingthesemodifiersafterthebodyofthenamemighttakealittlegettingused
to;However,thebenefitsofadoptingaconsistentapproachareveryreal.
31.9 UserDefinedTypes(UDTs)
UDTsareanextremelyuseful(andoftenoverlooked)facilitysupportedbyVB.Lookinto
them-thisisnottherightdocumenttodescribehowtheyworkorwhentousethem. We
willfocusonthenamingrules.
First,rememberthattocreateaninstanceofaUDT,youmustfirstdefinetheUDTand
thenDimaninstanceofit.Thismeansyouneedtwonames.Todistinguishthetypefrom
instancesofthattype,weuseasingleletterprefixtothename,asfollows:
Type TEmployee
nID
As Long
sSurname As s String
cSalary As s Currency
End Type
Dim mEmployee As s TEmployee
WecannotusetheCconventionshereastheyrelyonthefactthatCiscase-sensitive. We
needtocomeupwithourownconvention.Theuseofanuppercase'T'mayseematodds
withtheotherconventions sofarpresentedbutitisimportanttovisuallydistinguishthe
namesofUDTdefinitionsfromthenamesofvariables. RememberthataUDTdefinition
isnotavariableandoccupiesnospace.
Besideswhich,that'showwedoitinDelphi.
31.10 Arrays
Thereisnoneedtodifferentiatethenamesofarraysfromscalarvariablesbecauseyouwill
alwaysbeabletorecogniseanarraywhenyouseeit,eitherbecauseithasthesubscripts
afteritinparenthesesorbecauseitiswrappedupinsideafunctionlikeUBoundthatonly
makessenseforarrays.
Arraynamesshouldbeplurals.Thiswillbeespeciallyhelpfulinthetransitiontocollections
inVB4.
Youshouldalwaysdimensionarrayswithbothanupperandalowerbound.Insteadof:
194
Add textbox to pdf online - C# PDF Annotate Library: Draw, edit PDF annotation, markups in C#.net, ASP.NET, MVC, Ajax, WPF
Draw, Add and Edit Various Annotations on PDF File in C# Programming
add text boxes to pdf document; add text to pdf acrobat
Add textbox to pdf online - VB.NET PDF Annotate Library: Draw, edit PDF annotation, markups in vb.net, ASP.NET, MVC, Ajax, WPF
Guide to Draw, Add and Edit Various Annotations on PDF File in VB.NET Programming
add text in pdf file online; add text to pdf in preview
Procedure
Dim mCustomers(10) as TCustomer
try:
Dim mCustomers(0 To o 10) ) as TCustomer
Manytimes,itmakesfarmoresensetocreate1-basedarrays. Asageneralprinciple,try
tocreatesubscriptrangesthatallowforcleanandsimpleprocessingincode.
31.11 Procedure
Proceduresarenamedaccordingtothefollowingconvention:
verb.noun
verb.noun.adjective
Herearesomeexamples:
Good:
FindCustomer
FindCustomerNext
UpdateCustomer
UpdateCustomerCur
Bad:
CustomerLookup should be LookupCustomer
GetNextCustomer should be e GetCustomerNext
ScopingrulesforproceduresareratherinconsistentinVB.Proceduresareglobalinmodules
unlesstheyaredeclaredPrivate;theyarealwayslocalinformsinVB3,ordefaulttoPrivate
inVB4butcanbePublicifexplicitlydeclaredthatway.Doestheterm"dog'sbreakfast"
meananything?
Because the event procedures s cannot t be renamed and do o not have e scope e prefixes, , user
proceduresinVBalsoshouldNOTincludeascopeprefix. Commonmodulesshouldkeep
allproceduresthatarenotcallablefromothermodulesPrivate.
31.12 FunctionProcedureDataTypes
Functionprocedurescanbesaidtohaveadatatypewhichisthetypeoftheirreturnvalue.
Thisis animportant attributeofafunctionbecauseit affects howandwhereit may be
correctlyused.
Therefore,functionnamesshouldbeprefixedwithadatatypetaglikevariables.
195
VB.NET PDF Form Data Read library: extract form data from PDF in
Add necessary references: As String = Program.RootPath + "\\" 1_AF_Filled.pdf" Dim fields Is AFTextBox Then Console.WriteLine(" Type: " + "TextBox") Dim obj
adding notes to a pdf; adding text fields to a pdf
C# PDF Form Data Read Library: extract form data from PDF in C#.
Add necessary references Program.RootPath + "\\" 1_AF_Filled.pdf"; List<BaseFormField AFTextBox) { Console.WriteLine(" Type: " + "TextBox"); Console.WriteLine
adding text to a pdf file; adding text to pdf
CodingStandards
31.13 Parameters
Withinthebodyofaprocedure,parameternameshaveaveryspecialstatus. Thenames
themselvesarelocaltotheprocedurebutthememorythatthenamerelatestoomaynotbe.
Thismeansthatchangingthevalueofaparametermayhaveaneffectatatotallydifferent
scopetotheprocedureitselfandthiscanbethecauseofbugsthatareparticularlydifficult
totrackdownlater. Thebestsolutionistostopitfromhappeninginthefirstplace.
Adahasareallyneatlanguagefacilitywherebyallparamaters toaprocedurearetagged
asbeingoneofthetypesIn,OutorInOut. Thecompilerthenenforcestheserestrictions
ontheprocedurebody;itisnotallowedtoassignfromanOutparameterorassigntoan
Inparameter. Unfortunately,nomainstreamlanguagesupportsthisfacilitysoweneedto
kludgeit.
Alwaysmakesureyouareabsolutelyclearabouthoweachparameteristobeused. Isit
usedtocommunicateavaluetotheprocedureor tothe callerorboth? Wherepossible,
declareinputparametersByValsothatthecompilerenforcesthisattribute. Unfortunately,
therearesomedatatypesthatcannotbepassedByVal,notablyarraysandUDTs.
Each parameter r name is s formedaccording g to the rules s for r forming variable names. Of
course,parametersarealwaysatprocedurelevel(local)scopesotherewillnotbeascope
character. Attheendofeachparametername,addanunderscorefollowedbyoneofthe
wordsIN,OUTorINOUTasappropriate. Useuppercasetoreallymakethesestandout
inyourcode.Hereisanexample:
Sub GetCustomerSurname(ByVal l nCustomerCode_IN as s Long
, _
sCustomerSurname_OUT As s String
)
Ifyouseeanassignmenttoavariablethatendsin_IN(ieifitistotheleftofthe'='in
anassignmentstatement)thenyouprobablyhaveabug.Dittoifyouseeareferencetothe
valueofavariablethatendsin_OUT.Boththesestatementsareextremelysuspect:
nCustomerCode_IN = nSomeVariable
nSomeVariable = = nCustomerCode_OUT
31.14 FunctionReturnValues
InVB,youspecifythereturnvalueofafunctionbyassigningavaluetoapseudo-variable
withthesamenameasthefunction.Thisisafairlycommonconstructformanylanguages
andgenerallyworksOK.
Thereare,however,onelimitationimposedbythisscheme. Whichisthatitmakesitreally
hardtocopy andpaste codefromonefunctionintoanotherbecauseyouhavetochange
referencestotheoriginalfunctionname.
Alwaysdeclarea localvariable calledResultinsideevery functionprocedure. Makesure
thatyouassignadefaultvaluetothatvariableattheverybeginningofthefunction. Atthe
exitpoint,assigntheResultvariabletothefunctionnameimmediatelybeforetheexitof
thefunction.Hereisaskeletonforafunctionprocedure(minuscommentblockforbrevity):
196
VB.NET PDF Form Data fill-in library: auto fill-in PDF form data
Add necessary references: field.Name, input, outputFilePath + cnt.ToString() + ".pdf") ElseIf TypeOf field Is AFTextBox Then ' fill a TextBox field, change
add text field to pdf acrobat; add comments to pdf file
C# PDF Form Data fill-in Library: auto fill-in PDF form data in C#
Add necessary references: FillFormField(inputFilePath, "AF_CheckBox_01", input, outputFilePath + "2.pdf"); } { fill a TextBox field, change content to
adding a text field to a pdf; adding text pdf files
Constants
Function DoSomething() As Integer
Dim Result t As Integer
Result = 42 ' Default value of function
On Error Goto DoSomething_Error
' body of function
DoSomething_Exit:
DoSomething = Result
Exit Function
DoSomething_Error:
' handle the error here
Resume DoSomething_Exit
End Function
Inthebodyofthefunction,youshouldalwaysassigntherequiredreturnvaluetoResult.
YouarealsofreetocheckthecurrentvalueofResult. Youcanalsoreadthevalueofthe
functionreturnvariable.
Thismightnotsoundlikeabigdealifyouhaveneverhadtheabilitytouse itbutonce
youtryityouwillnotbeabletogobacktoworkingwithoutit.
Don'tforgetthatfunctionshaveadatatypetoo,sotheirnameshouldbeprefixedinthe
samewayasavariable.
31.15 Constants
Theformattingrulesforconstantsaregoingtobeverydifficultforusall. Thisisbecause
Microsofthasdoneanabout-faceonconstantnamingconventions. Therearetwoformats
usedbyMicrosoftforconstantsandunfortunatelywewillneedtoworkwithbothformats.
WhileitwouldbepossibleforsomeonetoworkthroughthefileofMS-definedconstantsand
convertthemtothenewformat,thatwouldmeanthateveryarticle,bookandpublished
codefragmentwouldnotmatchourconventions.
Avotefailedtoresolvetheissue-itwasprettymuchevenlysplitbetweenthetwoalterna-
tives-soIhavehadtomakeanexecutivedecisionwhichIwilltrytoexplain.Thedecision
istogowiththeold-styleconstantformats.
ConstantsarecodedinALL_UPPER_CASEwithwordsseparatedbyunderscores.Where
possible,usethe constant names defined intheConstant.Txt file-not becausethey are
particularlywell-formedorconsistentbutbecausetheyarewhatyouwillseeinthedocu-
mentationandinbooksandmagazinearticles.
TheformattingofconstantsmaywellchangeastheworldmovestoVB4andlater,where
constantsareexposedbyOLEobjectsthroughatypelibraryandwherethestandardformat
is touseInitialCapitalLettersprefixedwithsomeunique, , lower-casetag(as s invbYesNo-
Cancel).
Whenwritingmodulesthataretobecalledfromvariousplaces(especiallyifitwillbeused
inseveralprograms),defineglobalconstantsthat canbeusedby the client codeinstead
ofmagicnumbers orcharacters. Usetheminternallytoo,ofcourse. Whendefiningsuch
197
CodingStandards
constants,make upa uniqueprefix to be addedto each of them. For r example, , if Iam
developingaWidgetcontrolmodule,Imightdefineconstantslikethis:
Global Const WDGT_STATUS_OK = = 0
Global Const WDGT_STATUS_BUSY Y = = 1
Global Const WDGT_STATUS_FAIL L = = 2
Global Const WDGT_STATUS_OFF = 3
Global Const WDGT_ACTION_START = 1
Global Const WDGT_ACTION_STOP P = = 2
Global Const WDGT_ACTION_RAISE = 3
Global Const WDGT_ACTION_LOWER = 4
@TODO:GlobalversusPublic@TODO:Mentionenums.
Yougettheidea. Thelogicbehindthisistoavoidnamingclasheswithconstantsdefined
forothermodules.
Constants must indicate scope e and data type e in n one e of two o ways s -they y may y take the
lower-casescopeandtypeprefixesthatareusedforvariables,ortheymaytakeupper-case
group-specifictags. The e widgetconstants above demonstratethe latter type: thescope
is WDGT and d the data type is s STATUSor ACTION.Constants s that t are used d to hide
implementationdetails fromclients s of f a commonmodule wouldgenerally use the latter
type, whereas constants s usedfor convenience andmaintainability in n the mainpart t ofa
programwouldgenerallyusethenormalvariable-likeprefixes.
I feelI need to explainthese decisions s alittle e more, which I guess signifies that t Iam
not totally satisfied d withthis s outcome. Whileit t wouldbeniceto think that we could
justgoaheadanddefineourownstandard,thefactisthatwearepartofthewiderVB
programming community and will need to interface to code written by others s (and in
particularbyMicrosoft). Ithereforeneededtokeepinmindwhatothershavedoneand
whattheyarelikelytodointhefuture.
The decisiontoadopt theold-style comments (ie ALL_UPPER_CASE) was basedon
thefactthatthereisahugebodyofcode(andinparticularmodulescontainingconstant
definitions)thatweneedtoincorporateintoourprograms. Microsoft's s newformat(the
vbThisIsNewformat)isonlybeingimplementedintypelibraries. TheVB4documentation
suggeststhat weadoptthelower-caseprefix "con"forapplication-specific constants(as
in conThisIsMyConstant) ) but t inseveral on-line e discussions s withdevelopers s working in
corporationsallaroundtheworlditappearsthatthisisnotbeingadopted,oratleastnot
fortheforeseeablefuture.
That's basically why Idecidedonthe old-stylecomments. Weare e familiar withthem,
everyoneelseisusingthemandtheyclearlydelineatecodethatisintheprogram(whether
wewroteitoritwasincludedfromavendor'ssuppliedBASfile)fromconstantspublished
byatypelibraryandreferencedinVB4+.
Theotherdilemmawastheissueofscopeandtypetagsonconstants.Mostpeoplewanted
thesealthoughtheyarenotgenerallydefinedinvendor-suppliedconstantdefinitions.I'm
nottoosureaboutthetypetagmyselfasIthinkitissometimesusefultohidethetype
tomaketheclientcodelessdependentontheimplementationofsomecommoncode.
Intheend,acompromisewaschosen. Forconstantswherethetypeisimportantbecause
theyareusedtoassignvalues toaprogram'sowndataitems,thenormalvariable-style
tags are used d to denote both scope and type. For r 'interface' constants, such as those
198
Controls
suppliedbyvendorstointerfacetoacontrol,thescopecanbeconsideredthecontrol,and
thedatatypeisoneofthespecialtypessupportedbyaparticularpropertyormethodof
thatcontrol. Inotherwords,MB_ICONSTOPhasascopeofMB(messagebox)anda
datatypeofICON.Ofcourse,Ithinkit shouldhavebeenMB_ICON_STOPandthat
MB_YESNOCANCEL should have been MB_BUTTONS_YESNOCANCEL, but you
can'teveraccuseMicrosoftofconsistency. IhopethisshedssomelightonwhyIdecided
togothisway.
Isuspectthisissuewillgeneratefurtherdiscussionasweallgetsomeexperienceinapplying
thisstandard.
31.16 Controls
Allcontrols on n aformshould be renamedfromtheir r default Textn n names,even for r the
simplestofforms.
The only exceptions tothisare anylabelsusedonly as static prompts on the surface of
a form. If f a label is s referenced anywhere in code, , even n once, , then n it t must be given n a
meaningfulnamealongwiththeothercontrols. Ifnot,thentheirnamesarenotsignificant
andcanbelefttotheirdefault"Labeln"names.Ofcourse,ifyouarereallykeen,youmay
givethemmeaningfulnamesbut Ireallythinkweareallbusyenoughthatwecansafely
skipthisstep. Ifyoudon'tliketoleavethosenamessettotheirdefaults(andI'llconfessto
beinginthatgroup),youmayfindthefollowingtechniqueuseful. Createacontrolarray
outofalltheinertlabelsonaformandcallthearraylblPrompt().Theeasywaytodothis
istocreatethefirstlabelthewayyouwantit(withtheappropriatefont,alignmentandso
on)andthencopyandpasteitasmanytimesasisnecessarytocreateallthelabels. Using
acontrolarrayhasanadditionalbenefitbecauseacontrolarrayusesupjustonenamein
theform'snametable.
Takethe timetorenameallcontrols beforewritinganycodeforaform. . Thisis s because
thecodeisattachedtoacontrolbyitsname.Ifyouwritesomecodeinaneventprocedure
andthenchangethenameofthecontrol,youcreateanorphaneventprocedure.
Controlshavetheirownsetofprefixes.Theyareusedtoidentifythetypeofcontrolsothat
codecanbevisuallycheckedforcorrectness.Theyalsoassistinmakingiteasytoknowthe
nameofacontrolwithoutcontinuallyneedingtolookitup.(See"CradletoGraveNaming
ofDataItems"below.)
31.17 SpecifyingParticularControlVariants-NOT
In general, , it t is NOT T a a good idea to use specific identifiers s for variations s on n a theme.
For example,whether youare usinga ThreeD D button or r astandard d button generally y is
invisibletoyourcode-youmayhavemorepropertiestoplaywithatdesigntimetovisually
enhancethecontrol,butyourcodeusuallytrapstheClick()eventandmaybemanipulates
theEnabledandCaptionproperties,whichwillbecommontoallbutton-likecontrols.
199
CodingStandards
Using generic prefixes means s that your code e is less dependent onthe particular control
variant thatisusedinanapplicationandthereforemakes codere-usesimpler. Onlydif-
ferentiate betweenvariants ofafundamentalcontrolifyourcode istotallydependenton
someuniqueattributeofthatparticularcontrol.Otherwise,usethegenericprefixeswhere
possible.TableofStandardControlPrefixes
Thefollowingtableis alistof the commontypesofcontrolsyouwillencountertogether
withtheirprefixes:
Prefix
Control
cbo
Combobox
chk
Checkbox
cmd
Commandbutton
dat
Datacontrol
dir
Directorylistbox
dlg
Commondialogcontrol
drv
Drivelistbox
ela
Elastic
fil
Filelistbox
fra
Frame
frm
Form
gau
Gauge
gra
Graph
img
Image
lbl
Label
lin
Line
lst
Listbox
mci
MCIcontrol
mnu
Menucontrol†
mpm
MAPIMessage
mps
MAPISession
ole
OLEcontrol
opt
Optionbutton
out
Outlinecontrol
pic
Picture
pnl
Panel
rpt
Report
sbr
Scrollbar(thereisnoneedtodistinguishorientation)
shp
Shape
spn
Spin
ssh
Spreadsheetcontrol
tgd
Truegrid
tmr
Timer‡
txt
Textbox
†Menucontrolsaresubjecttoadditionalrulesasdefinedbelow.
200
MenuControls
‡ThereisoftenasingleTimercontrolinaproject,anditisusedforanumberofthings.
Thatmakesitdifficulttocomeupwithameaningfulname.Inthissituation,itisacceptable
tocallthecontrolsimply"Timer".
31.18 MenuControls
Menucontrolsshouldbenamedusingthetag"mnu"followedbythecompletepathdown
themenutree. This s has the additional l benefit t ofencouraging shallowmenuhierarchies
whicharegenerallyconsideredtobeAGoodThinginuserinterfacedesign.
Herearesomeexamplesofmenucontrolnames:
mnuFileNew
mnuEditCopy
mnuInsertIndexAndTables
mnuTableCellHeightAndWidth
31.19 CradletoGraveNamingofDataItems
As important t as s allthe preceding rules are, , the rewards you get t for all l the extra time
thinkingaboutthenamingofobjectswillbesmallwithoutthisfinalstep,somethingIcall
cradle tograve naming. The e concept is simple but it isamazingly difficultto discipline
yourselftodoitwithoutfail.
Essentially,theconceptissimplyanacknowledgmentthatanygivendataitemhasexactly
onename. IfsomethingiscalledaCustomerCode,thenthatiswhatitiscalledEVERY-
WHERE. Not CustCode. Not t CustomerID. . Not t CustID.Not CustomerCde. No o name
exceptCustomerCodeisacceptable.
Now,let'sassumeacustomercodeis anumericitem. . IfIneedacustomercode,Iwould
usethenamenCustomerCode. IfI I wanttodisplayit inatextbox, thattextboxmust
becalledtxtCustomerCode.IfIwantacomboboxtodisplaycustomercodes,thatcontrol
wouldbecalledcboCustomerCode.Ifyouneedtostoreacustomercodeinaglobalvariable
(Idon'tknowwhyyou'dwanttoeither-I'mjustmakingapoint)thenitwouldbecalled
gnCustomerCode. If f youwant to convertitintoa string(sayto print it out later) you
mightuseastatementlike:
sCustomerCode = Format$(gnCustomerCode)
Ithinkyougettheidea. It'sreallyverysimple. It'salsoincrediblydifficulttodoEVERY
time,andit's only bydoingitEVERYtime thatyouget therealpayoffs. It t isjustSO
temptingtocodetheabovelinelikethis:
sCustCode = Format$(gnCustomerCode)
201
CodingStandards
31.20 Fieldsindatabases
Asageneralrule,thedatatypetagprefixesshouldbeusedinnamingfieldsinadatabase.
Thismaynotalwaysbepracticalorevenpossible.Ifthedatabasealreadyexists(eitherbe-
causethenewprogramisreferencinganexistingdatabaseorbecausethedatabasestructure
hasbeencreatedaspartofthedatabasedesignphase)thenitisnotpracticaltoapplythese
tags toeverycolumnorfield. Evenfor r new tables inexistingdatabases,donotdeviate
fromtheconventions(hopefully)alreadyinuseinthatdatabase.
Somedatabaseenginesdonotsupportmixedcaseindataitemnames.Inthatcase,aname
likeSCUSTOMERCODEisvisuallydifficulttoscananditmightbeabetterideatoomit
thetag.Further,somedatabaseformatsallowforonlyveryshortnames(likexBase'slimit
of10characters)soyoumaynotbeabletofitthetagsin.
Ingeneral,however,youshouldprefixdatabasefield/columnnameswithdatatypetags.
31.21 Objects
ThereareanumberobjecttypesthatareusedofteninVB.Themostcommonobjects(and
theirtypetags)are:
Prefix
Object
db
Database
ws
Workspace
rs
Recordset
ds
Dynaset
ss
Snapshot
tbl
Table
qry
Query
tdf
TableDef
qdf
QueryDef
rpt
Report
idx
Index
fld
Field
xl
Excelobject
wrd
Wordobject
31.22 ControlObjectVariables
Control objects s arepointers to actualcontrols. When n you assigna controltoa control
objectvariable,youareactuallyassigningapointertotheactualcontrol. Anyreferences
totheobjectvariablethenreferencethecontroltowhichitpoints.
Genericcontrolvariablesaredefinedas:
Dim ctlText t As Control
202
ControlObjectVariables
ThisallowsapointertoanycontroltobeassignedtoitviatheSetstatement:
Set ctlText = txtCustomerCode
Thebenefitofgenericcontrolvariablesisthattheycanpointtoanytypeofcontrol. You
cantestwhattypeofcontrolagenericcontrolvariableiscurrentlypointingtobyusingthe
TypeOfstatement:
If TypeOf f ctlText Is Textbox Then
Becarefulhere; this s only looks likeanormalIfstatement. YoucannotcombineTypeOf
withanothertest,norcanyouuseitinaSelectstatement.
The fact t that the variable can n point t to any control l type e is s also its weakness. Because
thecompilerdoesnot knowwhatthecontrolvariablewillbepointingtoat any pointin
time, itcannot t checkwhat you u are doing for r reasonableness. Itmust t use run-time code
tocheckeveryactiononthatcontrolvariablesothoseactionsarelessefficient,whichjust
compoundsVB'sreputationforsluggishperformance.Moreimportantly,however,youcan
endupwiththevariablepointingtoanunexpectedcontroltype,causingyourprogramto
explode(ifyouarelucky)ortoperformincorrectly.
Specificcontrolvariablesarealsopointers. Inthiscasehowever,thevariableisconstrained
topointonlytocontrolsofaparticulartype. Forexample:
Dim txtCustomerCode e as s Textbox
TheproblemhereisthatIhaveusedthesamethree-lettertagtodenoteacontrolobject
variableasIwouldhaveusedtonameanactualtextcontrolonaform. IfIamfollowing
theseguidelines,thenIwillhaveacontrolcalledbythesamenameonaform. HowamI
supposedtoassignittothevariable?
Icanusetheform'snametoqualifythereferencetotheactualcontrol,butthatisconfusing
at best. For r that t reason, , object t control variable names s should d be distinct t from m actual
controls,soweextendthetypecodebyusingasingleletter"o"atthefront.Theprevious
definitionwouldmorecorrectlybe:
Dim otxtCustomerCode as Textbox
ThisisanotheroneIhadtoagoniseover.Iactuallylikethenamebetterifthe"o"follows
thetag,asintxtoCustomerName.However,itisjusttoohardtoseethatlittle"o"buried
inallthosecharacters. IalsoconsideredusingtxtobjCustomerName, , butIthinkthat t is
gettingalittlebittoolong. I'mhappytolookatanyotheralternativesorargumentsfor
oragainsttheseones.
Actually,this isnot as bigaproblemas youmight imagine,becauseinmost casesthese
variablesareusedasparameterstoagenericfunctioncall. Inthatcase,wewilloftenuse
thetagaloneasthenameoftheparametersotheissuedoesnotarise.
Averycommonuseofcontrolobjectvariablesisasparameterstoaprocedure.Hereisan
example:
Sub SelectAll(txt t As s TextBox)
txt.SelStart = 0
203
Documents you may be interested
Documents you may be interested