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
Printable View
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 InputBoxQuote:
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
Thanks!!!
now how do i use the input? and is there a way to make the input box smaller?
Thank You
Spofer
Another alternative would be to create your own pop up using a form.
declare a string variable and fill it up with the inputboxQuote:
Thanks!!!
now how do i use the input? and is there a way to make the input box smaller?
Thank You
Spofer
VB Code:
Dim s as String s = InputBox("Insert a text to popup", "Popup title", "default value")
the string holds the input which you can work with
Thanks!!! It works great :)
Spofer
hiQuote:
Originally posted by Hack
Another alternative would be to create your own pop up using a form.
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
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?
Put this into a module
Heres the use:VB Code:
Public Sub PopupForm(Pfrm As Form, Cfrm As Form) Dim f As Form Set f = Cfrm f.Show Pfrm.Enabled = False Do Until f.Visible = False DoEvents Loop Pfrm.Enabled = True End SubWhen frmChild is closed or hidden, it ends the function. :)VB Code:
PopupForm frmParent, frmChild
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 theQuote:
Originally posted by Frans C
macai, the following does the same in one line of code:
frmChild.Show vbModal, frmParent
most precise and the least dependant on Microsoft's prewritten
code. And it was easy writing that in VB, so nothing harmed. :)
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.
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.
i only need a run time formQuote:
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 formQuote:
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?