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
  • calling myclass subs

    csharp help
    2
    0 Votes
    2 Posts
    0 Views
    D
    First, your myClass doesn't have a PrintWord method, unless there is extra code in there your not showing us. Also, from the code you have shown us, myClass is a keyword and can't be used as the name of a class. Plus, your class can be greatly simplified like this: Public Class testClass Public Function add(ByVal num1 As Integer, ByVal num2 As Integer) As Integer Return num1 + num2 End Function End Class Second, we need to see line 60 of Form1.vb and the code surrounding it to be able to tell you what is going on. RageInTheMachine9532
  • 0 Votes
    4 Posts
    0 Views
    D
    OK. Then when you parse the string (TargetString=...). Check to see if the array that is returned has 2 elements in it. If not, then you have to go back and read the next line and append it to the one you already have, then parse it again and it should work. Thing is, this will only work if you have 1 question and 1 answer per line or two. If the second line contains the rest of a question, then and answer, then starts another question, you'll run into problems. I know '*' comes between a question and its answer, but is there a second seperator that appears between answer followed by a question? RageInTheMachine9532
  • Speech To Text

    help
    4
    0 Votes
    4 Posts
    0 Views
    D
    Well, SAPI 5.2 is the foundation of the Speech Application SDK, but version one of this SDK is at Beta 3 right now. You can try it out by following the Getting Started for First-Time Users here[^]. There is also a pretty decent tutorial on it here[^]. I haven't used it myself, but I tried out the tutorial with no real problems. RageInTheMachine9532
  • help with spliting:still didn't get a help

    csharp help question
    2
    0 Votes
    2 Posts
    0 Views
    P
    I assume you know how to put the item into the list box. to split the string you can you String.Split or you can use Instr(), Left(),Mid(), and Right(). Dim pos As Integer Dim lstr As String Dim rstr As String Dim str As String str = "track 01 (2.33)" pos = InStr(str,"(") If pos <> 0 Then lstr = Left(str,pos) rstr = Right(str,Len(str)-pos) good luck
  • VB.NET - generate reports

    question csharp sales tutorial
    2
    0 Votes
    2 Posts
    0 Views
    M
    Hi Sean. You could use a dedicated report control, like Crystal Reports for this. You could also investigate the PrintDocument class - to print a customer order, you could either sub-class PrintDocument or add your own event handler to respond to the PrintDocument's PrintPage event. The .NET SDK documentation has some examples.
  • .NET Deployment Errors

    xml csharp dotnet visual-studio
    3
    0 Votes
    3 Posts
    0 Views
    W
    They are getting errors on MSSOAP30.DLL and MSXML4.DLL. The errors say "COM Object with CLSID = "...."... unable to register. When the client tries to register the DLL's manually (those that were copied during the install into the app's subdirectory) the REGSVR32 reports a "no entry point" error. I am assuming that the DLL's do "get into the .MSI" because they are copied to the target machine during the install. What am I missing?
  • HELP NEEDED WITH REGEX

    regex help
    2
    0 Votes
    2 Posts
    0 Views
    H
    A regular expression to do this (mostly because of the 3 out of 4 clause, would be incredibly long and would require intensive CPU time and quite a bit of memory. I would recommend that you instead create a custom validator that enumerates the characters and keeps a count, something like this: ' Assume password is in a string variable called "password" If password.Length < 8 Then Return False Dim i As Integer = 0 Dim b1 As Boolean Dim b2 As Boolean Dim b3 As Boolean Dim b4 As Boolean For Each c As Char In password If Char.IsLetter(c) Then If Char.IsLower(c) And Not b1 Then b1 = True i++ Else If Not b2 b2 = True i++ End If Else If Char.IsNumber(c) And Not b3 Then b3 = True i++ Else If (c = "*"c Or c = "%"c Or c = "$"c) And Not b4 Then b4 = True i++ End If Next If i >= 3 Then Return True Else Return False -----BEGIN GEEK CODE BLOCK----- Version: 3.21 GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++ -----END GEEK CODE BLOCK-----
  • Program needs to have focus full time

    help
    2
    0 Votes
    2 Posts
    0 Views
    D
    First, your Application never really has the focus. It's title bar changes color because one of it's child controls has the focus. A form is nothing but a control, but a control that can contain other controls. Individual controls get and lose focus. Its a pain to manage if your trying to retain the input focus to just your app (form). You have to keep track of which control actually has the focus and if none of your child controls has the focus anymore, which control do you give it back to? A better way would be to redo the form(s) your using and show them as system modal dialog boxes. This way, Windows manages the focus for you and you can't leave the app until the dialog box goes away. Search the documentation for ShowDialog to see what I mean. Your app needs to have the focus all the time? Why? It kind of make using the rest of the system a pain to use if you can't so much as click on the "Start" button... RageInTheMachine9532
  • Palindrome help.

    help css
    11
    0 Votes
    11 Posts
    0 Views
    M
    Ian Darling wrote: Equality *and* assignment are both '=' in VB. There ya go. At least I can say with full cliche in tow, "I learn something new every day." I'll stick with C# and Java, thank you. Best wishes! :-O Regards, MarkC# --------- .Net Head
  • sending a message from one machine to the other in LAN ......

    linux help question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Databinding problem

    help csharp database question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Cycle through multiple panels

    question csharp database tutorial
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • SQL return zeros

    database game-dev
    3
    0 Votes
    3 Posts
    0 Views
    L
    That would only retrieve months with zero expenditures. I want both months with zeros and months with amounts > 0 in one table.
  • Tracking WebPage Loading on IE through VB

    database com help
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Why does VB6 append Ctl to my OCX library name

    question c++ tutorial
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • 0 Votes
    2 Posts
    0 Views
    T
    I always rely on the old task manager. If you watch closely you'll be able to see how much you are muncing (It works for me in C++,VB and C#) I managed to find memory leaks and so. Other of that I dont know any tools to do the job. I hope this helps. The warlord
  • display rtf text in diff colors

    help question
    3
    0 Votes
    3 Posts
    0 Views
    T
    You need to encode your string manually with rtf codes as far that I know The warlord
  • Programmatically create a form using VBA

    help tutorial question
    3
    0 Votes
    3 Posts
    0 Views
    T
    How about Dim txt as textbox MyForm.Controls.Add(txt) The warlord
  • How do I make menu flat

    graphics question csharp visual-studio help
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Run-time error '91':

    help question
    4
    0 Votes
    4 Posts
    0 Views
    D
    You could probably take the shotgun approach to killing the problem(s) by installing the latest MDAC from Microsoft. You can find that here[^]. RageInTheMachine9532