Postingan

Cara baca file excel pada VB.Net

Preparation: Library: ExcelDataReader http://www.nuget.org/packages/ExcelDataReader/ Depedency SharpZipLib http://www.nuget.org/packages/SharpZipLib/ How To Create Winform Project Add     Private dsExcel As DataSet Sub BtnOpenExcelClick(sender As Object, e As EventArgs) Dim strFileExcel As String = "" If OpenFileDialog1.ShowDialog <> DialogResult.Cancel Then strFileExcel = OpenFileDialog1.FileName 'read excel File Dim stream As FileStream = File.Open(strFileExcel, FileMode.Open, FileAccess.Read) Dim excelReader As IExcelDataReader = ExcelReaderFactory.CreateOpenXmlReader(stream) 'Dim result As DataSet = excelReader.AsDataSet() excelReader.IsFirstRowAsColumnNames = True Dim result As DataSet = excelReader.AsDataSet() Application.DoEvents dsExcel = New DataSet dsExcel = result dataGridView1.DataSource = resu...

Cara membuat Android ImageView pada B4A

Gambar
Create B4A Project Go to Designer, add Image View   Generate member   this will add Sub Globals 'These global variables will be redeclared each time the activity is created. 'These variables can only be accessed from this module. Private ImageView1 As ImageView End Sub Sub ImageView1_Click End Sub Sub ImageView1_LongClick End Sub save layout and load it Sub Activity_Create(FirstTime As Boolean) 'Do not forget to load the layout file created with the visual designer. For example: Activity.LoadLayout("Layout1") End Sub Add image file        add your code Sub Activity_Create(FirstTime As Boolean) 'Do not forget to load the layout file created with the visual designer. For example: Activity.LoadLayout("Layout1") ImageView1.Bitmap = LoadBitmap(File.DirAssets, "hardware.png") ImageView1.Tag=File.DirAssets & "hardware.png" End Sub Sub ImageView1_Click Log ("You Clicked " & ImageView1.Tag...

Cara membuat Android Listview pada B4A

Gambar
Create B4A Projecty G to designer, addview ListView   generate member   This will add Sub Globals 'These global variables will be redeclared each time the activity is created. 'These variables can only be accessed from this module. Private ListView1 As ListView End Sub Sub ListView1_ItemClick ( Position As Int , Value As Object ) End Sub Sub ListView1_ItemLongClick ( Position As Int , Value As Object ) End Sub save your Layout and load it Sub Activity_Create ( FirstTime As Boolean ) ' Do not forget to load the layout file created with the visual designer. For example : Activity.LoadLayout ( "Layout1" ) End Sub Add your code Sub Activity_Create ( FirstTime As Boolean ) ' Do not forget to load the layout file created with the visual designer. For example : Activity.LoadLayout ( "Layout1" ) ListView1.AddSingleLine2 ( "Sunday" , 1 ) ListView1.AddSingleLine2 ( "Mon...