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
  • MDI prob

    question csharp oracle help
    2
    0 Votes
    2 Posts
    0 Views
    M
    What!? #1.) There should not be a problem as long as your MDI Form's "MDIContainer" Property = True. #2.) You can't
  • Validating a VAT number

    help tutorial question
    3
    0 Votes
    3 Posts
    0 Views
    A
    First, VB doesn't use wild cards comparing strings. It also doesn't do regular expressions natively. You could use a third party regular expression control like the Regular Expression Library (http://download.com.com/3000-2070-5588590.html?tag=lst-4-10) to validate the input. The other option would be to build another string by scanning the input string and replacing each number with a # character and each letter with a % character. Then your code snippet would work.
  • MP3 Sound level detection

    csharp dotnet com question
    3
    0 Votes
    3 Posts
    1 Views
    G
    Thanks for this.. Very impressed with the nBass assembly. I have loaded the relevant file into a stream object, but don't know how to analyse the level within the stream.. Should I be looking at GetData(buf, 0) method? Graham
  • Using .dll's created in Visual C++ in VB [both forums]

    c++ tutorial csharp com
    4
    0 Votes
    4 Posts
    0 Views
    D
    dazinith wrote: still a newb.. cut me some slack I'll take this is consideration when answering your questions: dazinith wrote: hey guys, I am trying to get an idea of how I can write functions in C++ which can be used by visual basic 6 programmers.. There are several ways: the simplest form is creating a COM DLL. Not too easy for a newbie, though. dazinith wrote: im also considering switching to c#, is it easier to write dlls in c# that to learn how to in c++? Yes, much simpler: You only need to create a library project, create a class, and in project properties, you set "Register for COM interop" as true. Your DLL is now ready to go in VB 6. There are step-by-step tutorials about this on CP which show how to do this in greater detail, but this is the general procedure. It's not the fall that kills you: it's the sudden stop - Down by Law, Jim Jamursch (1986)
  • Inherits LicenseProvider

    com question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Extract required information from downloaded web pages

    html com help
    2
    0 Votes
    2 Posts
    0 Views
    H
    hi.. what do u mean with (Extract required information ):confused: ?? anyway you can use IE control and use its dhtml object model to retrieve the document elements (all anchors for example if you're making a web spider)
  • vb.net detecting changes in Textbox

    csharp help tutorial question
    3
    0 Votes
    3 Posts
    0 Views
    D
    Thanks. I have set an isdirty flag as a boolean. What i was looking for was an event for the textbox to detect the change which was the textchanged event. Everytime one of these events gets invoked, isdirty is set to true. This works for me so thank you very much for your help. :)
  • Problem of VB macro of Word 2000

    help question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • how to create n maintain a session using code behind?

    help tutorial question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • VB Debugger not working

    csharp debugging help tutorial question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • how to say this in VB?

    database data-structures help tutorial question
    2
    0 Votes
    2 Posts
    0 Views
    R
    I would make the second array an ArrayList. Dim origArray() As String = {"a", "b", "c", "d", "e", "f", "m", "z", "l"} Dim secondArray As ArrayList = New ArrayList() Dim i As Integer = 0 For i = 0 To (origArray.Length - 1) Select Case origArray(i) Case "a", "m", "l" secondArray.Add(origArray(i).ToString) Case Else End Select Next Paul Watson wrote: "At the end of the day it is what you produce that counts, not how many doctorates you have on the wall." George Carlin wrote: "Don't sweat the petty things, and don't pet the sweaty things." Unknown wrote: "I love long walks, especialy taken by those that annoy me." Paraphrased from TMNT: "Cricket? You have to know what a crumpet is to understand Cricket."
  • could not update, currently locked

    database question announcement
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Change the mouse pointer on a datagrid column

    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • Multithreading and Event handling

    data-structures help learning
    3
    0 Votes
    3 Posts
    0 Views
    B
    Thanks for the reply, maybe I wasnt too clear on my original statement. Its not that I want to handle each event seperately, it was that, I did not know how 1) make a sub handle more than one event and 2) how you do this when creating a thread from scratch. As it happens I found some thing on another site last night that showed me all I needed, I now understand a little more about dynamically creating objects and hooking things up to them etc. I did say that I was a newbie to all this:-D. I'll include what I found just in case anyone else is interested 1) you can say Sub TermEventHandler (ByVal intResult as Integer) Handles specific_instance.TermEvent anotherinstance.Termevent ... 2) To hook up the event dynamically AddHandler specific_instance.TermEvent, Addressof TermEventHandler
  • deleting a row in a datagrid

    question
    2
    0 Votes
    2 Posts
    0 Views
    B
    If I'm following you correctly, what you're wanting to do is capture the delete keypress for the datagrid. The only useful way I've found for doing this is to inherit your own datagrid and then override PreProcessMessage to check for the delete key. I use this to confirm deletion before actually carrying it out. The class looks something like this: Public Class DataGridConfirm > Inherits DataGrid Public Overrides Function PreProcessMessage(ByRef msg As System.Windows.Forms.Message) As Boolean > > > Dim keyCode As Keys = CType((msg.WParam.ToInt32 And Keys.KeyCode), Keys) ' If this is a "KeyDown" message and the key pressed was "Delete" ' then we need to verify that the user actually wants to delete ' the record by presenting a messagebox ' Win32.Msg.WM_KEYDOWN just points to an Enum: WM_KEYDOWN=&H100 If msg.Msg = Win32.Msg.WM_KEYDOWN And keyCode = Keys.Delete Then > > > > > If ((MessageBox.Show("Are you sure you want to delete?", "AppTitle", _ MessageBoxButtons.YesNo)) = DialogResult.No) Then ' They've selected no, so simply return Return True End If > > > > End If ' If the user has not canceled the request, flow into the normal ' message processing of the base control Return MyBase.PreProcessMessage(msg) > > End Function End Class After creating this class, just substitute it for the regular DataGrid your currently using. Hope that helps!
  • Serializing a strong typed collection

    help database data-structures sales
    2
    0 Votes
    2 Posts
    0 Views
    J
    Hi all I've created a solution for this problem, for who is intrested, you can find it here: http://www.codeproject.com/useritems/LeaditWebServiceWrapper.asp. Jan
  • Somone please help NullRefrence Error

    help design data-structures security workspace
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Help! How to detect/display full document path?

    help tutorial question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • DataGrid BUG? I'm a newbie

    csharp help question announcement
    3
    0 Votes
    3 Posts
    0 Views
    M
    Hi Daniel...Thanks for the reply to my post. I can either put the code in a reply or email it to you if you're curious - I ask because it is a couple thousand lines of code generated by the data wizard. If you had a suggestion of what specifically to look for, I could copy and paste it to a reply. On another note, do you know if you can 'update' (uses a merge I believe) more than one row at a time? Again thanks. Mike Thanks, Mike
  • .NET Control in VB6 disappears

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