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
  • Datagrid help

    help
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Oracle conection with VB.NET

    csharp oracle question
    2
    0 Votes
    2 Posts
    0 Views
    M
    You can use the Microsoft OLEDB provider for Oracle with the System.Data.OleDb objects; you can use the Microsoft native provider for Oracle with the OracleClient objects; or you can use Oracle's own .NET provider (I haven't used it so I'm not sure its object library). For OLEDB, you would use something like this code: Imports System.Data.OleDb Sub DoSomethingInOracle() '-- setup a connection string for Oracle '-- using the Microsoft OleDb provider Const kConnectionString = _ "Provider=MSDAORA.1;User ID=myUser; Password=myPass;Data Source=myServer;" Dim conn As OleDbConnection Try '--establish the connection conn = New OleDbConnection(kConnectionString) conn.Open() '--do something useful with the connection; '-- probably setup an OleDbCommand object '-- to run a query, or execute a stored '-- procedure... ... Catch ex As Exception '--do something with the exception ... Finally '--close and dispose the OleDbConnection object conn.Dispose() End Try End Sub
  • How to count character, words, sentences and paragraphs

    help tutorial question
    4
    0 Votes
    4 Posts
    0 Views
    J
    OK, this is a pretty basic example -- the way you parse words and sentences can be way more complex -- but it is a starting point... Imports System.IO Imports System.Text Public Class FileCounts Private \_text As String Private \_name As String Private \_sentences As Integer Private \_words As Integer Private \_characters As Integer Public ReadOnly Property Sentences() Get Return \_sentences End Get End Property Public ReadOnly Property Words() Get Return \_words End Get End Property Public ReadOnly Property Characters() Get Return \_characters End Get End Property Public Sub New(ByVal filename As String) If File.Exists(filename) Then \_name = filename \_readFile() \_characters = \_text.Length \_sentences = \_text.Split(".").Length \_words = \_text.Split(" ").Length Else Throw New ApplicationException("File " + filename + " does not exist") End If End Sub Private Sub \_readFile() Dim sb As StringBuilder = New StringBuilder Try Dim fs As FileStream = File.Open(\_name, FileMode.Open, FileAccess.Read, FileShare.None) Dim b(1024) As Byte Dim temp As UTF8Encoding = New UTF8Encoding(True) While fs.Read(b, 0, b.Length) > 0 sb.Append(temp.GetString(b)) End While Catch ex As Exception Console.WriteLine(ex.Message) End Try \_text = sb.ToString() End Sub End Class What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.
  • Controls at runtime

    help security tools
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Execute DOS commands on client

    csharp asp-net sysadmin help
    4
    0 Votes
    4 Posts
    2 Views
    T
    Dave, Quick correction: ping -t device_name I used greater than and less than on the first post.:zzz: Terry
  • Raise a number to a power?

    c++ tools question
    3
    0 Votes
    3 Posts
    0 Views
    R
    Thanks for that. I should have known it.... :doh: Roger Allen - Sonork 100.10016 Roger Wright: Remember to buckle up, please, and encourage your friends to do the same. It's not just about saving your life, but saving the quality of life for those you may leave behind...
  • Exchange server 5.5

    csharp sysadmin tutorial
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Winmp (2.9) & Visual Basic 6.0

    help tutorial question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • How can I capture the New Mail Event Handle?

    question
    3
    0 Votes
    3 Posts
    0 Views
    B
    Hi, Kiran Ok so you want to catch the incoming mails for SMTP services. Basically SMTP allows to write a sink class for its EventDispature to pass the meassages through it. Event architecure of a SMTP is based on COM. So firstly you need to understand the event architecture ,and related information is given in msdn. MSDN Home > MSDN Library > Messaging and Collaboration > SMTP Server so go through it.It will help you alot in implementing ISMTPOnArrival interface which i have mentioned in my first reply. This is a vast concept, so i will suggest you to go through it first , even if u find any difficulty in that itself or in implementation, i can help yoy out. But it is very necessary to go through these articals before jumping on implementation. Following are two URLs , please go through it. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/iissdk/iis/ref_mb_smtpserver.asp http://msdn.microsoft.com/library/default.asp?url=/library/en-us/iissdk/iis/ref_mb_smtpserver.asp regards, Ms.bharti
  • How to get the rows number of the datagrid

    tutorial question
    2
    0 Votes
    2 Posts
    0 Views
    U
    If you are binded with Dataset,it is easy to get number of rows. datasetvariable.Tables("Tablename").rows.count.it will work. here you will get more information. http://www.syncfusion.com/FAQ/WinForms
  • Putting a form into another form

    tutorial
    6
    0 Votes
    6 Posts
    0 Views
    G
    thank you for your help dave unfortunately i have deleted it due to the result of failure and confuse now i just plan to do normal linking coz MDI form i really dont understand im a beginner in VB if you can, can you send me a small/plain example although in planet source code have it but it is quite hard for me to understand due to the module(.bas) that is available inside if is not possible, it is ok thank you for your help and advise
  • Listview ColumnHeader Height

    csharp design tutorial question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Bootstrapper Settings Button Disabled

    csharp question
    2
    0 Votes
    2 Posts
    0 Views
    V
    Hello, Never mind my question. I was being an idiot. The Settings is only activated for the Web Bootstrapping option. Thanks! Vi
  • Deployment Question

    question csharp dotnet sysadmin tutorial
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • How can I distribute a VB.NET application

    question csharp help announcement
    3
    0 Votes
    3 Posts
    0 Views
    H
    You can get trouble if your users don't have .NET support. ---- hxxbin
  • Help me access cellphone memory & edit it

    performance help
    2
    0 Votes
    2 Posts
    0 Views
    D
    A bit more information would be helpful, like the model of the cell phone and what OS it's running. RageInTheMachine9532
  • How to create a SPARSE file in VB.NET

    csharp tutorial question
    6
    0 Votes
    6 Posts
    0 Views
    W
    I have tried this and it works beautifully. Thanks so much. I have another question... I notice when the file is sparsed I have access to that space, however, when I try to copy or delete the Sparsed file the OS treats it like a regular file. For example, instead of coping 8kb of data it tries to copy 33gb. Is there a way to view the logical size as 33gb but tell the OS to treat it as an 8kb file during these type of manipulations? Thanks, I am not sure if there is someway besig
  • How to make Excel Process close by itself

    sysadmin tutorial
    2
    0 Votes
    2 Posts
    0 Views
    D
    The Excel process won't close until your app closes. You could go through the pain of coding a subroutine that forces the process closed, but there is no reason for it. You might want to consider setting up a global Excel object for the duration of your application. That way, the resources you use in Excel are available at any time and you only keep on instance of it open. When your application quits, so does Excel. RageInTheMachine9532
  • Graphics question in VB.net

    csharp graphics question
    4
    0 Votes
    4 Posts
    0 Views
    N
    sry.. im sure u can get much better help from sum1 else, its just a matter of waiting a lil', hopefully. what image will they be placing? where is this image coming from? could you maybe post some code relating to the event? ------------------------ Jordan. III
  • Deployment Problem

    help csharp dotnet sysadmin question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied