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
  • Events with an MTS COM object.

    database com sysadmin help
    2
    0 Votes
    2 Posts
    2 Views
    K
    I don't know what the problem might be, but one thing I can tell you is that your design is simply disastrous for n-tier applications. "WithEvents" is just not meant to be used that way. Look at the COM+ event system or redesign your app using interface callbacks or something like that. ___________ Klaus [www.vbbox.com]
  • Drawing things

    graphics help
    4
    0 Votes
    4 Posts
    5 Views
    K
    "As New" has no speed benefit and it can actually be dangerous in some cases. Declaring the variable and then using "Set x = New Y" is exactly the same thing and is a better coding practice. What you're trying to explain here (I think) is that late binding (Dim x As Object) is far slower than early binding or semi-late binding. ___________ Klaus [www.vbbox.com]
  • As Any Data Type

    visual-studio algorithms
    3
    0 Votes
    3 Posts
    5 Views
    K
    I am searching for insight on the relative benefits / downsides to using the "As Any" data type in VB. My assumption is that CPU cycles are taken in order to resolve the data types at runtime vs. the use of a stronger type declaration, but I have no numbers telling me that is the case. Any insight appreciated Au contraire. VB will do no type checking on an "As Any" variable (although it still needs to figure out what it's passing in order to know how to pass it). I don't think you need to worry about CPU cycles here. It's better to worry about how "As Any" will impact your code readability. If you have an API that takes one or more "As Any" arguments, is it always clear what, how and why you are passing what you're passing? As Any is mainly useful for APIs with arguments like lParam in SendMessage that can be basically anything. Always strong type if you can, but avoid the "multiple overloads" mess for an API (like so many people do with SendMessage). ___________ Klaus [www.vbbox.com]
  • CoInitialize has not been called

    help com json
    5
    0 Votes
    5 Posts
    6 Views
    K
    I used API createThread before in VB6 without any problem but I think my problem come from using an another many AvtiveX objects under the thread function and these objects need to initialize,but how these objects initialize in VB. best regards. It doesn't matter -- if it worked before it's just because you were lucky. If you want to learn how to do threads correctly in VB go out and buy Matt Curland's new book ___________ Klaus [www.vbbox.com]
  • DAO

    performance question
    2
    0 Votes
    2 Posts
    2 Views
    F
    Hi 1) Yes DAO is available in VB 5 . ofcorse in VB 4 , DAO was the prefered way of working with databases . but why not to consider ADO which is also avaialbe under VB 5 2) I add another method , text file access as a OLEDB data source . it is a very convinient task using DAO . you will have all the luxery of ADO and Recordset in your program without a single line of code . I think it is more important to considet parsing speed of your file ( spliting in collections , sorting , ... ) than just reading speed . using ADO you can use ADODB::Recordset as a collection with sorting/parsing/searching capabilities . there is a great article on this topic in MSDN . 3) using VB code for parsing , searching or sorting is not as fast as you might desire . besides you have to do it all in your code . 4) Using DAO recordsets is a good choice too . but again you have to read the text file and parse as different fields , then write into recordset . use ADODB::Recordet to eliminate all these steps . I hope it would be of help
  • Changing the clipboard from VB for applications?

    question help
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Multi language

    question design tools
    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • Directx Immediate Mode Visual Basic

    graphics game-dev help
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • String

    c++ help question
    4
    0 Votes
    4 Posts
    1 Views
    L
    Your method is "void SegundoError([out] BSTR my_string)" [out] parameters must always be pointers, so your method should be method: "void SegundoError([out] BSTR *my_string)" Hope it helps! ;)
  • Code Editor for VB

    2
    0 Votes
    2 Posts
    0 Views
    C
    The problem is that it would be a real pain to reproduce the behaviors of the dropdowns n' such... :) However it wouldn't be hard for you to code an ad-in thing-IE (pun intended) to handle that as a floating_window/toolbar/menu using a custom CommandBar or two... perhaps also utilizing the WebBrowser control. The key is to check out what you get a grip on when you create a new 'add-in' project, by looking in the object browser. CodeCrafty® nauhaus@swbell.net
  • Resource limits??

    com css help question learning
    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • VB COM Testing

    com testing beta-testing tools performance
    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • start options of MS IE5.5

    javascript question learning
    2
    0 Votes
    2 Posts
    2 Views
    L
    Check out the "Kiosk" mode of IE. It will probably do what you want.
  • Capture the key hit

    4
    0 Votes
    4 Posts
    0 Views
    L
    Try searching for vb sample projects called KeyLogger. The works are pretty much the same.
  • Excel formulae

    help question career
    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • right click and refresh

    help json tutorial question announcement
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • mail attach

    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • Get selected row from a DBGrid control

    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Pages in tif Image

    question
    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • pivot table

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