Override

Override is one of  feature in OOP (Object Oriented Programming) that allows child use same name when create a method with parent even the method provide different implementation inside.

For example we create class ‘parent’ and ‘child’ that have same function, like code bellow:

Class Parent{

Function Size(){

return 3;

}

}

 

Class Child extends{

Function Size(){

return 2;

}

}

When we instantiation class parent and call function Size, we will get 3 but when we Instantiation class child and call function Size, we will get 2 even in code class Child extends class Parent

Run-time error ’13’ : Type mismach

download (2)how to solve this problem, before we solve this problem we must know why this problem happen?

the problem happen because there are not match value betwen variabel type and value that fill to variable.

for example we create varible with name sum and type is double, after that we fill sum with character. when you run the application the arror will be show.

so to solve it, we make sure type of variable that we create before fill value to it.

How To Add Items ComboBox in VB 6

download (2)In Visual Basic 6 there are many object can we use to developt program that we want to built. One of it is combobox, combobox is object that provide data as list when we click the data that we set will be show and we choose one data of much data in the list for process in the future.

So how the wat to set data in the object of combobox? Its will become the main question for us. There are 2 ways to set data in the object of combobox, here are:

First ways

  1. After you pairs the combobox on the form, move to code area and choose event that you want the data will be set, usually set data in the object set when form loaded.
  2. After that to add item you just code like this :

box.AddItem item[, index]

Note:

Box is Name of combobox that you pairs in your form

AddItem is function of this object to add item

item[, index] is name would appear in the list

 

for example :

Private Sub Form_Load ()

Combo1.AddItem "Muhamad"

Combo1.AddItem "Ade"

Combo1.AddItem "Lukmanul"

Combo1.AddItem "Hakim"

End Sub

 

Second ways

  1. If we dont want spend effort to write code, we can use the properties GUI to add item to the combobox, choose the object of combobox
  2. Looking up to properties area, usually in the right side of vb6. And search the List attribute. Like in the imagelist
  3. After that you just click that atribut and type the data want you add, enter to make sure the data entered

Sort Data MSFlexGrid in VB6

download (2)MSFlexGrid is an object in vb6 to show data that we set. Data that show actually can sort if we click the every column in the MSFlexGrid Object. MSFlextGrid have an function for sort the data according the column that we click. it can ascending or descending. the function is flexSortStringAscending, flexSortGenericAscending, flexSortNumericAscending and flexSortStringDescending, flexSortGenericDescending, flexSortNumericDescending.

how to use:

example :

MSFlexGrid.sort = flexSortNumericDescending (for descending)

MSFlexGrid.sort = flexSortGenericAscending (for ascending)

Class And Object

Ada beberapa istilah dalam OOP (Pemrograman Object Oriented) dian taranya yang sangan fundamental adalah class dan object, jika kita ibaratkan class adalah sesuatu yang paling umum yang dapat di miliki sifatnya oleh sesuatu yang berbeda  akan tetapi sebenarnya sama dari segi sifat yang dimilikinya.

Contoh kasusnya sebagai berikut, kita kenal apa itu binatang. binatang memiliki kaki, mata, tempat tinggal, alat pernafasan dan  makanan. nah itu sifat secara umum yang dimiliki oleh binatang. tapi setiap binatang memiliki jumlah kaki yang berbeda, alat pernafasan yang berbeda. oleh karena itu binatag yang kita harus membuat nama dari setiap binatang itu untuk mengetahui secara detil perbedaan perbedaaan yang dimiliki oleh setiap binatang. contoh kita sebut Binatang Ayam dan Binatang Kucing. Ayam dan Kucing adalah Object yang dibuat dari class Binatang.

About SQL Experience

downloadwhen the first time I learned about SQL in my campus. I had 2 subject and 2 semester to learnd this subject that are Basis Data and Sistem Basis Data. so what I get in the subjects?

in Basis Data I learned SQL in MySql and Colaborate with PHP, as you know.. it is very very usefull when we make web aplication with have data in database that used with that aplication. all of case just select, insert, delete and create thats enaugh to make an application. I thing thats anough to be a maker of application. after that I learned Sistem Basis Data, I learned logic in SQL, use Oracle I learned created Prosedure, view, function and etc. and I think thats useless because I  never use it in out of class. but when I work it used in the logic in SQL it is usefull for a big application. so now I realise that what we learned in the class will usefull when we found the problem.

so when you think what you learned not helpfull in your life that cause you have not yet found problem who solved with the case.

so I think, learned what you get in the class seriously until you understand. beacuse sure it will help you in the future.