Click here to Skip to main content
15,925,371 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: catching string from DOS shell Pin
mohith19-Mar-02 12:07
mohith19-Mar-02 12:07 
GeneralRe: catching string from DOS shell Pin
Jeremy Falcon20-Mar-02 4:26
professionalJeremy Falcon20-Mar-02 4:26 
GeneralRe: catching string from DOS shell Pin
mohith20-Mar-02 11:44
mohith20-Mar-02 11:44 
GeneralRe: catching string from DOS shell (phew) Pin
Jeremy Falcon22-Mar-02 5:33
professionalJeremy Falcon22-Mar-02 5:33 
GeneralRe: catching string from DOS shell (phew) Pin
mohith23-Mar-02 11:27
mohith23-Mar-02 11:27 
GeneralRe: catching string from DOS shell (phew) Pin
Jeremy Falcon25-Mar-02 3:25
professionalJeremy Falcon25-Mar-02 3:25 
GeneralActiveX with VB Pin
Jerome Conus17-Mar-02 21:28
Jerome Conus17-Mar-02 21:28 
GeneralRe: ActiveX with VB Pin
Jeremy Falcon18-Mar-02 10:02
professionalJeremy Falcon18-Mar-02 10:02 
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. Smile | :)

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...'"
GeneralJava/Swing Pin
fsb6617-Mar-02 17:56
fsb6617-Mar-02 17:56 
Questionhow can i send picture on plotter through VB programe Pin
talha17-Mar-02 10:17
talha17-Mar-02 10:17 
Generalhelp with downloading from a login/pass web using php (repost) Pin
17-Mar-02 6:45
suss17-Mar-02 6:45 
GeneralPlease help me ! answer something! Pin
31-Mar-02 11:19
suss31-Mar-02 11:19 
Generalconerting path Pin
mohith17-Mar-02 2:57
mohith17-Mar-02 2:57 
GeneralRe: conerting path Pin
Jeremy Falcon18-Mar-02 3:22
professionalJeremy Falcon18-Mar-02 3:22 
QuestionHow can I pass animation from Flash5 to VB6 ?? Pin
Ahuva14-Mar-02 2:31
Ahuva14-Mar-02 2:31 
GeneralVBS & Excel Files Pin
king_ging13-Mar-02 23:18
king_ging13-Mar-02 23:18 
Questionhow to create a reusable control program for web database. Pin
11-Mar-02 1:42
suss11-Mar-02 1:42 
GeneralVB6, Databases, and DataGrids! Pin
Matt-T10-Mar-02 1:26
Matt-T10-Mar-02 1:26 
GeneralRe: VB6, Databases, and DataGrids! Pin
12-Mar-02 5:09
suss12-Mar-02 5:09 
GeneralNeed some information about VBA,Thank you! Pin
big20029-Mar-02 21:22
big20029-Mar-02 21:22 
GeneralNeed some information about VBA,Thank you! Pin
9-Mar-02 20:56
suss9-Mar-02 20:56 
GeneralCreation of Excel files Pin
Sudhakar8-Mar-02 19:42
Sudhakar8-Mar-02 19:42 
GeneralRe: Creation of Excel files Pin
David Wengier9-Mar-02 1:41
David Wengier9-Mar-02 1:41 
GeneralWSH, SendKeys, and AppActivate - URGENT RESPONSE NEEDED Pin
8-Mar-02 11:08
suss8-Mar-02 11:08 
GeneralVBScript Type Mismatch Pin
8-Mar-02 8:09
suss8-Mar-02 8:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.