Click here to Skip to main content
16,006,432 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralException comes in setpixel in VB .Net Pin
meghadwivedi17-May-05 1:44
meghadwivedi17-May-05 1:44 
GeneralMonitor 3rd party app (hooking/subclassing) Pin
Derckie217-May-05 0:53
Derckie217-May-05 0:53 
GeneralRe: Monitor 3rd party app (hooking/subclassing) Pin
rudy.net17-May-05 19:42
rudy.net17-May-05 19:42 
GeneralRe: Monitor 3rd party app (hooking/subclassing) Pin
Derckie217-May-05 21:01
Derckie217-May-05 21:01 
GeneralRe: Monitor 3rd party app (hooking/subclassing) Pin
Tim McCurdy17-May-05 23:27
Tim McCurdy17-May-05 23:27 
GeneralRe: Monitor 3rd party app (hooking/subclassing) Pin
Derckie217-May-05 23:43
Derckie217-May-05 23:43 
GeneralData Grid Control Pin
meetaqadir17-May-05 0:34
meetaqadir17-May-05 0:34 
Generalsimple datagrid code Pin
hakanaktan17-May-05 3:45
hakanaktan17-May-05 3:45 
Firstly you have to put a dataGrid inside your form, than paste the code below inside your Form1.vb page

here is the simple datagrid code:
-----------------------------------
Imports System.Data.SqlClient
Public Class Form1
Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

Public Sub New()
MyBase.New()

'This call is required by the Windows Form Designer.
InitializeComponent()

'Add any initialization after the InitializeComponent() call

End Sub

'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents Button1 As System.Windows.Forms.Button
Friend WithEvents DataGrid1 As System.Windows.Forms.DataGrid
Friend WithEvents UserControl11 As maskedTextBox.MaskeliTextBox
Friend WithEvents reportDocument1 As CrystalDecisions.CrystalReports.Engine.ReportDocument
<system.diagnostics.debuggerstepthrough()> Private Sub InitializeComponent()
Me.Button1 = New System.Windows.Forms.Button
Me.DataGrid1 = New System.Windows.Forms.DataGrid
Me.reportDocument1 = New CrystalDecisions.CrystalReports.Engine.ReportDocument
CType(Me.DataGrid1, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(480, 48)
Me.Button1.Name = "Button1"
Me.Button1.TabIndex = 0
Me.Button1.Text = "Sorgula"
'
'DataGrid1
'
Me.DataGrid1.DataMember = ""
Me.DataGrid1.HeaderForeColor = System.Drawing.SystemColors.ControlText
Me.DataGrid1.Location = New System.Drawing.Point(24, 184)
Me.DataGrid1.Name = "DataGrid1"
Me.DataGrid1.Size = New System.Drawing.Size(648, 224)
Me.DataGrid1.TabIndex = 1
'
'reportDocument1
'
Me.reportDocument1.PrintOptions.PaperOrientation = CrystalDecisions.Shared.PaperOrientation.DefaultPaperOrientation
Me.reportDocument1.PrintOptions.PaperSize = CrystalDecisions.Shared.PaperSize.DefaultPaperSize
Me.reportDocument1.PrintOptions.PaperSource = CrystalDecisions.Shared.PaperSource.Upper
Me.reportDocument1.PrintOptions.PrinterDuplex = CrystalDecisions.Shared.PrinterDuplex.Default
'
'Form1
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(704, 430)
Me.Controls.Add(Me.DataGrid1)
Me.Controls.Add(Me.Button1)
Me.Name = "Form1"
Me.Text = "Form1"
CType(Me.DataGrid1, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)

End Sub

#End Region

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim conn As New SqlConnection("Server=.;Database=pubs;uid=sa;pwd=;")
conn.Open()
Dim comm As New SqlCommand("Select * From Employee")
Dim adp As SqlDataAdapter = New SqlDataAdapter(comm.CommandText, conn)
Dim ds As New DataSet

adp.Fill(ds)
DataGrid1.DataSource = ds
End Sub
End Class

--junior coder--
Generalremote configuration file ??? and why to use vbc compilation Pin
Rizwan Bashir17-May-05 0:02
Rizwan Bashir17-May-05 0:02 
GeneralCrystal Report Landscape Mode Pin
dpagka16-May-05 23:11
dpagka16-May-05 23:11 
GeneralRe: Crystal Report Landscape Mode Pin
Tim McCurdy17-May-05 23:31
Tim McCurdy17-May-05 23:31 
Generalsearch by ID in an arraylist of object Pin
fuel2run16-May-05 21:52
fuel2run16-May-05 21:52 
GeneralRe: search by ID in an arraylist of object Pin
Colin Angus Mackay16-May-05 22:19
Colin Angus Mackay16-May-05 22:19 
GeneralRe: search by ID in an arraylist of object Pin
fuel2run16-May-05 23:05
fuel2run16-May-05 23:05 
Generalcreate a new table Pin
Anonymous16-May-05 20:38
Anonymous16-May-05 20:38 
GeneralRe: create a new table Pin
Colin Angus Mackay16-May-05 22:20
Colin Angus Mackay16-May-05 22:20 
Generaltextbox help Pin
beginnervb.net16-May-05 20:36
beginnervb.net16-May-05 20:36 
GeneralRe: textbox help Pin
Christian Graus17-May-05 12:49
protectorChristian Graus17-May-05 12:49 
GeneralCatch IE Events in vb.net app Pin
NiceTim16-May-05 19:30
NiceTim16-May-05 19:30 
Questionhow to scan Pin
Anonymous16-May-05 19:05
Anonymous16-May-05 19:05 
AnswerRe: how to scan Pin
Christian Graus16-May-05 19:24
protectorChristian Graus16-May-05 19:24 
GeneralRe: how to scan Pin
Anonymous16-May-05 20:23
Anonymous16-May-05 20:23 
GeneralRe: how to scan Pin
Mekong River16-May-05 21:44
Mekong River16-May-05 21:44 
Questionhow to scan Pin
Anonymous16-May-05 19:04
Anonymous16-May-05 19:04 
GeneralDelete single line in vb.net using shortcut key Pin
Mekong River16-May-05 17:15
Mekong River16-May-05 17:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.