Skip to content

Visual Basic

Visual Basic Questions

This category can be followed from the open social web via the handle visual-basic@forum.codeproject.com

34.4k Topics 120.1k Posts
  • Microsoft Word 2000 from the Web

    question help
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Button Sizes

    help
    2
    0 Votes
    2 Posts
    0 Views
    H
    the default units are twips not pixels if you want to use pixels set the Form's Scalemode property to Pixels.. then set Width, height for the button to 75 , 23
  • HTTPWebRequest

    tutorial help question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Exiting from a menu

    question visual-studio debugging
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Retreving an auto number field from Access

    csharp database question
    2
    0 Votes
    2 Posts
    0 Views
    B
    This is a text app I whiped up. The Button1_Click works and Button2_Click does not. You have to get the value before the connection is closed. Private m_connection As OleDb.OleDbConnection Private m_connectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Password="""";User ID=Admin;Data Source=" Protected Overrides Sub OnLoad(ByVal e As System.EventArgs) MyBase.OnLoad( e ) m_connectionString &= HunterDev.Environment.GetUserFolderPath( SpecialFolders.Personal ) & "\db1.mdb" End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If ( m_connection Is Nothing ) Then m_connection = New OleDb.OleDbConnection( m_connectionString ) End If Dim command As New OleDb.OleDbCommand( "INSERT INTO Sample ( Name ) VALUES ( '" & TextBox1.Text & "' )", m_connection ) Dim idCommand As New OleDb.OleDbCommand( "SELECT @@IDENTITY", m_connection ) If ( m_connection.State <> ConnectionState.Open ) Then m_connection.Open() End If command.ExecuteNonQuery() Dim id As Integer = CInt( idCommand.ExecuteScalar() ) If ( m_connection.State <> ConnectionState.Closed ) Then m_connection.Close() End If TextBox2.AppendText( id.ToString() & vbCrLf ) End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Dim idCommand As New OleDb.OleDbCommand( "SELECT @@IDENTITY", m_connection ) If ( m_connection.State <> ConnectionState.Open ) Then m_connection.Open() End If Dim id As Integer = CInt( idCommand.ExecuteScalar() ) If ( m_connection.State <> ConnectionState.Closed ) Then m_connection.Close() End If TextBox2.AppendText( id.ToString() & vbCrLf ) End Sub Bo Hunter
  • VB.Net- C# integration

    csharp asp-net tools question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • VBA help!

    help
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Unable to import system.io

    question
    2
    0 Votes
    2 Posts
    0 Views
    N
    :confused: AFAIK, System.IO is in either the mscorlib or the system Assembly, so it's already added in for you. Just type imports System.IO to use it. Nick Seng (the programmer formerly known as Notorious SMC) God, I pity me! - Phoncible P. Bone
  • Hashtable

    csharp asp-net tutorial question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Windows API related problem

    c++ json help question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Install TCP/IP

    tutorial question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Property or Mehod ?

    com tools tutorial question
    2
    0 Votes
    2 Posts
    0 Views
    H
    in COM ,, a property is actually a pair of functions I think you should properties. they make sense..
  • Crystal Reports Developer 8.5

    question csharp help announcement
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Windows Form Datagrid

    database question css
    2
    0 Votes
    2 Posts
    0 Views
    P
    Hi There What does your code look like, if I use the following the grid immediately shows all the data (I think it may be from using a DataTable or not?) Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim oDA As SqlClient.SqlDataAdapter Dim oCon As SqlClient.SqlConnection = New SqlClient.SqlConnection Dim oTBL As DataTable = New DataTable oCon.ConnectionString = "Initial Catalog = Northwind;Data Source = (local);uid = sa;pwd=;" Try oCon.Open() Catch ex As Exception MessageBox.Show(ex.ToString) End Try oDA = New SqlClient.SqlDataAdapter("Select * from Customers", "Initial Catalog = Northwind;Data Source = (local);uid = sa;pwd=;") oDA.Fill(oTBL) Me.DataGrid1.DataSource = oTBL End Sub Regards Peet Schultz
  • sleep method in .Net

    csharp help tutorial question
    4
    0 Votes
    4 Posts
    0 Views
    J
    The Sleep() API does the exact same thing - in fact, System.Threading.Thread.Sleep() just calls the Sleep() API. "Blessed are the peacemakers, for they shall be called sons of God." - Jesus "You must be the change you wish to see in the world." - Mahatma Gandhi
  • ON-LINE PROGRAMMING USING RS232

    json help
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • view .pdf file in VB.NET windows form

    csharp adobe question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • C# -&gt; VB.NET port request

    csharp learning
    3
    0 Votes
    3 Posts
    0 Views
    W
    I'll do it. Mail them to wcoonrod@visi.com
  • saveas dialog box

    help tutorial question
    2
    0 Votes
    2 Posts
    1 Views
    L
    Click Project, Components... and add "Microsoft Common Dialog Control 6.0". Add one of these to your form, and it ready to be used. Look here[^] for more info. Paul ;) I could put a quote here, but someone would just steal it. Murphy
  • Using button and checkbox

    help
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied