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
  • Form in a VB ActiveX dll

    c++ com help
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • ActiveX with VB

    help com tutorial question
    2
    0 Votes
    2 Posts
    0 Views
    J
    To simply put it, it's a whole heck of a lot easier to reference all the ActiveX controls (Project/Components...) you'll need and create them as needed. Also, if you use the package and desployment wizard it'll make sure the OCXs are included in your installation. I am not sure what it is exactly you are looking to do, but if you do reference the controls, you can use a control array along with the Load statement to create new indices at runtime. You don't have to use a control array. Reference the rich edit control in your project, Uncheck "Remove information about unused ActiveX Controls" from Project Properties/Make. And run the following code... Dim MyControl As Control Private Sub Form_Load() Set MyControl = Me.Controls.Add("RICHTEXT.RichTextCtrl.1", _ "RichText1", Me) MyControl.Text = "I'm Dynamic!" MyControl.Font.Bold = True MyControl.Font.Italic = True MyControl.Visible = True End Sub Private Sub Form_Resize() If IsObject(MyControl) Then _ MyControl.Move 0, 0, Me.ScaleWidth, Me.ScaleHeight End Sub Private Sub Form_Unload(Cancel As Integer) If IsObject(MyControl) Then Set MyControl = Nothing End Sub However, in doing this you'll need to know the ProgID for the ActiveX control. I generally, place the control on the form, save it, use the .frm file to get the class name, run it, and get an error message giving me the ProgID. You can also get it from the registry, but I'm lazy. :) If you don't register the control in the project you may have to deal with licensing info in your code. Most MS ActiveX controls require a license to be used. You could create one manually, but this becomes more of a pain than it's worth. Good luck... Jeremy L. Falcon "The One Who Said, 'The One Who Said...'"
  • conerting path

    question
    2
    0 Votes
    2 Posts
    0 Views
    J
    Check out the GetShortPathName() API. Jeremy L. Falcon "The One Who Said, 'The One Who Said...'"
  • Java/Swing

    java question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • how can i send picture on plotter through VB programe

    question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • How can I pass animation from Flash5 to VB6 ??

    question adobe help
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • VBS & Excel Files

    tutorial tools regex announcement learning
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • VB6, Databases, and DataGrids!

    database help tutorial question
    2
    0 Votes
    2 Posts
    0 Views
    L
    question 1) You can use the sort method of the rs object. SQl should work as well. rsControls.sort= "lname DESC, fname ASC" or rsControls.Open "select * from syndicate1 order by syndicate1.lname ASC", cnControls, adOpenKeyset, adLockOptimistic question 2) I belive you are looking for the datagrid.defcolwidth property.
  • how to create a reusable control program for web database.

    tutorial database
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Need some information about VBA,Thank you!

    c++ database tools tutorial
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Need some information about VBA,Thank you!

    database tools tutorial question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Creation of Excel files

    2
    0 Votes
    2 Posts
    0 Views
    D
    You can if you install (and use) the ODBC driver for Excel. You will need to set the ConnectionString property (i think) appropriately. Look in help for ConnectionString there is probably an example. -- David Wengier Sonork ID: 100.14177 - Ch00k
  • WSH, SendKeys, and AppActivate - URGENT RESPONSE NEEDED

    tools help
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • VBScript Type Mismatch

    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Image in Menu and Buttonmenu

    help question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Printing my VB project

    data-structures tutorial
    2
    0 Votes
    2 Posts
    0 Views
    D
    Probably the best place to look is on the MSDN CDs that came with VB. There are lots of Books and Techinical Articles on there, and there will surely be something about printing. Basically, you need to "draw" what you want onto the Printer object. -- David Wengier Sonork ID: 100.14177 - Ch00k
  • How to deal with a Word document?

    tutorial question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Unix "Who" equival in VB

    question
    5
    0 Votes
    5 Posts
    0 Views
    A
    Thanx a lot. ~A.
  • HELP with Printing Please (VB.NET)

    csharp com help question
    2
    0 Votes
    2 Posts
    0 Views
    D
    Oops! I just noticed the subject said "VB.NET"... this may not work, but anyway: Have a look at the EditCopy method of the chart control. Something like this: MsChart1.EditCopy Printer.PaintPicture ClipBoard.GetData(vbCFMetafile), 0, 0 Untested pseudocode by the way :) -- David Wengier Sonork ID: 100.14177 - Ch00k
  • XmlTextReader using NetworkStream

    xml question learning
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied