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
  • Help with wav files

    help tutorial
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Sleep not working right?

    help game-dev question
    3
    0 Votes
    3 Posts
    0 Views
    M
    Awesome! Now it works the way I want it. Thanks.
  • List box Problem

    help question
    2
    0 Votes
    2 Posts
    0 Views
    E
    1. In your Button2 click handler, write something like this: If ListBox2.SelectedItems.Count > 0 Then 'Code to move your items from ListBox2 to ListBox1 Else MsgBox("Please select an item from ListBox2") End If 2. I don't think the standard listbox supports having different fonts for its items. You may have to create your own user control for that. See example Color List Box[^].
  • Using MSCHART

    csharp dotnet com question
    3
    0 Votes
    3 Posts
    0 Views
    Z
    Oh ok, never thought about using .JPG or .GIF, I am curious on how to convert a chart into an image file.
  • API Viewer

    csharp json
    2
    0 Votes
    2 Posts
    0 Views
    H
    check http://www.mentalis.org/ it has API viewers
  • .Net framework download size

    help csharp dotnet question
    4
    0 Votes
    4 Posts
    0 Views
    I
    cnurse wrote: The thing I have in the back of my mind is to run the application which could be developed in .NET, as a web app. There would be the minimum of downloads then, and of course nobody has to work hard to keep up to date with the latest version! 8-) I only have to rollout to one location too, sounds good huh!? Web apps can be good. HREF-EXEs (also known as ClickOnce or No-Touch Deployment) look better :-) Unfortunately for you, it would seem to be best suited to corporate LANs: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vstechart/html/vbtchno-touchdeploymentinnetframework.asp[^] But in the longer term, this might be how a lot of software is deployed in future generally. Ian Darling "The different versions of the UN*X brand operating system are numbered in a logical sequence: 5, 6, 7, 2, 2.9, 3, 4.0, III, 4.1, V, 4.2, V.2, and 4.3" - Alan Filipski
  • How to make SetUP,,,Please dont UPSet me

    csharp sysadmin tutorial workspace
    3
    0 Votes
    3 Posts
    0 Views
    K
    Have a look at this Its were I went to do mine Ray
  • 0 Votes
    1 Posts
    0 Views
    No one has replied
  • No more resizing datagrid columns

    question database
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Testers Needed

    com help
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • COM Interop Attributes

    com question
    3
    0 Votes
    3 Posts
    0 Views
    J
    Thats great, thanks very much ;o) Jim
  • Problem related to Cryptography API

    help database sql-server sysadmin security
    3
    0 Votes
    3 Posts
    0 Views
    M
    CodeProject's forum code doesn't convert < and > to their HTML representation. Please post again, converting < to < and > to >, so we can see the problem.
  • Using Java Classes in VB appl.

    java question learning
    7
    0 Votes
    7 Posts
    0 Views
    D
    Of the few language conversion tools I've used, they ALL have one thing in common: They can never get all the code to convert properly, so you have to go thru and edit the resulting code anyway. RageInTheMachine9532
  • how to set path?

    help csharp database tutorial
    4
    0 Votes
    4 Posts
    0 Views
    D
    Are you absolutely sure the database file is being written to the same directory as your .EXE? RageInTheMachine9532
  • vb.net, timer, run program every 5 mins

    help csharp question
    3
    0 Votes
    3 Posts
    0 Views
    C
    Hi there :) Ok, the timers seems fine now, next prob is this: I want the program to email only if the file contains new "errors" but NOT to email if there are no new instances of the "error" word. so i wrapped the mail code in if sline <> "" then ... (mail code)...end if and it doesnt seem to mail at all now (i added errors manually to the file to check it). Could u pls tell me where im going wrong? Thanx! Imports System Imports System.IO Imports System.Collections Imports System.Web Module Module1 Sub Main() Dim myTimer As New System.Timers.Timer Dim LineNo As String myTimer.Stop() Dim CurrentLineNo As New Integer If GetSetting("OrEM", "Settings", "LineNo") = "" Then SaveSetting("OrEM", "Settings", "LineNo", "1") End If LineNo = Val(GetSetting("OrEM", "Settings", "LineNo")) Dim objReader As New StreamReader("filename") Dim sLine As String = "" Dim arrText As New ArrayList Do sLine = objReader.ReadLine() : CurrentLineNo = CurrentLineNo + 1 If CurrentLineNo >= LineNo Then If InStr(UCase(sLine), "MON") Or InStr(UCase(sLine), "TUE") Or InStr(UCase(sLine), "WED") Or InStr(UCase(sLine), "THU") Or InStr(UCase(sLine), "FRI") Or InStr(UCase(sLine), "SAT") Or InStr(UCase(sLine), "SAT") Then sLine = objReader.ReadLine() : CurrentLineNo = CurrentLineNo + 1 If InStr(UCase(sLine), "ERROR") Then arrText.Add(sLine) While sLine <> "" sLine = objReader.ReadLine() : CurrentLineNo = CurrentLineNo + 1 End While End If End If If Not sLine Is Nothing Then End If Loop Until sLine Is Nothing objReader.Close() If sLine <> "" Then 'create mail notification Dim mailMsg As New System.Web.Mail.MailMessage mailMsg.BodyFormat = Mail.MailFormat.Text mailMsg.To = "me@co.uk" mailMsg.Subject = "name" mailMsg.From = "name" Dim txtBody As String For Each sLine In arrText txtBody = txtBody & sLine & vbCrLf Next mailMsg.Body = txtBody System.Web.Mail.SmtpMail.SmtpServer = "server" System.Web.Mail.SmtpMail.Send(mailMsg) End If SaveSetting("OrEm", "Settings", "LineNo", Trim(Str(CurrentLineNo
  • Proble with VB6 and SQL server

    help database tutorial sql-server
    5
    0 Votes
    5 Posts
    0 Views
    S
    i meant u try dbConnection.ConnectionString = "UID=UserID; PWD=Pww; Provider=MSDATASHAPE;Data Source=SQLOLEDB;Initial Catalog=FC_AIRLINES;Server=yourserver" dbConnection.Open n don smile when doin it! :rose::rose: 1fm1fu
  • date time

    database question csharp sql-server sysadmin
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Editing subitems in Listview in VB.NET

    csharp tutorial
    2
    0 Votes
    2 Posts
    1 Views
    J
    By "edit" do you mean allow the user to interactively change the value of a subitem in column 2,3,...,N? Or, do you mean simply set the value of the subitem, as in ListView1.Items(0).SubItems.Item(1).Text = "X" Unfortunately, according to the .NET Framework documentation, "Unlike ListViewItem objects, ListViewItem.ListViewSubItem objects cannot be edited directly by the user"
  • Access shared folder

    question csharp
    4
    0 Votes
    4 Posts
    0 Views
    J
    If everything is in the same workgroup or domain (and the Administrator account presumably has permission to everything in the workgroup or domain) then you may simply refer to the location using the UNC path -- i.e., "\\machinename\sharename\foldername\", and you will not have to expend any additional effort with coding for file access & security permissions.
  • Excel OM Library - HELP I'm down!

    help csharp hardware tutorial
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied