Results 1 to 15 of 15

Thread: Popup Question

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2002
    Posts
    15

    Question Popup Question

    Hello there...

    can anyone help me with how to make a popup window?
    i mean, like msgbox but with textbox in it - That i'll be able to insert data in it while my program is running.

    Thanks
    Spofer

  2. #2
    Fanatic Member arsmakman's Avatar
    Join Date
    Dec 2001
    Location
    Leiden, Netherlands.
    Posts
    719

    Re: Popup Question

    Originally posted by Spofer
    Hello there...

    can anyone help me with how to make a popup window?
    i mean, like msgbox but with textbox in it - That i'll be able to insert data in it while my program is running.

    Thanks
    Spofer
    Use InputBox
    No matter how fool-proof your program is, there will always be a better fool.

    Was a post helpful to you? Rate it!

  3. #3

    Thread Starter
    New Member
    Join Date
    May 2002
    Posts
    15
    Thanks!!!

    now how do i use the input? and is there a way to make the input box smaller?

    Thank You
    Spofer

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333
    Another alternative would be to create your own pop up using a form.

  5. #5
    Swatty
    Guest
    Thanks!!!

    now how do i use the input? and is there a way to make the input box smaller?

    Thank You
    Spofer
    declare a string variable and fill it up with the inputbox

    VB Code:
    1. Dim s as String
    2.  s = InputBox("Insert a text to popup", "Popup title", "default value")

    the string holds the input which you can work with

  6. #6

    Thread Starter
    New Member
    Join Date
    May 2002
    Posts
    15
    Thanks!!! It works great

    Spofer

  7. #7
    yakie
    Guest
    Originally posted by Hack
    Another alternative would be to create your own pop up using a form.
    hi
    can u tell me how to create my own pop using form and how to creat a pop up or form in runtime? can u post the code please

  8. #8
    Fanatic Member faisalkm's Avatar
    Join Date
    Oct 2000
    Location
    Germany
    Posts
    752
    create a form as you would usually do it in vb and show it only when you want. or you only need a runtime form?
    Faisal Muhammed
    Homepage:I Started making it in 1994 ...Still Under Construction
    Using

    Visual Basic 6.0 Enterprise SP5
    Embedded Visual Basic 3.0
    SQL Server 2000
    Windows 2000 Proff
    Delphi 6.0


    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.

  9. #9
    Frenzied Member macai's Avatar
    Join Date
    Jul 2001
    Location
    Napanoch NY
    Posts
    1,228
    Put this into a module
    VB Code:
    1. Public Sub PopupForm(Pfrm As Form, Cfrm As Form)
    2.  Dim f As Form
    3.  Set f = Cfrm
    4.  f.Show
    5.  Pfrm.Enabled = False
    6.  Do Until f.Visible = False
    7.   DoEvents
    8.  Loop
    9.  Pfrm.Enabled = True
    10. End Sub
    Heres the use:
    VB Code:
    1. PopupForm frmParent, frmChild
    When frmChild is closed or hidden, it ends the function.
    Luke

  10. #10
    old fart Frans C's Avatar
    Join Date
    Oct 1999
    Location
    the Netherlands
    Posts
    2,926
    macai, the following does the same in one line of code:

    frmChild.Show vbModal, frmParent

  11. #11
    Frenzied Member macai's Avatar
    Join Date
    Jul 2001
    Location
    Napanoch NY
    Posts
    1,228
    Originally posted by Frans C
    macai, the following does the same in one line of code:

    frmChild.Show vbModal, frmParent
    Even though i like VB because of it's quickness, i like to be the
    most precise and the least dependant on Microsoft's prewritten
    code. And it was easy writing that in VB, so nothing harmed.
    Luke

  12. #12
    old fart Frans C's Avatar
    Join Date
    Oct 1999
    Location
    the Netherlands
    Posts
    2,926
    What is wrong with using VB code if you are using VB?


    BTW, your code does not conform to the standards for window ownership. You open a form, and disable the form that should be the owner instead. If you run this code on a terminal server, you risk changing the ZOrder of your forms because no ownership is specified. The form that should be modal could be displayed beneath the disabled form, and couldnt be reached by the user.

  13. #13
    Frenzied Member macai's Avatar
    Join Date
    Jul 2001
    Location
    Napanoch NY
    Posts
    1,228
    OK you got me, but what i meant by independance is i'd rather
    write a quickie sub routine instead of have VB do it for me.
    Luke

  14. #14
    yakie
    Guest
    Originally posted by faisalkm
    create a form as you would usually do it in vb and show it only when you want. or you only need a runtime form?
    i only need a run time form

  15. #15
    yakie
    Guest
    Originally posted by faisalkm
    create a form as you would usually do it in vb and show it only when you want. or you only need a runtime form?
    i only need a run time form

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