DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Page 2 of 2 FirstFirst 12
Results 16 to 22 of 22

Thread: pass the content of text box to Word

  1. #16
    Join Date
    Jun 2008
    Posts
    12

    How to create popup menu by coding

    I design the menu heading by menu editor on MDIForm

    ex : Accounts Payroll on MDIform using Menu Editor I know how to create popup menu using MENU EDITOR

    but I want to create Accounts Sub Menu by coding How to do that please Show me some code for above ex.


  2. #17
    Join Date
    Mar 2008
    Location
    Lancashire, UK
    Posts
    156
    On the menu editor, there's a button that's an arrow pointing right.
    Select your submenus, and indent them.
    The menu above them that isn't indented is the parent, or whatever it's called

    (See attachment)


    For a popup menu, do this:
    Code:
    PopupMenu MenuName
    If you want a default menu, try this:
    Code:
    PopupMenu MenuName, , , , DefaultSubMenu
    Attached Images Attached Images

  3. #18
    Join Date
    Jun 2008
    Posts
    12

    I reached the limit of menu editor

    as i explain of my previous mail that my mdiform contain two menu options account and payroll when i created sub options of account there are it contain many sub options.
    and when i start creating sub options of payroll then menu editor gives an message that "REACHED LIMIT CANNOT CREATE ANY MORE CONTROLS FOR THIS FORM"
    that's i want to create sub options of payroll by coding please help me some coding example

  4. #19
    Join Date
    Mar 2008
    Location
    Lancashire, UK
    Posts
    156
    Oh i see. The only way to have more controls is to use a control array.
    Or move them somewhere else, or something.

    Anyway.

    On the menu editor, set the index of a submenu that you to duplicate to 0 or 1.
    (See Attachment)


    Then if you want more, you can load them in:
    Code:
    Dim i As Integer
    
    i = SubMenu.Ubound + 1
    Load SubMenu(i)
    SubMenu(i).Visible = True
    SubMenu(i).Caption = "Submenu " & CStr(i)
    When someone clicks the menu, you will have to decide what your program does by using the index that is passed to the _Click procedure:
    Code:
    Private Sub mnuSub_Click(Index As Integer)
    
    If Index = 0 Then
        'The top menu was clicked
        
    ElseIf Index = 1 Then
        'Second menu was clicked
        
        'And so on...
    End If
    
    End Sub
    Attached Images Attached Images

  5. #20
    Join Date
    Jun 2008
    Posts
    12

    how to link using command buttan in VB to different folder

    Hi

    how to link using command buttan in VB to different folder which is located some where in computer

    command1 contain this code but not working it gives type mismatch error

    ex c:Abu\USA\Hind\my.doc

    the above my.doc document should open when i click command buttan
    please help

  6. #21
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,663
    What is the exact code that gives the type mismatch (type mismatch is one of the easiest things to fix as the cause is pretty evident in most cases but I need to see the entire code listing)

  7. #22
    Join Date
    Mar 2008
    Location
    Lancashire, UK
    Posts
    156
    I'm guessing that you want to open that word document when you click a command button. Try this:
    Code:
    Private Const SW_SHOW = 5
    Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" ( _
        ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, _
        ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
    
    
    
    Private Sub Command1_Click()
    Const Path = "c:\Abu\USA\Hind\my.doc"
    
    ShellExecute 0&, "Open", Path, 0&, 0&, SW_SHOW
    
    End Sub

Similar Threads

  1. Replies: 4
    Last Post: 11-28-2005, 03:14 PM
  2. Text box validate on Access Please help
    By benz84 in forum VB Classic
    Replies: 2
    Last Post: 11-14-2005, 05:38 AM
  3. ? Centering text vertical in a text box
    By Patrick Ireland in forum .NET
    Replies: 2
    Last Post: 07-22-2002, 02:36 PM
  4. HELP!! uncovering hidden dialog box
    By TC in forum VB Classic
    Replies: 0
    Last Post: 09-29-2000, 11:53 AM
  5. Hiding the text in Rich Text Box
    By Javaid Ahmad in forum VB Classic
    Replies: 0
    Last Post: 04-13-2000, 11:46 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center