Friday, November 20, 2009

Toolbox standar pada visual basic bagian 1

Dalam sebuah form standar project pada visual basic, pada sisi sebelah kiri terdapat kolom toolbox standar yang telah disediakan oleh visual basic. Berdasarkan gambar dibawah setidaknya ada 20 toolbox standar yang telah disediakan oleh visual basic. Apa saja toolbox tersebut dan apa saja fungsi dari toolbox standar tersebut. Mari kita bahas satu persatu.

Label

Beberapa properties yang perlu diketahui :











Name Nama dari object yang akan kita gunakan pada halaman code.
Alignment Menentukan tulisan dari properti caption yang akan tampil rata kiri, rata kanan, atau ditengah.
BackColorProperties ini akan mengatur warna backgound dari label ataupun command button. Klik pada BackColor's maka akan muncul panah kebawah, yang ketika diklik akan memberikan daftar warna yang telah disediakan oleh windows.
BackStyle Menentukan tipe background dari objek, apakah akan transparant atau tidak.
CaptionMemegang teks yang muncul command button.
EnableMenentukan apakah command button aktif. Sering kali, Anda akan mengubah properti saat runtime mengaktifkan dengan kode untuk mencegah pengguna menekan tombol.
FontMenampilkan Font kotak dialog di mana Anda dapat mengatur font tulisan nama, gaya dan ukuran.
ForeColorMenentukan warna tulisan yang akan tampil.
Height Besarnya tinggi dari command button.
Leftkoordinat posisi paling kiri dari objek terhadap form.
MousePointerMenetapkan icon pointer mouse ketika berada diatas objek.
StyleMenetapkan Command Button yang muncul sebagai jendela standar kotak dialog atau gambar grafis.
Tab indexMenentukan urutan tombol perintah pada tab urutan.
Tab StopMenentukan apakah objek ini dapat di tab atau tidak.
TopKoordinat posisi paling atas objek pada form.
Tool Tip TextAkan memunculkan deskripsi singkat dari objek ketika pointer mouse berada diatas objek.
VisibleAkan menentukan objek terlihat atau tidak.
WidthBesar lebar dari suatu objek


Command Button











Beberapa properties yang perlu diketahui :


Cancel Determines whether the command button gets a Click event if the user presses escape Menentukan apakah tombol perintah mendapat peristiwa Klik jika user menekan escape.
DefaultMenentukan jika tombol perintah menanggapi masukan dari keypress atau tidak, bahkan jika kontrol lain memiliki fokus.
EnableMenentukan apakah command button aktif. Sering kali, Anda akan mengubah properti saat runtime mengaktifkan dengan kode untuk mencegah pengguna menekan tombol.
PictureMenetapkan gambar pada background command button, ketika properti style diset pada menu grafis.
StyleMenetapkan Command Button yang muncul sebagai jendela standar kotak dialog atau gambar grafis.

Wednesday, November 11, 2009

Compass Active X control

Some properties of the compass.ocx
  • BackColor
  • BackStyle
  • BorderStyle
  • FontColor
  • LineColor
  • Linewidth
  • Value
if you want to try this active x, you can download from this compass.ocx

Tuesday, November 10, 2009

GPS active x control VB


















This active x is gpsnmea.ocx. i have tried this active x using u-blox gps receiver and in two different computer, and all running well.

In this active x, consist of two toolbox components. the first is GPS1, and the second is SatPos. GPS1 toolbox is the main control in gpsnmea.ocx, and if we use satpos toolbox, the gps1 must be use too.

This is the properties of GPS1 and SatPos toolbox



Function inside GPS1 toolbox

  • GPS1.BaudRate - Setting the Baudrate value that will use in seria lcommunication with the gps receiver.
  • GPS1.Connections - set value true to get connection with the gps receiver, and will set true as a return. Set False to disconnect the gps receiver, and will set false as a return.
  • GPS1.Get_Altitude - get the altitude data from gps receiver. the altitude is in meter.
  • GPS1.Get_Azimuth(satID) - get the azimuth information of every Sattelite tracked. satID is ID number of the sattelite.
  • GPS1.Get_CourseOverGround(index) - get the course over ground from gps receiver. index 0 to get true degree, and index 1 to get Magnetic Heading.
  • GPS1.Get_DateTime(index) - index 1 to get Date from gps, dan 0 to get time(UTC) from gps.
  • GPS1.Get_Dilution(index) - index 0 to get PDOP, 1 for HDOP, and 2 for VDOP.
  • GPS1.Get_ElevationSattelite(satID) - get the Elevation degree information of every sattelite tracked. satID is ID number of the sattelite.
  • GPS1.Get_GeoidalSeparatoion - get Geoid Seperation data in meter.
  • GPS1.Get_GPSMode - get GPS mode.
  • GPS1.Get_GPSQuality - 0 - not fix, 1 - GPS fix, 2 - DGPS fix.
  • GPS1.Get_Latitude
  • GPS1.Get_Longitude
  • GPS1.Get_MagneticVariation
  • GPS1.Get_SatteliteID(index) - index from 0 to GPS1.Get_SatteliteView-1
  • GPS1.Get_SatteliteView
  • GPS1.Get_SignalSat - get the Signal Sattelite Attenuation of every sattelite.
  • GPS1.Get_SpeedOverGround(index) - index 0 is in knot, and index 1 is in meter.
for the satpos toolbox, there are no function created. sattelite position data from gps1 will automatic display in satpos toolbox.

this is the sample of the active x
if you want to try this active x, you can download from gpsnmea.ocx
and for the sample application here.

don't forget to give your advices, critics, and comments after using this active x.