Download Infragistics NetAdvantage 2010 v2 here.

NOTE: This is for window forms only. 

Visit Infragistic here or in this link.

Blog: http://www.infragistics.com/community/blogs/
Forum: http://www.infragistics.com/community/forums/

DISCLAIMER: This is a crack version of Infragistics Winform 2010. I do not own this copy. I just downloaded it from a file sharing website.


I entertain questions and do tutorial for your questions as well. Just leave a comment. Share this and have a happy coding. Cheers! :D

 
This is a simple technique on how to add an external application on your MDI form as a child. First you have to have MDI form, a button to trigger the event and a panel which will host the embedded application. You have to import first the references.
#VB.NET
Imports System
Imports System.IO
Imports System.Text
Imports System.Diagnostics
Imports System.Drawing
Imports System.Data
Imports System.Windows
Imports System.Windows.Forms
Imports System.Runtime.InteropServices
Imports System.Threading

#CSharp
Using System;
Using System.IO;
Using System.Text;
Using System.Diagnostics;
Using System.Drawing;
Using System.Data;
Using System.Windows;
Using System.Windows.Forms;
Using System.Runtime.InteropServices;
Using System.Threading;

Then after that, you have to declare the necessary functions. 
    <DllImport("User32", CharSet:=CharSet.Auto, ExactSpelling:=True, SetLastError:=False)>
    Public Shared Function SetParent(ByVal hWndChild As IntPtr, ByVal hWndParent As IntPtr) As IntPtr
    End Function

    Private Declare Function FindWindow Lib "user32.dll" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Integer

    Public Shared Function SendMessage(ByVal hWndChild As IntPtr, ByVal Msg As Int32, ByVal wParam As Int32, ByVal lParam As Int32) As IntPtr
    End Function
The main code for the triggered event is this:
#VB.NET        Dim proc As Process

        proc = Process.Start("notepad.exe")        ' or this proc =     Process.Start("winword.exe")
        'proc.StartInfo.WindowStyle = ProcessWindowStyle.Normal
        proc.WaitForInputIdle()
        Thread.Sleep(1000)
        SetParent(proc.MainWindowHandle, Me.Panel1.Handle)

        SendMessage(proc.MainWindowHandle, 274, 61488, 0)
        proc.WaitForExit()

#CSharp    
        Process proc

        proc = Process.Start("notepad.exe");        ' or this proc =                                            Process.Start("winword.exe");
        'proc.StartInfo.WindowStyle = ProcessWindowStyle.Normal();
        proc.WaitForInputIdle();
        Thread.Sleep(1000);
        SetParent(proc.MainWindowHandle, Me.Panel1.Handle);

        SendMessage(proc.MainWindowHandle, 274, 61488, 0);
        proc.WaitForExit();
Hope you find it helpful. Dont forget to like, comment and share. Happy coding. Cheers! :D

 
vbnet2010ebook.part06.rar
File Size: 1500 kb
File Type: rar
Download File

This is the part 6 of the e-book below. I forgot to include this part on the latter post. :D
 
This is an e-book for those beginners in VBnet 2010 who wants to learn something about this language.

I do not own this ebook. I just downloaded this from file sharing websites. 

Download all parts of the e-book and learn each part.

If you find this helpful, please leave a comment, like the post and share. Happy coding.. :D
vbnet2010ebook.part01.rar
File Size: 1500 kb
File Type: rar
Download File

vbnet2010ebook.part02.rar
File Size: 1500 kb
File Type: rar
Download File

vbnet2010ebook.part03.rar
File Size: 1500 kb
File Type: rar
Download File

vbnet2010ebook.part04.rar
File Size: 1500 kb
File Type: rar
Download File

vbnet2010ebook.part05.rar
File Size: 1500 kb
File Type: rar
Download File

vbnet2010ebook.part07.rar
File Size: 225 kb
File Type: rar
Download File

 
Functions returns a value/statement/datatable,etc when it is being triggered. This is a sample of function that returns a datatable :

    Public Function Get_records() As Data.DataTable
        Try
            Dim sSQL As String = "SELECT * FROM tenant_management.tbluser WHERE active = 'Y'"

            Dim myDA As New MySqlDataAdapter(sSQL, myCon)
            Dim dsData As New DataSet()

            myDA.Fill(dsData, "Data")

            Return dsData.Tables("Data")

            myCon.Close()

        Catch ex As Exception
            myCon.Close()
            Throw

        Finally
            myCon.Close()
        End Try
    End Function

This can be used in a class or in your winform. 

"mycon" in this function is my connection which should be assigned a connectionstring. 


To call this function, you should assign your grid's datasource property to this function which returns a datatable. 

If you are using a  class, the syntax of assigning the datasource should be like this:

        Dim getClass As New Classname()
        grd.DataSource = getClass.Get_records

if you are not using a class and you just use the function in the winform, the syntax should be like this:

        datagrid.DataSource = Get_records

The bottomline is: you can use your function anytime you want. You just simply call the function instead of coding again the whole content of the function.
 
ebook_-_visual_basic_-_vb.net_step_by_step.rar
File Size: 1587 kb
File Type: rar
Download File

I do not own this ebook. I just downloaded this from file sharing websites. 

If you find this helpful, please leave a comment, like the post and share. Happy coding.. :D
 
In this tutorial i will teach you about image retrieving and saving using vb.net and MySql. To do this in C# is so simple. Remember that C# and Vb.net are all running in the same framework, only the syntax may vary. 

In this scenario i am using MySql , Visual Studio 2010 and Infragistics. To know more about infragistics follow this link http://www.infragistics.com/ . Infragistics let's you as developer make things so easy and hassle free. I am using Infragistic 10.2 for this. Anyway you can use any infragistic winform all you have to do is to upgrade this project. 

To start this project, I'd created a database 

sample  CREATE TABLE `sample` (                 
          `idno` VARCHAR(15) NOT NULL,          
          `userimg` LONGBLOB,                   
          PRIMARY KEY (`idno`)                  
        ) ENGINE=INNODB DEFAULT CHARSET=latin1  


This simple exercise will be like this :


This would be the first thing to do. As you can see i have a grid with the images on it, upload and save button and 2 picture boxes which will hold the previews upon upload and grid preview. 
Picture
The 2nd phase is this. Upon clicking on the upload button, and opendialog box should appear. 















The open dialog box should be filtered into images only and this is how to do that. 
OpenFileDialog.Filter = "JPEG (*.jpg;*.jpeg)|*.jpg|PNG (*.png)|*.png" . If you want to filter all files, etc, all you have to do is to change the filter string. 



Picture
Saving image into MySql is easy. All you  have to do is to have an long blob datatype for the DB and then convert the image into byte. 

  
















    Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click
        Try
            Dim cmd As New MySqlCommand
            Dim SQL As String
            Dim rawData() As Byte
            Dim fs As FileStream

            fs = New FileStream(fullPath, FileMode.Open, FileAccess.Read)
            rawData = New Byte(fs.Length) {}
            fs.Read(rawData, 0, fs.Length)
            fs.Close()
            con.Open()

            SQL = "INSERT INTO user.sample(idno, userimg) VALUES('" & txtID.Text & "', ?bin_data)"

            cmd.Connection = con
            cmd.CommandText = SQL
            'cmd.Parameters.Add("@bin_data", rawData)
            cmd.Parameters.Add(New MySqlParameter("@bin_data", rawData))
            cmd.ExecuteNonQuery()
            MsgBox("Successfully saved!")
            pBox.BackgroundImage = Nothing
            grd.DataSource = previewme()
            con.Close()
        Catch ex As Exception
            con.Close()
            MsgBox(ex)
        End Try
    End Sub



This is where infragistics makes your project easy. In the grid_initializelayout event all you have to do is to set the "image" column into style = image:                        Case "userimg"
                            .Header.Caption = "User Image"
                            .Width = 50
                            .Style = Infragistics.Win.UltraWinGrid.ColumnStyle.Image


On the preview button part, i had set a 'preview' field on my query and set the field column into button in grd_initializelayout. 

//query

        "SELECT 'Preview' as action, idno,userimg FROM user.sample"

//layout
                        Case "action"
                            .Header.Caption = "Action"
                            .Width = 80
                            .Style = Infragistics.Win.UltraWinGrid.ColumnStyle.Button
                            .CellAppearance.TextHAlign = Infragistics.Win.HAlign.Center
                            .CellAppearance.TextVAlign = Infragistics.Win.HAlign.Center
                            .CellAppearance.ForeColor = Color.Blue


Download the whole source code here:

imagesaving.rar
File Size: 118 kb
File Type: rar
Download File

If this exercise helped you, don't forget to share, comment and like :) 

HAPPY CODING :D Cheers!!! 
 
 
FOR THIS SCENARIO : 

[ MENU ]

----------------------------------

[a] + (Addition)

[s] − (Subtraction)

[m] × (Multiplication)

[d] / (Division)

Enter Choice: m

How many numbers to multiply: 5

Enter num1: 2

Enter num2: 3

Enter num3: 5

Enter num4: 2

Enter num5: 5

PRODUCT : 300.

 Create a program that would solve arithmetic operations of numbers. The user will choose which arithmetic operation to do and how many numbers to compute. 

VB.net

         Try
            If cmbMenu.Text = String.Empty Or txtNo.Text = String.Empty Then MessageBox.Show("No parameters!") : Exit Sub
            Dim varA(txtNo.Text) As Double
            Dim i As Double : Dim varB As Double

            For i = 0 To txtNo.Text - 1
                varA(i) = InputBox("Enter Amount " & (i + 1), "Input")
                If i = 0 Then
                    varB = varA(i)
                Else
                    Select Case cmbMenu.Text
                        Case "s"
                            varB = varB - varA(i)
                        Case "m"
                            varB = varB * varA(i)
                        Case "a"
                            varB = varB + varA(i)
                        Case "d"
                            varB = varB / varA(i)
                    End Select
                End If
            Next
            MessageBox.Show(varB, "Result")
        Catch ex As Exception
            Throw ex
        End Try



C# ( CSharp) .Net


         try
            {
                if (cmbMenu.Text == string.Empty | txtNo.Text == string.Empty)
                {
                    MessageBox.Show("No parameters!"); return;
                }
                double[] varA = new double[Convert.ToInt32(txtNo.Text) + 1];
                int i = 0;
                double varB = 0;

                for (i = 0; i <= Convert.ToInt32(txtNo.Text) - 1; i++)
                {
                    varA[i] = Convert.ToDouble(Interaction.InputBox("Enter Amount " + (i + 1), "Input"));
                    if (i == 0)
                    {
                        varB = varA[i];
                    }
                    else
                    {
                        switch (cmbMenu.Text)
                        {
                            case "s":
                                varB = varB - varA[i];
                                break;
                            case "m":
                                varB = varB * varA[i];
                                break;
                            case "a":
                                varB = varB + varA[i];
                                break;
                            case "d":
                                varB = varB / varA[i];
                                break;
                        }
                    }
                }
                lblRes.Text = Convert.ToString(varB);
            }
            catch (Exception ex)
            {
                throw ex;
            }

On C#, don't forget to add reference Microsoft.Visualbasic. It is for the inputbox since C# doesn't have inputbox function.


Don't forget to leave a comment or buzz me up if this code helped you.. cheers :D .. Happy Coding.
Choice Vb.Net
File Size: 66 kb
File Type: rar
Download File

Choice Csharp (C#)
File Size: 39 kb
File Type: rar
Download File

 
This is a simple data charting representation sample and simple datatable creation using C# and infragistic V10.2. Chart plays a big role in data representation for executives such as creating dashboards or revenue and census representation. I hope this simple sample program could help you on your charting issues. Don't forget to like, share and comment . Cheers! :D -ciao 


project112.rar
File Size: 52 kb
File Type: rar
Download File