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
  • Running 2 forms in 2 different displays in VB program

    question help
    2
    0 Votes
    2 Posts
    0 Views
    P
    If you want to create a second window, or form, then you will need to do something like this. ' Declare the form variable Dim secondForm as Form1 ' Create the form object Set secondForm = New Form1 ' Set the form to visible. secondForm.Show Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
  • Questions

    question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Array length

    question data-structures tutorial
    2
    0 Votes
    2 Posts
    0 Views
    S
    UBound(a) + 1 If you could kick in the pants the fellow responsible for most of your troubles, you wouldn't be able to sit down for six months. - Unknown
  • Help me!

    question help
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • new Form by name?

    question
    5
    0 Votes
    5 Posts
    0 Views
    A
    hrm the Forms collection only shows forms which are already loaded. besides, I don't think I'd be able to create a _new instance_ with this method. also, the New Forms("MyFormName") syntax doesn't compile. I even tried a CallByName hack ( Set myForm = CallByName( App, "MyFormName", vbGet ) ), but that didn't work either. any other ideas?
  • 0 Votes
    4 Posts
    0 Views
    B
    hi bryce ! I use ActiveDocument.Select Selection.Copy and if I open a new doc and use Paste the content will copy ! but I need to copy this into a variable as : doc.Body= "content" How can I made this ? thanks again !
  • 0 Votes
    1 Posts
    0 Views
    No one has replied
  • Find Dialog box

    help question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Find Dialog box

    help question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Language Problem

    database sql-server sysadmin help
    2
    0 Votes
    2 Posts
    0 Views
    K
    Hi, I've solved my problem by adding this statment "Auto Translate=False" to the "ConnectionString".
  • Adding Background to the whole Form

    3
    0 Votes
    3 Posts
    0 Views
    A
    Make a .JPEG that's the same size as your form and set it as the Picture property on your form... like David said ;) First Programmer: "How many bits are in a bite?" Second Programmer: "You spelled bytes wrong." First Programmer: *stares* "It's a joke, moron." Second Programmer: "Joke...?"
  • System Message in VB

    question
    3
    0 Votes
    3 Posts
    0 Views
    F
    Call the System shell shell "net send [username or computer name] [message]", vbHide Fernando Finelli
  • TreeView

    tutorial question
    3
    0 Votes
    3 Posts
    0 Views
    F
    I have one: http://www.codeproject.com/useritems/ASPTreeView.asp :) Fernando Finelli
  • Write binary file . URGENT !!!!!

    data-structures question
    3
    0 Votes
    3 Posts
    0 Views
    F
    I don't know if you mean this, sorry if don't Open "outputfile" for output as #1 For intI = 1 to ubound(arrArrayName) print #1, arrArrayName(intI) Next intI Close 1 See: Syntax Open pathname For mode [Access access] [lock] As [#]filenumber [Len=reclength] The Open statement syntax has these parts: Part Description pathname Required. String expression that specifies a file name — may include directory or folder, and drive. mode Required. Keyword specifying the file mode: Append, Binary, Input, Output, or Random. If unspecified, the file is opened for Random access. access Optional. Keyword specifying the operations permitted on the open file: Read, Write, or Read Write. lock Optional. Keyword specifying the operations restricted on the open file by other processes: Shared, Lock Read, Lock Write, and Lock Read Write. filenumber Required. A valid file number in the range 1 to 511, inclusive. Use the FreeFile function to obtain the next available file number. reclength Optional. Number less than or equal to 32,767 (bytes). For files opened for random access, this value is the record length. For sequential files, this value is the number of characters buffered. Fernando Finelli
  • Class ModuleProblems

    help tutorial question announcement
    2
    0 Votes
    2 Posts
    0 Views
    G
    May be your having some other oject with tha name Child or change the class name to some thing else and try it. Gau Gaurika Wijeratne. // www.gaurika.com
  • DataControl ---> Data "object" HowTo???

    c++ com json question
    3
    0 Votes
    3 Posts
    1 Views
    B
    You are better off passing the recordset object if thats what you are going to be playing with. Otherwise you are using late binding. Something like this : Sub DrawData(ByVal oRec as ADODB.Recordset) Dim dField as Field For Each dField in oRec.Fields MsgBox dField.Value & " " & dField.Name Next End Function Sub Main() Dim oRecord as ADODB.RecordSet Dim ssql as String Dim oConnect As ADODB.Connection oConnect.Open "Blah,Blah" ssql = "SELECT * FROM table1" oRecord.Open ssql, oConnect, adOpenForwardOnly, adLockReadOnly DrawData(oRecord) MsgBox "Success" End Sub
  • how can i add header to raw bitmap data?

    question graphics help tutorial
    2
    0 Votes
    2 Posts
    0 Views
    P
    You will need to get the type definitions that are defined in the Windows API from the APIViewer program and include them in your program. You will Need the BITMAPINFO structure. And the BITMAPINFOHEADER. Look at MSDN to see how to fill both of these structures. Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
  • Parallel Port Programming

    2
    0 Votes
    2 Posts
    0 Views
    P
    Open the port like you were using a file. Use the name "PAR1". If you want to do serial port access then use "COM1". The number represents the number of the port that you are trying to open. Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
  • Saving automaticly by VB.

    2
    0 Votes
    2 Posts
    0 Views
    P
    Create a global variable that has the current name of the file, then everytime the user creates a new file, give the file the current name. Then increment the name of the variable. Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
  • spanning drives in VB

    help algorithms
    2
    0 Votes
    2 Posts
    0 Views
    P
    Have you tried using Install Shield or WISE? Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!