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
  • complicated question re editing datagrid

    help question css announcement
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • 0 Votes
    1 Posts
    0 Views
    No one has replied
  • Real HDD serial number

    tutorial question
    5
    0 Votes
    5 Posts
    1 Views
    X
    Thank ok, thank you the same :)
  • Setting printer options in client machine

    csharp help
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • calling other dlls

    question tutorial
    2
    0 Votes
    2 Posts
    0 Views
    I
    Look at the documentation for the Declare statement in the MSDN Library. If you are using VB6, look at this[^] If you are using VB.Net, use this[^] -- Ian Darling
  • VB COM Book

    com question announcement learning
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Please Help: Addin for Visual Studio.NET

    csharp visual-studio tools help
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Functions - Parameter Passing

    tutorial question
    5
    0 Votes
    5 Posts
    0 Views
    R
    Sorry for not responding dude, but really now.... There are examples on how to create/call functions in VB everywhere. Just download just about any sample VB code and you will see a sample of how to write and consume a function. I did not answer this question because I felt that it was asked by someone that clearly needed to do some looking around themselves on the subject. Sorry... Looking at the responses that you did get and what you found on your own you got the concept. Just please remember that no one here OWES anyone an answer. Just as a personal note… I hate function that have byref arguments. They are used alot in the Windows world and I still hate them. IMHO functions take in arguments and return a value. That is the pure way of thinking about it. When you use a function you always think of it as: returnValue = FunctionName(arg1, arg2, … argn) And the function looks as follows: <scope> Function FunctionName(arg1 As Type, arg2 As Type, … argn As Type) As ReturnType 'define the return value to use Dim retVal as ReturnType 'perform what ever calculations you need to do 'set the return value retVal = answerToCalculation Return ReturnType 'if you are using VB.NET FunctionName = answerToCalulation 'if you are using VB6 End Function The number of input args are up to what you need, and it is very clear as to what is being returned and where. Using ByRef is called output arguments. I don't like them at all. X| As I see it, if the returned values does not end up on the left side of a function call then it is not a function, it is a Subroutine. 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."
  • Resolution Or Screen Area :confused:

    help question
    3
    0 Votes
    3 Posts
    0 Views
    X
    would something like this work in VB.Net? and i was just wondering if anyone knows a site that explains basic graphic style coding like maybe how to make a basic side-scrolling game in VB.Net thanks ______________________________________________ "I'm not me when I dream...anymore." -TRUSTcompany
  • Form Code and DataBinding

    sysadmin csharp help tutorial
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Macros in VB 6?

    c++ question
    3
    0 Votes
    3 Posts
    0 Views
    A
    Thanks. That is what I was afraid of. Of course, they wouldn't want to make it easy.;)
  • Checking active threads in VB/Winsock

    sysadmin tutorial question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • problem updating datagrid

    database help question announcement
    4
    0 Votes
    4 Posts
    0 Views
    D
    Anonymous wrote: findSQL = "SELECT Price.ProductCode, Product.Description, Price.Price " & _ " FROM ProductType INNER JOIN (Product INNER JOIN (PriceDescription INNER JOIN Price ON PriceDescription.PriceCode = Price.PriceCode) ON Product.Code = Price.ProductCode) ON ProductType.TypeCode = Product.TypeCode " & _ " WHERE (((PriceDescription.PriceDesc) = '" & strDesc & "') AND ((ProductType.Description)='" & strType & "'))" You are selecting data from the Price and Product tables. Which colunns are being edited? To update the Description, you need the primary key of the Product table to be included in the data. To update the ProductCode or Price columns, you need the primary key of the Price table in the data. Without the primary key columns in the data, the proper row can't be located for updating.
  • word, save

    question testing tools help
    2
    0 Votes
    2 Posts
    0 Views
    T
    To stop the save prompt you should just be able to call: word.document.close(False) using this I've opened a doc, applied a theme (thus changing it) printing then closed it without any prompts. HTH
  • beginner

    csharp question learning
    2
    0 Votes
    2 Posts
    0 Views
    I
    I've found that VB.NET is on the whole much better: a) Much more consistent syntax than VB6 b) Better debugger and IDE c) Easier to interop with other stuff (including itself :-)) d) Library support - reams and reams of .NET goodness On the other hand, VB6 could be better if you are targeting an environment where you don't want to risk deploying the .NET Framework and all the required patches. You can probably get started quicker with VB6 too - it's less scary looking. HTH
  • VB.NET Disconnected DataReader...

    database csharp xml question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • How do I design a Progress Bar in VB7.0?

    database question csharp design
    2
    0 Votes
    2 Posts
    0 Views
    M
    Well, you're going to have to be a little more clear. What are you trying to do? Are you trying to determine the Progress of Opening the Connection? Or are you trying to determine the Progress of Saving Data? Are you using a DataSet, Stored Procedure, or XML file?
  • add a combobox to datagrid

    2
    0 Votes
    2 Posts
    0 Views
    A
    Sorry i forgot to say I am writing this with vb.net
  • integer

    help question tutorial
    4
    0 Votes
    4 Posts
    0 Views
    X
    its rounding up... .5 or higher rounds it up.. i believe there is a function to format numbers...i can't remember it though..sorry "I'm not me when I dream...anymore." -TRUSTcompany
  • VB 6 SQL problem ???

    database help question
    2
    0 Votes
    2 Posts
    0 Views
    R
    Try this... sqlStr = "SELECT * FROM Products WHERE PrdName LIKE 'MS%'" 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."