Page 1 of 2 12 LastLast
Results 1 to 40 of 51

Thread: Add-In: StaticToolz (Attached in First Post..just for fun)

  1. #1

    Thread Starter
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Add-In: StaticToolz (Attached in First Post..just for fun)

    I HAVE EDITED THIS FIRST POST....and the title... etc...
    and attached it..

    I know.. strange title.. but here is my question..

    it seems like u can tap just about anything in the IDE as long as u know how..

    Anyone know how to get the list available Dim as TYPEs?

    Like String, Integer, etc... I want to get all of them (well only the CURRENT Available ones...)
    Thanks!


    (LATEST VERSION: TESTING ONLY! PRE-ALPHA VERSION! lol)
    play with it.. make suggestions... break it...
    to run..
    unzip..
    run
    start another VB and open a project...
    as a suggestion I would make a backup of any project
    you play with using this lol
    Version -.00874.1.z
    Attached Files Attached Files
    Last edited by Static; Dec 9th, 2005 at 04:31 PM.
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  2. #2
    No place like 127.0.0.1 eyeRmonkey's Avatar
    Join Date
    Jul 2005
    Location
    Blissful Oblivion
    Posts
    2,306

    Re: Add-In: Dim ...... As ______?

    If you mean standard data types then there are only a few, but there are TONS of different object types. You can Dim a variable as any Object, class, enum, UDT, etc.

    Here are all the standard data types that I can think of but I'm sure someone can post a full list:
    Byte
    Integer
    Long
    Single
    Double
    String
    Currency
    Date
    Visual Studio 2005 Professional Edition (.NET Framework 2.0)
    ~ VB .NET Links: Visual Basic 6 to .NET Function Equivalents (Thread) | Refactor! (White Paper) | Easy Control for Wizard Forms | Making A Proper UI For WinForms | Graphics & GDI+ Tutorial | Websites For Free Icons
    ~ QUOTE: Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rich Cook

    ~ eyeRmonkey.com

  3. #3

    Thread Starter
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: Add-In: Dim ...... As ______?

    I could get the "List" but I want to exctract it from VBIDE

    MZTools can do it...
    in the Add Procedure...Look in the datatype... click the FILL button on some of the types.. bam.. it fills the dropdown..

    I want to get all of these on my form load (or something) so that when the user types in an var name then As bam.. the list appears..
    (Auto filling like in the actual IDE) I know it can be done so I am determined to do it! lol

    I am making an addin that will do similar things to MZ but do them better .. more easily used.. more intuitive etc..(plus others)
    like my Msgbox creator presents u with a form that looks like a msgbox.. then lets you type in the title, prompt, right click select image, buttons, enter variable name for the return value etc.. really easy to use.. even multiline msgbox using ALT+Enter
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  4. #4
    No place like 127.0.0.1 eyeRmonkey's Avatar
    Join Date
    Jul 2005
    Location
    Blissful Oblivion
    Posts
    2,306

    Re: Add-In: Dim ...... As ______?

    Cool idea.

    To get a full list I think you would need to access the object browser. Either that or access whatever the obeject accesses to get that info. I'm not sure if it would be possible or easy. Is MZTools open source?
    Visual Studio 2005 Professional Edition (.NET Framework 2.0)
    ~ VB .NET Links: Visual Basic 6 to .NET Function Equivalents (Thread) | Refactor! (White Paper) | Easy Control for Wizard Forms | Making A Proper UI For WinForms | Graphics & GDI+ Tutorial | Websites For Free Icons
    ~ QUOTE: Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rich Cook

    ~ eyeRmonkey.com

  5. #5
    PowerPoster
    Join Date
    Apr 2005
    Location
    Debug.Print
    Posts
    3,885

    Re: Add-In: Dim ...... As ______?

    Quote Originally Posted by eyeRmonkey
    Cool idea.

    To get a full list I think you would need to access the object browser. Either that or access whatever the obeject accesses to get that info. I'm not sure if it would be possible or easy. Is MZTools open source?
    nope, mztools isnt.

  6. #6

    Thread Starter
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: Add-In: Dim ...... As ______?

    of course not.. I sent them an email... hope they respond. (doubt it but worth a shot!) I will share the info if I get it
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  7. #7
    No place like 127.0.0.1 eyeRmonkey's Avatar
    Join Date
    Jul 2005
    Location
    Blissful Oblivion
    Posts
    2,306

    Re: Add-In: Dim ...... As ______?

    If I were you I would take some time to search for a site that has a ton of add-in info. There are always sites out there that are exactly what you need, it usually just takes time.

    PSC is a good place to start. Just start skimming their add-in's and take notes on interesting/new things you see.
    Visual Studio 2005 Professional Edition (.NET Framework 2.0)
    ~ VB .NET Links: Visual Basic 6 to .NET Function Equivalents (Thread) | Refactor! (White Paper) | Easy Control for Wizard Forms | Making A Proper UI For WinForms | Graphics & GDI+ Tutorial | Websites For Free Icons
    ~ QUOTE: Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rich Cook

    ~ eyeRmonkey.com

  8. #8
    PowerPoster jcis's Avatar
    Join Date
    Jan 2003
    Location
    Argentina
    Posts
    4,430

    Re: Add-In: Dim ...... As ______?

    The thing is, there is a DLL named TLBINF32.DLL. It lives i n "C:\WINDOWS\SYSTEM32"

    It seems that the VB Object Browser uses that DLL.
    This DLL gives you all, Classes, Contants, Properties...
    It needs you to pass a Filename (DLL or OCX, or TLB), as far as I saw, it reads all OCX's, but not all DLL's, seems that it reads some VB DLLs.
    This can also read the data if you pass the object, also reads from registry, performs search, well, it does too many things, here Ill post a little example reading from files in a collection.

    ADD reference to "Typelib Information", located in: "C:\WINDOWS\SYSTEM32\TLBINF32.DLL"
    Add a List (list1) and a Commandbutton (Command1)


    VB Code:
    1. Dim mCol As Collection
    2.  
    3. Private Sub LoadData()
    4. Dim i                   As Integer
    5. Dim j                   As Integer
    6. Dim lMember             As MemberInfo
    7. Dim lConst              As ConstantInfo
    8. Dim tliTypeLibInfo      As TypeLibInfo
    9.    
    10.     On Error Resume Next 'Some Libs hasn't data to show and TypeLibInfo fire error
    11.    
    12.         For i = 1 To mCol.Count
    13.             Set tliTypeLibInfo = TLI.TypeLibInfoFromFile(mCol.Item(i))
    14.             For Each lConst In tliTypeLibInfo.Constants
    15.                 For Each lMember In lConst.Members
    16.                     list1.AddItem lConst.Parent & " ; " & lConst.Name & " ; " & lMember.Name
    17.                 Next
    18.             Next
    19.         Next
    20.         Set tliTypeLibInfo = Nothing
    21. End Sub
    22.  
    23. Private Sub Command1_Click()
    24.     LoadData
    25. End Sub
    26.  
    27. Private Sub Form_Load()
    28.     Set mCol = New Collection
    29.    
    30.     'I'll add some files..
    31.    
    32.     mCol.Add ("MSVBVM60.DLL")   'VBA Lib
    33.     mCol.Add ("MSVBVM60.DLL\3") 'mmm..more VBA?
    34.     mCol.Add ("VBRUN.OCX")      'VBRUN Lib
    35.     mCol.Add ("comctl32.ocx")   'Common Controls
    36.     mCol.Add ("richtx32.ocx")   'Rich Textbox
    37.     mCol.Add ("msflxgrd.ocx")   'Flexgrid
    38.     mCol.Add ("comdlg32.ocx")
    39. End Sub

    I think that, when you type: DIM ..... AS _____, VB IntelliSense get all the types in MSVBVM60.DLL and ALL the types inside each OCX component you are using in your APP. If you open your Project with NOTEPAD (VBP FILE) you have all that DLL's,TLB's;OCX's listed there, it looks like this:

    Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#..\WINDOWS\system32\stdole2.tlb#OLE Automation
    Reference=*\G{420B2830-E718-11CF-893D-00A0C9054228}#1.0#0#..\WINDOWS\system32\scrrun.dll#Microsoft Scripting Runtime
    Object={16099B99-EC14-4BBB-807E-C06552824C4D}#1.0#0; BrowserEngine2.dll
    Reference=*\G{8B217740-717D-11CE-AB5B-D41203C10000}#1.0#0#..\WINDOWS\system32\TLBINF32.DLL#TypeLib Information
    Object={6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.3#0; comctl32.ocx
    Object={3B7C8863-D78F-101B-B9B5-04021C009402}#1.2#0; richtx32.ocx
    Object={5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0; msflxgrd.ocx
    Object={F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0; comdlg32.ocx
    Object={A8F8E827-06DA-11D2-8D70-00A0C98B28E2}#1.0#0; VCMAXB.OCX
    Object={23DA51FB-240D-451E-A309-D2BBDB28ED6E}#1.0#0; vbalExpBar6.ocx
    There you can see: Scripting Runtime, Common Controls, Rich Textbox, flexgrid, Common Dialog... and don't know what else.
    MZ TOOLS also takes many things directly from Project files.

    Well, I recomend you GOGGLE this: TypeLibinfo

    Some Links:
    TypeLibinfo in VbAccelerator
    TypeLibinfo in MSDN
    TypeLibinfo in DEVX
    Last edited by jcis; Jan 25th, 2006 at 01:42 AM.

  9. #9
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Add-In: Dim ...... As ______?

    Quote Originally Posted by eyeRmonkey
    If I were you I would take some time to search for a site that has a ton of add-in info.
    I'm fond of this little tool. I hope others find it as useful.

    (PS: Love the avatar eyeRmonkey! )

  10. #10
    Hyperactive Member
    Join Date
    Aug 2005
    Location
    Long Island, NY.
    Posts
    353

    Re: Add-In: Dim ...... As ______?

    You guys are too damn smart... I don't understand this conversation at all.

  11. #11

    Thread Starter
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: Add-In: Dim ...... As ______?

    lol@von.. Patients young vb jedi!

    Thanks jcis, hack...

    jcis.. I just got an email from the people @ MZTools.. they pointed me to the same thing u did. the TypeLibinfo. Im glad I stopped back here before getting to deep into searching! That code is perfect.. I had just found the items in the VBA (MSVBVM60.DLL) file and saw all the "types" was wondering where the other stuff came from.. that is perfect!!
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  12. #12

    Thread Starter
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: Add-In: Dim ...... As ______?

    Now.. lets here some opinions...

    what would be the best "thing" to store these in so I could do a fairly simple Intellisense? An Array?
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  13. #13

    Thread Starter
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: Add-In: Dim ...... As ______?

    and one more thing.. scanning that list I dont see "objects"
    the variable types are easy to spot... vbInteger, vbLong etc..
    but where are "Listbox", CommandButton, etc? hmmm....
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  14. #14
    Smitten by reality Harsh Gupta's Avatar
    Join Date
    Feb 2005
    Posts
    2,938

    Re: Add-In: Dim ...... As ______?

    probably a Collection??
    Show Appreciation. Rate Posts.

  15. #15
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Add-In: Dim ...... As ______?

    Quote Originally Posted by Harsh Gupta
    probably a Collection??
    Harsh beat me to it...this would be my suggestion.

  16. #16

    Thread Starter
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: Add-In: Dim ...... As ______?

    ok.. its in the VB6.OLB file which I cant get it to read
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  17. #17

    Thread Starter
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: Add-In: Dim ...... As ______?

    bingo! spoke too soon!!!
    VB Code:
    1. For X = 0 To tliTypeLibInfo.CoClasses.Count - 1
    2.       Debug.Print tliTypeLibInfo.CoClasses(X).Name
    3. Next
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  18. #18

    Thread Starter
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: Add-In: Dim ...... As ______?

    is a collection fast enough so when I type it can "search" and fill in what it thinks I am typing?

    (I have not played with collections much)
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  19. #19
    No place like 127.0.0.1 eyeRmonkey's Avatar
    Join Date
    Jul 2005
    Location
    Blissful Oblivion
    Posts
    2,306

    Re: Add-In: Dim ...... As ______?

    Quote Originally Posted by Hack
    I'm fond of this little tool. I hope others find it as useful.

    (PS: Love the avatar eyeRmonkey! )
    I posted your avatar snowed in the old x-mas thread. I'll repost it in the new x-mas thread.

    Okay, here it is.



    Static, I wouldn't reccomend a collection for something that needs to be fast. Thats just me though.
    Visual Studio 2005 Professional Edition (.NET Framework 2.0)
    ~ VB .NET Links: Visual Basic 6 to .NET Function Equivalents (Thread) | Refactor! (White Paper) | Easy Control for Wizard Forms | Making A Proper UI For WinForms | Graphics & GDI+ Tutorial | Websites For Free Icons
    ~ QUOTE: Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rich Cook

    ~ eyeRmonkey.com

  20. #20
    PowerPoster jcis's Avatar
    Join Date
    Jan 2003
    Location
    Argentina
    Posts
    4,430

    Re: Add-In: Dim ...... As ______?

    Quote Originally Posted by Static
    is a collection fast enough so when I type it can "search" and fill in what it thinks I am typing?

    (I have not played with collections much)
    I think collections are slower than arrays, but maybe they are fast enough for doing that

  21. #21

    Thread Starter
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: Add-In: Dim ...... As ______?

    hmmm...

    I have been playing with this some more.. seeing what can be "yanked" out...

    taking JCIS's code, I changed a few things and added some so its easier to poke around...
    Start a New Project...
    Add Ref to TypeLib Information
    Add a command Button (Name:Command1)
    And a Treeview (Name:TV1)
    VB Code:
    1. Dim mCol As Collection
    2.  
    3. Private Sub LoadData()
    4. Dim i                   As Integer
    5. Dim j                   As Integer
    6. Dim lMember             As MemberInfo
    7. Dim lConst              As ConstantInfo
    8. Dim tliTypeLibInfo      As TypeLibInfo
    9.  TV1.Nodes.Clear
    10.     On Error Resume Next
    11.    
    12.         For i = 1 To mCol.Count
    13.             Set tliTypeLibInfo = TLI.TypeLibInfoFromFile(mCol.Item(i))
    14.             TV1.Nodes.Add , , tliTypeLibInfo.Name, mCol.Item(i)
    15.             TV1.Nodes.Add tliTypeLibInfo.Name, tvwChild, tliTypeLibInfo.Name & "_CoClasses", "CoClasses"
    16.             For x = 1 To tliTypeLibInfo.CoClasses.Count
    17.                 TV1.Nodes.Add tliTypeLibInfo.Name & "_CoClasses", tvwChild, "CoClasses_" & tliTypeLibInfo.CoClasses(x).Name, tliTypeLibInfo.CoClasses(x).Name
    18.             Next
    19.             TV1.Nodes.Add tliTypeLibInfo.Name, tvwChild, tliTypeLibInfo.Name & "_TypeInfos", "TypeInfos"
    20.             For x = 1 To tliTypeLibInfo.TypeInfos.Count
    21.                 TV1.Nodes.Add tliTypeLibInfo.Name & "_TypeInfos", tvwChild, "TypeInfos_" & tliTypeLibInfo.TypeInfos(x).Name, tliTypeLibInfo.TypeInfos(x).TypeKindString & ": " & tliTypeLibInfo.TypeInfos(x).Name
    22.             Next
    23.             TV1.Nodes.Add tliTypeLibInfo.Name, tvwChild, tliTypeLibInfo.Name & "_Declarations", "Declarations"
    24.             For x = 1 To tliTypeLibInfo.Declarations.Count
    25.                 TV1.Nodes.Add tliTypeLibInfo.Name & "_Declarations", tvwChild, "Declarations_" & tliTypeLibInfo.Declarations(x).Name, tliTypeLibInfo.Declarations(x).Name
    26.             Next
    27.             TV1.Nodes.Add tliTypeLibInfo.Name, tvwChild, tliTypeLibInfo.Name & "_Constants", "Constants"
    28.             For Each lConst In tliTypeLibInfo.Constants
    29.                 TV1.Nodes.Add tliTypeLibInfo.Name & "_Constants", tvwChild, lConst.Name, lConst.Name
    30.                 For Each lMember In lConst.Members
    31.                     TV1.Nodes.Add lConst.Name, tvwChild, lConst.Name & "_" & lMember.Name, lMember.Name
    32.                 Next
    33.             Next
    34.         Next
    35.         Set tliTypeLibInfo = Nothing
    36. End Sub
    37.  
    38. Private Sub Command1_Click()
    39.     LoadData
    40. End Sub
    41.  
    42. Private Sub Form_Load()
    43.     Set mCol = New Collection
    44.    
    45.     'I'll add some files..
    46.     mCol.Add ("VB6.OLB")
    47.     mCol.Add ("MSVBVM60.DLL")   'VBA Lib
    48.     mCol.Add ("MSVBVM60.DLL\3") 'mmm..more VBA?
    49.     mCol.Add ("VBRUN.OCX")      'VBRUN Lib
    50.     mCol.Add ("comctl32.ocx")   'Common Controls
    51.     mCol.Add ("richtx32.ocx")   'Rich Textbox
    52.     mCol.Add ("msflxgrd.ocx")   'Flexgrid
    53.     mCol.Add ("comdlg32.ocx")
    54. End Sub
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  22. #22
    PowerPoster jcis's Avatar
    Join Date
    Jan 2003
    Location
    Argentina
    Posts
    4,430

    Re: Add-In: Dim ...... As ______?

    Nice! I like it.
    I think there is all you need to create the Intellisense effect.
    And I think Intellisense also list the types in the active OCX components in the project, you're gonna take that from the VBP?

    i.e. the rich textbox control, the msflexgrid.. should be added only if the user has it selected in Componets. Else he can select it in your intellisense, and that would fire errors when running code.

    Another thing to take care is the version of the components. I have 3 diferent versions of some OCX's. I saw some code that gets the right version from registry I think, 'ill see if I find it.
    Last edited by jcis; Dec 8th, 2005 at 10:51 AM.

  23. #23

    Thread Starter
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: Add-In: Dim ...... As ______?

    ok.. here is what i have it pulling in so far....
    Code:
    PictureBox
    Label
    TextBox
    Frame
    CommandButton
    CheckBox
    OptionButton
    ComboBox
    ListBox
    HScrollBar
    VScrollBar
    Timer
    Printer
    Form
    Screen
    Clipboard
    DriveListBox
    DirListBox
    FileListBox
    Menu
    MDIForm
    App
    Shape
    Line
    Image
    Data
    OLE
    UserControl
    PropertyPage
    UserDocument
    Global
    VBControlExtender
    Empty
    Null
    Integer
    Long
    Single
    Double
    Currency
    Date
    String
    Object
    Error
    Boolean
    Variant
    DataObject
    Decimal
    Byte
    UserDefinedType
    Array
    I cant find the section (file) with Control in it?
    Dim ctl as Control

    at the moment I am just adding the basics... because this is for a sub/function builder
    adding the args... but this "feature" could be used elsewhere (And I plan on it!!)
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  24. #24
    PowerPoster jcis's Avatar
    Join Date
    Jan 2003
    Location
    Argentina
    Posts
    4,430

    Re: Add-In: Dim ...... As ______?

    Control is in VB6.OLB

    In your Treeview appears as..
    dispinterface: Control

  25. #25
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: Add-In: Dim ...... As ______?

    The Dictionary (add reference to Microsoft Scripting Runtime) is much faster than a Collection.

  26. #26

    Thread Starter
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: Add-In: Dim ...... As ______?

    in using the collection.. it seems fast enough.. but I will check out the dictionary
    Thank Penagate!

    (and thanks JCIS.. I see it now)
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  27. #27

    Thread Starter
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: Add-In: Dim ...... As ______?

    how do I "search" in a dictionary?

    it wants a "Key" not index like a collection.. so how do u loop through it?
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  28. #28
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: Add-In: Dim ...... As ______?

    Dim item As Object
    For Each item In myDictionary
    ' do something
    Next

  29. #29

    Thread Starter
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: Add-In: Dim ...... As ______?

    ahhh.. ok lol thanks

    update! I have figured out how to easily get all the referenced items then grab the goodies from them!!
    VB Code:
    1. 'This is for an addin.. thats where the VBInstance come into play
    2. Private Sub LoadData()
    3. Set dType = New Collection
    4. Dim lMember             As MemberInfo
    5. Dim lConst              As ConstantInfo
    6. Dim tliTypeLibInfo      As TypeLibInfo
    7.    
    8.     On Error Resume Next
    9.     For R = 1 To VBInstance.ActiveVBProject.References.Count
    10.     'Here is where it gets the refs.. including controls!
    11.         Set tliTypeLibInfo = TLI.TypeLibInfoFromFile(VBInstance.ActiveVBProject.References(R).FullPath)
    12.         For X = 1 To tliTypeLibInfo.TypeInfos.Count
    13.             Select Case tliTypeLibInfo.TypeInfos(X).TypeKindString
    14.                 Case "coclass" 'its good.. add it
    15.                     dType.Add tliTypeLibInfo.TypeInfos(X).Name
    16.                 Case "dispinterface"
    17.                     Select Case Left(tliTypeLibInfo.TypeInfos(X).Name, 1)
    18.                         Case "_", "I"
    19.                             'Not these...
    20.                         Case Else
    21.                             dType.Add tliTypeLibInfo.TypeInfos(X).Name
    22.                     End Select
    23.             End Select
    24.         Next
    25.         Set lConst = tliTypeLibInfo.Constants.NamedItem("VbVarType")
    26.         For Each lMember In lConst.Members
    27.             dType.Add CStr(Replace(lMember.Name, "vb", ""))
    28.         Next
    29.     Next
    30.     For X = 1 To dType.Count 'Checking what I got ;)
    31.         Debug.Print dType(X)
    32.     Next
    33.     Set tliTypeLibInfo = Nothing
    34. End Sub
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  30. #30

    Thread Starter
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: Add-In: Dim ...... As ______?

    screens of the function builder...
    first one shows a function being built... (Intellisense is shown in the AS Type section)

    second image is the same "thing" but switched to a Public Type..
    Intellisense on the variables for the type...
    Attached Images Attached Images   
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  31. #31

    Thread Starter
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: Add-In: Dim ...... As ______?

    Another question:

    With Property Let,Get,Set....
    do all allow arguments? or just Let & Set?

    not sure.. only used It a few times
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  32. #32
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: Add-In: Dim ...... As ______?

    All allow arguments, look up Properties in the Classic VB FAQ, Merri and myself explained it all.

  33. #33

    Thread Starter
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: Add-In: Dim ...... As ______?

    cool thanks!!

    I will post this Add-in soon for some "Alpha" testing
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  34. #34
    Admodistrator |2eM!x's Avatar
    Join Date
    Jan 2005
    Posts
    3,900

    Re: Add-In: Dim ...... As ______?

    Quote Originally Posted by eyeRmonkey
    Static, I wouldn't reccomend a collection for something that needs to be fast. Thats just me though.
    Just letting you know, they are faster unless you dim an array thats big enough to hold all the stuff you want in it without redimming

  35. #35
    No place like 127.0.0.1 eyeRmonkey's Avatar
    Join Date
    Jul 2005
    Location
    Blissful Oblivion
    Posts
    2,306

    Re: Add-In: Dim ...... As ______?

    Remix, you're saying that Collections are faster than arrays unless the array is very large?

    I'm not sure that is what you meant, but if that is what you meant, then I am 95% sure you are incorrect. A collection is just a form of an array but each element takes up a lot more space and there is a lot more processing going on for each element. Especially since the "Key" is a variant (and can be a string or the index number).
    Visual Studio 2005 Professional Edition (.NET Framework 2.0)
    ~ VB .NET Links: Visual Basic 6 to .NET Function Equivalents (Thread) | Refactor! (White Paper) | Easy Control for Wizard Forms | Making A Proper UI For WinForms | Graphics & GDI+ Tutorial | Websites For Free Icons
    ~ QUOTE: Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rich Cook

    ~ eyeRmonkey.com

  36. #36

    Thread Starter
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: Add-In: Dim ...... As ______?

    this is AS IS.. i really just stopped mid "playing" and zipped it...

    give it a run through.. some stuff works.. other stuff is in its infancy.

    open the project.. run it
    then start a new instance of VB
    add new exe... switch to code window of form1

    the window that shows is dockable and fits nicely between the project and properties window.

    let me know what u think "so far"

    (ATTACHEMENT REMOVED! NEW VERSION PLACED IN FIRST POST)
    Last edited by Static; Dec 9th, 2005 at 04:26 PM.
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  37. #37
    No place like 127.0.0.1 eyeRmonkey's Avatar
    Join Date
    Jul 2005
    Location
    Blissful Oblivion
    Posts
    2,306

    Re: Add-In: Dim ...... As ______?

    A couple this I noticed:
    1) Youre window for the Procedure formatter is set to always on top of everything instead of just ontop of the IDE. I'm not sure how you would code it to just be on top of the IDE without being modal, but I'm sure there is a way.
    2) I have XP styles on in my IDE and anywhere that you use a frame you have to put a picture box ontop of the from otherwise things look like the image attached below.

    Other than that things look good. I didn't check too closely though.
    Attached Images Attached Images  
    Visual Studio 2005 Professional Edition (.NET Framework 2.0)
    ~ VB .NET Links: Visual Basic 6 to .NET Function Equivalents (Thread) | Refactor! (White Paper) | Easy Control for Wizard Forms | Making A Proper UI For WinForms | Graphics & GDI+ Tutorial | Websites For Free Icons
    ~ QUOTE: Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rich Cook

    ~ eyeRmonkey.com

  38. #38
    Admodistrator |2eM!x's Avatar
    Join Date
    Jan 2005
    Posts
    3,900

    Re: Add-In: Dim ...... As ______?

    Quote Originally Posted by eyeRmonkey
    Remix, you're saying that Collections are faster than arrays unless the array is very large?

    I'm not sure that is what you meant, but if that is what you meant, then I am 95% sure you are incorrect. A collection is just a form of an array but each element takes up a lot more space and there is a lot more processing going on for each element. Especially since the "Key" is a variant (and can be a string or the index number).
    Not saying if its a large array, just big enough so you dont have to redim it. Collections are faster if you redim..

  39. #39

    Thread Starter
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: Add-In: Dim ...... As ______?

    Quote Originally Posted by eyeRmonkey
    put a picture box ontop of the from
    what do u mean? use a picbox instead of the frame? or use a picbox to "contain" the frame? or.. use a picbox inside the frame?
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  40. #40
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: Add-In: Dim ...... As ______?

    Inside

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width