evry1falls

درس تطبيقى رائع على استخدام ScrollBar

1 مشاركة في هذا الموضوع

[ltr] Visual Basic 6.0 lesson - Temperature convector
ScrollBar control is a very handy tool for Visual Basic programmers. It is used in many tricks like (sizing, scrolling texts .... etc)

Visual Basic ScrollBar example

Temperature Convector Desktop application source code project is a good example for Visual Basic beginners to start studying ScrollBars and how handy they are for a programmer as a tool on the form.

Scrollbars in Visual Basic 6.0 is free to use, easy to place on a form (Horizontally or Vertically) according to your need in the design-time (IDE), in our example we will place one Scrollbar on the form and some labels, TextBoxes and CommandButtons as in the photo below .

Temperature Convector VB6 Source Code

What is Celsius and Fahrenheit ?
- Celsius
is a scale and unit of measurement for temperature. It is named after the Swedish astronomer Anders Celsius (1701–1744), who developed a similar temperature scale. The degree Celsius (°C) can refer to a specific temperature on the Celsius scale as well as a unit to indicate a temperature interval, a difference between two temperatures or an uncertainty. The unit was known until 1948 as "centigrade" from the Latin centum translated as 100 and gradus translated as "steps".

- Fahrenheit
is a temperature scale based on one proposed in 1724 by, and named after, the physicist Daniel Gabriel Fahrenheit (1686–1736).[1] Within this scale, the freezing of water into ice is defined at 32 degrees, while the boiling point of water is defined to be 212 degrees - on Fahrenheit's original scale the freezing point of brine was zero degrees.
 

Option Explicit' C = (F-32)*5/9Dim TempC As IntegerDim TempF As IntegerPrivate Sub CmdExit_Click ()EndEnd SubPrivate Sub Command1_Click()VsbTemp.Value = 98.6TxtExp.Caption = "Here is Where Body Temp. at 37C Equals F.Temp."End SubPrivate Sub Command1_LostFocus()TxtExp.Caption = ""End SubPrivate Sub Command2_Click()VsbTemp.Value = -40TxtExp.Caption = "Here is Where F.Temp Equals The C.Temp At -40 Point"End SubPrivate Sub Command2_LostFocus()TxtExp.Caption = ""End SubPrivate Sub Command3_Click()VsbTemp.Value = 32TxtExp.Caption = "Scale Resets"End SubPrivate Sub Command4_Click()TxtExp.Caption = "http://evry1falls.freevar.com/vb6/"End SubPrivate Sub Command4_LostFocus()TxtExp.Caption = ""End SubPrivate Sub VsbTemp_Change()'Read F and convert to C.TempF = VsbTemp.ValueLblTempF.Caption = Str(TempF)TempC = CInt(TempF - 32) * 5 / 9LblTempS.Caption = Str(TempC)End SubPrivate Sub VsbTemp_Scroll()'Read F and Convert To C.TempF = VsbTemp.ValueLblTempF.Caption = Str(TempF)TempC = CInt(TempF - 32) * 5 / 9LblTempS.Caption = Str(TempC)End Sub

Source : Here

تم تعديل بواسطه evry1falls
0

شارك هذا الرد


رابط المشاركة
شارك الرد من خلال المواقع ادناه

  • يستعرض القسم حالياً   0 members

    لا يوجد أعضاء مسجلين يشاهدون هذه الصفحة .