Quick Search for:  in language:    
VB5,Here,some,common,functions,used,create,Ad
   Code/Articles » |  Newest/Best » |  Community » |  Jobs » |  Other » |  Goto » | 
CategoriesSearch Newest CodeCoding ContestCode of the DayAsk A ProJobsUpload
Visual Basic Stats

 Code: 3,029,109. lines
 Jobs: 121. postings

 How to support the site

 
Sponsored by:

 

You are in:

 
Login



Latest Code Ticker for Visual Basic
Winsock with the boy
By Daniel Callander on 7/9


Click here to see a screenshot of this code!__AA Hack Keys
By JAKI on 7/9

(Screen Shot)

RSH from VBScript - execute command on UNIX or LINUX
By Roby Kott on 7/9


VBScript samples
By Roby Kott on 7/9


DBA tools
By Roby Kott on 7/9


Monitoring Tools
By Roby Kott on 7/9


Monitor Tools
By Roby Kott on 7/9


Make Path / Create Dir
By Dream on 7/9


Venus MUD Server
By Andrew Armstrong on 7/9


Click here to put this ticker on your site!


Add this ticker to your desktop!


Daily Code Email
To join the 'Code of the Day' Mailing List click here!





Affiliate Sites



 
 
   

Creating VB AddIns

Print
Email
 

Submitted on: 5/8/1999
By: Aldo Vargas  
Level: Not Given
User Rating: By 1 Users
Compatibility:VB 5.0, VB 6.0

Users have accessed this code 19263 times.
 
(About the author)
 
     Here are some common functions used to create Addins not explained very well in the help of VB5 Pro/Enterprise. To try this example create a new Addin Project (File/New), place paste this code in the OKButton_Click event and a break point at the begin of the event. Compile the AddIn (File/Make exe) and press F5 to run. Then start another instance of VB5 (run VB5.exe again) and create a standard project. In Add-Ins menu select Add-In manager, and check VB Addin Toolbar. Press the [+/-] button in the toolbar and browse for the AddIn you compiled. Select the new button and you'll see how the AddIn in the instance of the another VB5 is started. Press OK and the code should stop in the break point you placed in the AddIn project. Continue the example pressing F8 and see how it works.
 
code:
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
 
Terms of Agreement:   
By using this code, you agree to the following terms...   
1) You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.   
2) You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
3) You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
4) You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.

'**************************************
' Name: Creating VB AddIns
' Description:Here are some common funct
'     ions used to create Addins not explained
'     very well in the help of VB5 Pro/Enterpr
'     ise.
To try this example create a new Addin Project (File/New), place paste this code in the OKButton_Click Event and a break point at the begin of the event. Compile the AddIn (File/Make exe) and press F5 to run.
Then start another instance of VB5 (run VB5.exe again) and create a standard project. In Add-Ins menu Select Add-In manager, and check VB Addin Toolbar.
Press the [+/-] button In the toolbar and browse For the AddIn you compiled. Select the new button and you'll see how the AddIn in the instance of the another VB5 is started.
Press OK and the code should stop In the break point you placed in the AddIn project. Continue the example pressing F8 and see how it works.
' By: Aldo Vargas
'
'This code is copyrighted and has' limited warranties.Please see http://w
'     ww.Planet-Source-Code.com/vb/scripts/Sho
'     wCode.asp?txtCodeId=1729&lngWId;=1'for details.'**************************************

Private Sub OKButton_Click()

Dim i As Integer On Error Resume Next 'Project Name debug.print VBInstance.FullName 'Add Modules to the Project VBInstance.ActiveVBProject.VBComponents.Add 1 'Add Module VBInstance.ActiveVBProject.VBComponents.Add 2 'Add Class Module VBInstance.ActiveVBProject.VBComponents.Add 5 'Add Form VBInstance.ActiveVBProject.VBComponents.Add 6 'Add MDI Form VBInstance.ActiveVBProject.VBComponents.Add 7 'Add Property Page VBInstance.ActiveVBProject.VBComponents.Add 8 'Add User Control 'Add Controls VBInstance.ActiveVBProject.AddToolboxProgID "{BFB37EC3-FAB2-11D2-8A09-A907667BEC0B}#4.0#0", "C:\DISKS\Files\Programming\Millenium\Projects\Report OCX\ERMVIEW.ocx" 'Quit VB 'VBInstance.ActiveVBProject.VBComponents ' (1).DesignerWindow.VBE.Quit 'Show Form/Module VBInstance.ActiveVBProject.VBComponents(1).DesignerWindow.Visible = True 'Show Code Pane VBInstance.ActiveVBProject.VBComponents(1).CodeModule.CodePane.Show 'List Project Components/Windows With VBInstance.ActiveVBProject.VBE.Windows For i = 1 To .Count Debug.Print .Item(i).Caption, i Next
End With
'Link Windows With VBInstance.ActiveVBProject.VBE For i = 1 To .Windows.Count .Windows(6).LinkedWindowFrame.LinkedWindows.Add .Windows(i) Next
End With
End Sub


Other 6 submission(s) by this author

 

 
Report Bad Submission
Use this form to notify us if this entry should be deleted (i.e contains no code, is a virus, etc.).
Reason:
 
Your Vote!

What do you think of this code(in the Not Given category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor See Voting Log
 
Other User Comments
5/11/1999 6:26:00 AM:Gavin
Could you send me some example vb5 
central; control edition codes please 
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
5/12/1999 12:01:00 AM:Martin Padilla
Thanks!, Those guys at redmont didnt 
explained almost anything
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
5/14/1999 8:11:00 AM:aaron
what does the linking of the windows 
buy you?
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
5/14/1999 8:27:00 AM:Aldo Vargas
The links of the windows is just an 
example of how to link together the 
small toolbox windows of VB5.
I'm 
still investigating how to link my own 
window to the other toolboxes. I just 
added it just in case some one get an 
idea :o)
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
5/15/1999 7:33:00 PM:Mooky
I was trying to use the planetsource 
program you made that works with vb... 
well for some reason it didnt work on 
my computer... do you know why?
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
5/16/1999 12:37:00 AM:ALDO fRANZZONI RUBI
sorry im a student and i have a 
homework proyect about data control an 
printable reports, ples help me and 
send my som examples with combo boxes , 
printable reports and how can i make 
code to run an aplicattion off window 
sorry i cant write very well in 
english because i a mexican student and 
never have a english class
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
5/18/1999 3:03:00 PM:dennis
Hi tried your Search Planet Source 
Code, it installed and worked
the 
first time, now each time i try to 
start it i get
"Search Planet..... 
could Not be Loaded, Remove it From the 
Addons List?"
any ideas?  Thanks 
Dennis,  ps running VB5 Ent.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
5/27/1999 4:25:00 PM:Aldo Vargas
SOLUTION TO: SEARCH PLANET COULD NOT BE 
LOADED...
Once you download the Planet 
Source Code Addin,
DON'T MOVE THE EXE 
from the initial directory where you 
unzipped it.
It installs as ActiveX in 
the directory you run for first 
time,
and put reference of its 
location in the registry.
Good 
luck!
Aldo Vargas
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
5/31/1999 12:34:00 PM:Jason Sooter
When I tried to install the Source Code 
Addin it said wrong version of DLL. 
What do I do.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
6/10/1999 8:51:00 AM:Aniruddha Ray
Downloaded the PlanetSourceCode.EXE on 
my d:\drive. Double clicked on it and 
got an "Unexpected Error:". Any 
solution?
Thanks.
Ray
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
6/10/1999 9:46:00 PM:Luke
Aldo: what if the initial directory 
where you 
unzipped it is somewhere 
where it will
easily be deleted i.e 
temp internet files dir.?
"Could not 
be loaded" I kept getting this error 
when i moved the file so i deleted it 
and ran the program again but still got 
the error
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
6/10/1999 10:01:00 PM:Luke
For all the people that have has the 
problem i had: search the registry and 
delete the key "PlanetSourceCode" (only 
if you know what you are doing)
i 
think there shoudl be an uninstall 
feature in (if there is) the next 
version
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
6/11/1999 9:16:00 AM:tse, bryan w.
i hope have more advance source code in 
this website. thanks for supporting the 
user easily to learn. i hope this 
website have additional more guiding 
tools.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
6/20/1999 9:10:00 AM:INSTALL PROCEDURE by Aldo Vargas
To install the PlanetSourceCode Addin 
follow the following steps: 
1. Save 
the downloaded EXE in the directory you 
want it permanently (I.E.. C:\Program 
Files\DevStudio\VB) 
2. Run the 
PlanetSourceCode.exe just once. This 
will register the exe in the 
C:\Windows\Vbaddin.ini and in the 
Registry. 
3. Start VB and you should 
see Planet Source Code listed under the 
Add Ins menu. 
IMPORTANT NOTES: 
1. 
It just work if you have a live 
connection to Internet. 
2. It was 
developed using VB5 with SP3, so you'll 
need the Msvbvm50.dll. Try downloading 
the VB5 Runtime files from 
http://www.download.com/pc/software/0,
332,0-44894-s,1000.html?st.dl.search.res
ults.tdtl 
3. It also used MSIE5, but 
it should works fine with previous 
versions of MSIE as well.
4. If you 
already installed it before, try 
removing all PlanetSourceCode entries 
from the Registry.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
7/11/1999 8:47:00 PM:Ryan
How do you insert a breaking point?
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
7/15/1999 7:28:00 PM:Arturo Razcon
I want to open a electronic cash drawer 
by program and i dont know how to.
In 
D.O.S. the drawer opens with the next 
:
COPY CON LPT1: ENTER
^G^Z ENTER 
(Ctrl G Ctrl Z and enter)
Please 
Help me.
Thanks.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
7/15/1999 7:29:00 PM:Arturo Razcon
I work with VB 4.
Thanks again.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
7/23/1999 2:46:00 PM:Sheepy
This prog is sweet, but please tell me 
how you got it as a vb addin, I have 
been trying for ages and cant work it 
out!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
7/23/1999 2:57:00 PM:Sheepy
This is for Mr Razcon - I have a 
possible solution to your problem, but 
your email address doesn't work.
Use 
the MS Comm control, then you could 
do:
Open "LPT1" For Output As 
#1
	Print #1, Chr(13) &"^G" &"^Z" 
&Chr;(13)
Close #1
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
10/27/1999 10:17:00 AM:Uwe
This Code tells more than all others 
i'v ever seen
But i need some help 
with add-in coding.
I create a new 
Form and want to place a Picture on it 
(Background no Picbox) How to do ?
The 
MS-Onlinedoku sample dont helps :(
And 
how can i Place Controls Like Timer on 
this form
All from my add in ?¿
If 
someone could help or send me a sample
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/25/2000 5:40:57 PM:Marc-André
I got an "LINK OUT OF DATE" error when 
a click search !! But, good job :)
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
10/28/2000 12:20:51 PM:Rich Stiver
I've used the add-in in VB5, but 
unfortunately the add-in doesn't work 
in VB6, since there is a few 
differences in the way add-ins are made 
and accessed. There should be an 
updated version for VB6.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
Add Your Feedback!
Note:Not only will your feedback be posted, but an email will be sent to the code's author in your name.

NOTICE: The author of this code has been kind enough to share it with you.  If you have a criticism, please state it politely or it will be deleted.

For feedback not related to this particular code, please click here.
 
Name:
Comment:

 

Categories | Articles and Tutorials | Advanced Search | Recommended Reading | Upload | Newest Code | Code of the Month | Code of the Day | All Time Hall of Fame | Coding Contest | Search for a job | Post a Job | Ask a Pro Discussion Forum | Live Chat | Feedback | Customize | Visual Basic Home | Site Home | Other Sites | About the Site | Feedback | Link to the Site | Awards | Advertising | Privacy

Copyright© 1997 by Exhedra Solutions, Inc. All Rights Reserved.  By using this site you agree to its Terms and Conditions.  Planet Source Code (tm) and the phrase "Dream It. Code It" (tm) are trademarks of Exhedra Solutions, Inc.