koding vb
TRANSCRIPT
5/10/2018 koding VB - slidepdf.com
http://slidepdf.com/reader/full/koding-vb 1/2
Sekedarbuattambahanreferensirekan2programmer:
Codedby:[email protected]
1.Pindahantartextbox/ComboBoxdenganhanya1barisperintah:
Kodepadaform:
PrivateSubText1_KeyPress(KeyAsciiAsInteger)PindahTabKeyAsciiEndSub
Letakkanpadamodule:
PublicSubPindahTab(nTabAsInteger)
IfnTab=13ThenSendKeys"{tab}"EndIfEndSub
2.KodeRataKanan/RataKiri
LetakkanpadaModule
PublicFunctionPadL(cCharasString,nSpaceAsInteger)AsString
DimnSpace1AsIntegerIfLen(cChar)<>nSpaceThenIfLen(cChar)>nSpaceThenPadL=Right(cChar,nSpace)ElsePadL=Space(nSpace-Len(cChar))+cCharEndIfElsePadL=cCharEndIfEndFunction
PublicFunctionPadC(cCharAsString,nSpaceAsInteger)AsStringDimnSpace1AsIntegerIfLen(cChar)<>nSpaceThenIfLen(cChar)<nSpaceThennSpace1=nSpace-Len(cChar)PadC=Space(nSpace1/2)+cChar+Space(nSpace1/2)ElsePadC=Right(cChar,nSpace)EndIfElsePadC=cCharEndIfEndFunction