Em-DaY
07-20-2003, 11:35 PM
ok i have 2 questions
I'm making a project and i need to know how to make a text box or label that shows the current time and/or date
im trying to make a menu sorta like windows' start button so that when u clcik on start other options become visible, but not when form loads. and when i clcik it again, they all dissapear.
Any suggestions?
wengwashere
07-20-2003, 11:44 PM
I'm making a project and i need to know how to make a text box or label that shows the current time and/or date
Lets say you have a textbox named "Text1". To show the Current Time and date on Text1 :
Text1.text = now()
im trying to make a menu sorta like windows' start button so that when u clcik on start other options become visible, but not when form loads. and when i clcik it again, they all dissapear.
Any suggestions?
You could make menu using the menu editor (Press ctrl+e on the design view of vb). Try playin around with that
Ales Zigon
07-20-2003, 11:45 PM
Use Date, Time, Now functions. If you want to display the running clock, then the easiest way is to use timer with interval of 1000.
For the second Q: One way would be to make the second form with labels on it (which you can color on mouse movement). Then put one Command button on the first form, declare one global Bolean variable like (bMenuVisible As Boolean) and when you press the button, set it to True and show the second form Nonmodaly. Then, when you click the button for the second time, just check the state of the variable. If it is true, close the form.
Em-DaY
07-20-2003, 11:57 PM
ok thx umm 2 last questions...
how do i set the timer up.. just add one with 1000 interval.. or do i have to conect it to the box?
and heres a question that im gonna half answer.. well i wanna know how i can make a sorta chat and i have 2 text boxes, now i have one small one where i write in my text and when i push enter, or clcik on my "Send" command button, i want it to erase what i just wrote in text box number 1, and add it under what ever is written in Big text box number 2. I dont know if my question is clear. Now im guessing that i have to write the following
Private Sub Send_Click
Chat.text = Chat.text+Input.text
End Sub
But im not sure.. correct me if im wrong
Em-DaY
07-21-2003, 12:07 AM
ok and how do i clear the text at the bottom?
wengwashere
07-21-2003, 12:14 AM
i suggest you use a label and not a textbox
Em-DaY
07-21-2003, 12:16 AM
How clever lol :P thanks, Now i tested it and everything works exep 1 thing... Every thing that apears in the chat boxt apears on after the other without changing line.
HiTmAN
07-21-2003, 02:26 AM
Change the Multiline property of the textbox to True, then replace this:
Chat.Text = Chat.Text & Input.Text
with this:
Chat.Text = Chat.Text & Input.Text & vbCrLf
Em-DaY
07-21-2003, 12:11 PM
Alright Thx a million to all of you :P