Article View: comp.lang.basic.visual
Article #275Re: HELP ! ! ! simple Visual Basic code ???
From: CMS
Date: Fri, 12 Jan 2001 23:08
Date: Fri, 12 Jan 2001 23:08
142 lines
5530 bytes
5530 bytes
I would also like a copy of the project if possible. I too am into electronics and amateur radio and I think this would be a fun project to play with! Nis Madsen USA, NJ screensavers4u@hotmail.com Lasse Madsen <Lasse.Madsen@Elektronik.dk> wrote in message news:911btb$7lo$1@news.cybercity.dk... > Dear Ton > > I would wery much appriciate the form project if you will send it to me, If > its possible i would like 2 independent resistor calculators on that one > form, Cause the project that im making requres 2 independent resistor values > to be shown in colour code > > Thanks alot > Regards > Lasse Madsen > Denmark > > "ton" <zoetermeer@xs4all.nl> skrev i en meddelelse > news:90rkbe$i4k$1@news1.xs4all.nl... > > Public x As Integer > > Public va As String > > > > Private Sub Form_Load() > > x = 0 > > End Sub > > > > Private Sub Text3_Click(Index As Integer) > > nr = Text3(Index).Index > > If x = 3 Then > > For t = 0 To 2: Text1(t).BackColor = &H80000005: Next > > x = 0 > > va = "" > > End If > > Text1(x).BackColor = Text3(nr).BackColor > > x = x + 1 > > Select Case x > > Case 1 > > va = CStr(nr) & va > > Case 2 > > va = va & CStr(nr) > > Case 3 > > Select Case nr > > Case 0 > > va = va & "0 ohm" > > Case 1 > > va = va & "0 ohm" > > Case 2 > > va = va & "00 ohm" > > Case 3 > > va = va & " K ohm" > > Case 4 > > va = va & "0 Kohm" > > Case 5 > > va = va & " M ohm" > > End Select > > End Select > > Text2.Text = va > > End Sub > > The form consists of a textbox 'text2.text', 3 small(1 character) > textboxes > > text1(0).text etc and 10 small textboxes text3(0..9) with the colors you > > describe as backcolor. > > Nice idea, works simple. I'll send you the form if you want. > > regards, ton > > Lasse Madsen <Lasse.Madsen@Elektronik.dk> schreef in berichtnieuws > > 90oika$143u$1@news.cybercity.dk... > > > Hi there im making a small resistor color code calculator based on a > > slider > > > (SRa) and 4 (shapes a,b,c and d) the shapes is placed like this > |a|b|c|d| > > > after eatch other to symbolise a resistor. what i want is: > > > > > > make my slider code control the colors of the 4 shapes (a,b,c,d,) > > > Below is the colour code a resistor can have and which the 4 shapes > should > > > be assigned > > > > > > Black = &H0& > > > Brown = &H4080& > > > Red = &HFF& > > > Orange = &H80FF& > > > Yellow = &HFFFF& > > > Green = &HC000& > > > Blue = &HFF0000 > > > Purple = &HC000C0 > > > Gray = &H808080 > > > White = &HFFFFFF > > > > > > Below you see what each colour represents in decimal values > > > Black = 0 > > > Brown = 1 > > > Red = 2 > > > Orange 3 > > > Yellow = 4 > > > Green = 5 > > > Blue = 6 > > > Purple =7 > > > Gray =8 > > > White ==9 > > > > > > A resistor value is determined like this: > > > 220 Ohms = 2 - 2 - 0 (first and second digit and third value) but when > > > converted to color code its like this > > > 2 - 2 - 0 = > > > Red - Red (2 - 2) > > > the 0 determins how many zeros that is after the 2 digits (in this case > > 2-2) > > > and the color code will be RED - RED - BROWN (brown because because you > > need > > > 1 zero after 2-2 to make 220 !) > > > > > > If SRa.Value = 3 Then TRa.Text = "220" & " ohms" / this should be > 2-2-1 > > > Red-Red-Black > > > If SRa.Value = 4 Then TRa.Text = "270" & " ohms" /this should be 2-7-1 > > > Red-Purple-Brown > > > > > > > > > How can i do this ??? > > > -- > > > > > > ------------------------- > > > Electronics Student > > > Lasse Madsen > > > H�jrupsvej 52, 2.m.f. > > > 9900 Frederikshavn > > > Denmark > > > > > > > > > > > >
Technical Details
Message-ID:
<93o316$adp$1@bob.news.rcn.net>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!bignews.mediaways.net!newsfeed.mesh.ad.jp!news.maxwell.syr.edu!cpk-news-hub1.bbnplanet.com!news.gtei.net!feed2.news.rcn.net!feed1.news.rcn.net!rcn!not-for-mailReferences:
<90oika$143u$1@news.cybercity.dk> <90rkbe$i4k$1@news1.xs4all.nl> <911btb$7lo$1@news.cybercity.dk>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: f94ee,561b660d9b913f3d X-Google-Attributes: gidf94ee,public X-Google-Thread: f51ba,561b660d9b913f3d X-Google-Attributes: gidf51ba,public X-Google-Thread: 111c14,561b660d9b913f3d X-Google-Attributes: gid111c14,public X-Google-Thread: fb992,561b660d9b913f3d X-Google-Attributes: gidfb992,public X-Google-Thread: 106fd2,561b660d9b913f3d X-Google-Attributes: gid106fd2,public X-Google-Thread: 10cf61,561b660d9b913f3d X-Google-Attributes: gid10cf61,public X-Google-Thread: f645d,561b660d9b913f3d X-Google-Attributes: gidf645d,public X-Google-Thread: 107824,561b660d9b913f3d X-Google-Attributes: gid107824,public X-Google-ArrivalTime: 2001-01-12 15:16:49 PST Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!bignews.mediaways.net!newsfeed.mesh.ad.jp!news.maxwell.syr.edu!cpk-news-hub1.bbnplanet.com!news.gtei.net!feed2.news.rcn.net!feed1.news.rcn.net!rcn!not-for-mail From: "CMS" <eat@joes.com> Newsgroups: comp.lang.basic.visual,comp.lang.visual.basic,dk.edb.programmering.basic.visual-basic,fj.comp.lang.visualbasic,free.it.programmazione.visualbasic,free.it.visual-basic,microsoft.private.mvp.VisualBasic,no.it.programmering.visual-basic Subject: Re: HELP ! ! ! simple Visual Basic code ??? Date: Fri, 12 Jan 2001 18:08:04 -0500 Lines: 144 Message-ID: <93o316$adp$1@bob.news.rcn.net> References: <90oika$143u$1@news.cybercity.dk> <90rkbe$i4k$1@news1.xs4all.nl> <911btb$7lo$1@news.cybercity.dk> X-Trace: UmFuZG9tSVbgSQ+JfGPQx6AI5OnDDgpCsF5BA4GBm9rtQQiZk13I2p5fjhFSAEUs X-Complaints-To: abuse@rcn.com NNTP-Posting-Date: 12 Jan 2001 23:12:38 GMT X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 X-Priority: 3 X-Newsreader: Microsoft Outlook Express 5.00.2615.200 X-MSMail-Priority: Normal