Directing Through Forms?(Please Reply)
I have a program, where the user has two options in the beggining. Its a pizza ordering program.
What happens is that the user gets to choose whether he/she wants a delivery or a pickup.
If he/she chooses pickup, he/she will be directed to form1. If he/she chooses to pickup, he/she will be directed to form2.
After that, no matter what the user chose in form0, the user will be directed to form3.
Later what if I want the user who chose pickup to be directed to form4 and the user who chose delivery to be directed to form5?
I am trying to use the following code but it doesn't work:
Private Sub cmdNext_Click( )
VB Code: If Form0.Command1.Click = True Then Form4.Show Form3.Hide ElseIf Form0.Command2.Click = True Then Form5.Show Form3.Hide End If End Sub
Could anyone please help!
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Everything About Forms(Please Reply)
I am trying to change the title bar of my form. I either want to change the color, the shape or just paste a new form. I am trying to put images instead of the close, maximize and minimize buttons on the title bar. I still can't find a way to do it. Can anybody help.
Another thing is that i do not know how to make multiple forms and switch from one to the other. could u please post on that too.
Help With Data Directing
Ok I have made it threw the Alpha And beta and know its time to go full gear and try to get my program on the market
but now what i have to do is i need a simple interface
And not the bulky confusing i had in Beta.
But ok what if i had a for that asked you
Please Enter your name
And on the Form the comes up after
It shows the name that you had put on the form before
can anyone help me here
Re-directing Graphical Output To A Pic Box
I have been able to direct the output of the Multi Media control to a picture box control. How can I direct the output of a Powerpoint window ( I am using the powerpoint object model) to a picture box control? I have looked at the API functions but nothing is obvious!
Re-directing Output Of Shell
I want to ping a workstation and re-direct the output to a text file. I have tried doing this using shell but it does not work.
shell "ping NTW123123 > C:files.txt"
This works in DOS but not through VB. Any ideas ?
Command.com..Directing Output...
Here's how I did it and it works. This is in Windows NT so just change the Path to whatever it should be for you.
Code:
Private Sub Command1_Click()
Dim x As Double
x = Shell("C:WinNtSystem32Cmd.Exe", vbNormalFocus)
DoEvents
SendKeys "Test"
End Sub
Directing Output To The DOS Command Window
Hi,
I am trying to write to the standard output window from a VB app. I call my app several times from a batch file but want to get some sort of response as it goes along.
I gather that there are limitations with what you can do with DOS - see these threads in the forum and MSDN
Thread1MSDN
Basically I am trying to repduce what Java does with System.out.println
or Visual basic's debug.print but to the command window that called the batch file.
Can any one tell me if this is possible, and if so what bit so of the MSDN article/other code do I need to use - ( the article is more complicated than I need).
thanks in advance
JAS
Directing What Happens When Cancel Is Click On InputBox
I am trying to direct what happens when the cancel button on an inputbox is clicked. I want the current form to disappear and the menu form to reappear. It doesn't happen, the frmEmployeeData shows when the Cancel or OK is clicked. I tried to unload the Employee form rather than hide, but then I get an error (object unloaded) immediately on my Menu form. Here is the code. Any help would be greatly appreciated.
private Sub Form_Load()
Dim EmployeeNumber as Variant
frmEmployeeData.BackColor = &HC00000
frmEmployeeData.Show
TabStrip1.Visible = false
Frame1(0).Visible = false
Frame1(1).Visible = false
Frame1(2).Visible = false
Frame1(3).Visible = false
'
EmployeeNumber = InputBox$("Employee Number ('S' for Search)")
If EmployeeNumber = "" then
frmEmployeeData.Hide
frmMenu.Show
End If
'
'Add employee data code
'
TabStrip1.Visible = true
Frame1(0).Visible = true
Frame1(1).Visible = true
Frame1(2).Visible = true
Frame1(3).Visible = true
for i = 0 to Frame1.Count - 1
With Frame1(i)
.Move TabStrip1.ClientLeft, TabStrip1.ClientTop, _
TabStrip1.ClientWidth, TabStrip1.ClientHeight
End With
next i
DoTabLogic
End Sub
Thank you,
Catrina
Reply For Marce22 (sorry, Tried To Reply To Post)
** Note ** Sorry, I kept trying to post this as a reply to Marce22's question below, but I kept being given an error, so I hope this will do for you
http://www.devcity.net/forums/topic.asp?tid=31406
Hi marce, I think this kind of thing might help you.
The way this works is that as the form loads, the position of your object is tested, & then the boolean dictating the starting direction is set, be it up or down.
I'll post the code & a test form, if you place the cmdButton at the top half of the form & start the prog, it'll move down, & vice~versa if you place it at the lower half of the form.
I left the "bouncing button" code (the timer1 sub) in there so you can see what effect it has for yourself.
Code:
Dim BlnmovingUp As Boolean
Private Sub Command1_Click()
Timer1.Enabled = Not Timer1.Enabled 'just lets you turn the demo on/off
End Sub
Private Sub Form_Load()
If Command1.Top < Me.Height / 2 Then BlnmovingUp = False
If Command1.Top > Me.Height / 2 Then BlnmovingUp = True
End Sub
Private Sub Timer1_Timer()
If Command1.Top < 0 Then BlnmovingUp = False
If Command1.Top > Me.Height - Command1.Height Then BlnmovingUp = True
If BlnmovingUp = True Then Command1.Top = Command1.Top - 30
If BlnmovingUp = False Then Command1.Top = Command1.Top + 30
End Sub
Is this helping at all?
Good luck,
Code:BigJim_Wake()
If Me.bIsDrunk Then Call Cab And GoTo Bed
If Not Me.bIsDrunk Then Call Mates and GoTo Pub
End Sub
Edited by - BigJim on 6/22/2003 4:07:59 AM
Ini And Batch Directing Application Path Problem.......
i am writing code were my appication can access my MS Access database on any computer when the folder is downloaded to with the program. the problem is when i set the dar.ini file to: [General]
ConnectString = "\Deed Adult ResidentialCopy of SeniorProto1.mdb" it gives mt an error saying:
[Microsoft] [ODBC Driver Manager] Data source too long
Any suggestions?
i wrote this ini.bas module code:
Code:
Declare Function GetPrivateProfileString Lib "Kernel32" Alias "GetPrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Long, ByVal lpFileName As String) As Long
Declare Function WritePrivateProfileString Lib "Kernel32" Alias "WritePrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpString As Any, ByVal lpFileName As String) As Long
'Declare Function GetPrivateProfileString Lib "Kernel32" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Integer, ByVal lpFileName As String) As Integer
'Declare Function WritePrivateProfileString Lib "Kernel32" (ByVal lpApplicationName As String, ByVal lpKeyName As String, ByVal lpString As Any, ByVal lplFileName As String) As Integer
Type keylist
keyname As String
keyvalue As String
End Type
'---------------------------------------------------------------
'Reads keyvalue for given ini file, section, and keyname
'
'Parameters:
' section string by value
' keyname string by value
' strdefault string by value
' size integer by value
' filename string by value
'Returns:
' keyvalue string
'---------------------------------------------------------------
Function ReadINI(ByVal section As String, ByVal keyname As String, ByVal strDEFAULT As String, ByVal size As Integer, ByVal FileName As String) As String
Dim result As Integer
Dim strtemp As String
strtemp = Space$(size)
result = GetPrivateProfileString(section, keyname, strDEFAULT, strtemp, size, FileName)
'Debug.Print result
'Debug.Print Len(strtemp)
ReadINI = Left$(strtemp, result)
End Function
'---------------------------------------------------------------
'Reads all keynames and their keyvalues for a given ini file and section
' (total size of all keynames and 1 null per, limited to 5000 characters)
'Parameters:
' section string by value
' filename string by value
' keyarray array of keylist by reference
'Returns:
' number of array elements integer
'---------------------------------------------------------------
Function ReadINIKeys(ByVal section As String, ByVal FileName As String, keyarray() As keylist) As Integer
Dim strtemp As String
Dim size As Integer
Dim count As Integer
Dim xpos As Integer
Dim startpos As Integer
Dim keytemp As String
Dim valtemp As String
size = 5000
strtemp = Space$(size)
result = GetPrivateProfileString(section, 0&, "", strtemp, size, FileName)
strtemp = Left$(strtemp, result)
'Debug.Print result
'Debug.Print "["; strtemp; "]"
xpos = 1
startpos = 1
count = 0
Do While xpos > 0
xpos = InStr(startpos, strtemp, Chr$(0))
If xpos > 0 Then
keytemp = Mid$(strtemp, startpos, xpos - startpos)
count = count + 1
ReDim Preserve keyarray(count) As keylist
keyarray(count).keyname = keytemp
valtemp = ReadINI(section, keytemp, "", 128, FileName)
keyarray(count).keyvalue = valtemp
' Debug.Print startpos, xpos, "["; keyarray(count).keyname + "]=[" + keyarray(count).keyvalue; "]"
startpos = xpos + 1
End If
ReadINIKeys = count
Loop
'Debug.Print "=================="
End Function
'---------------------------------------------------------------
'Writes keyvalue for given ini file, section, and keyname
'
'Parameters:
' section string by value
' keyname string by value
' keyvalue string by value
'
' filename string by value
'Returns:
' status integer
'---------------------------------------------------------------
Function WriteINI(ByVal section As String, ByVal keyname As String, ByVal keyvalue As String, ByVal FileName As String) As Integer
Dim result As Integer
result = False
'On Local Error Resume Next
result = WritePrivateProfileString(section, keyname, keyvalue, FileName)
WriteINI = result
End Function
Then i wrote this code for my start up sub main module:
Code:Option Explicit
Global g_ConnectString As String
Global t As Integer
Private Sub Main()
Dim g_INIFile As String
g_INIFile = App.Path & "dar.ini"
g_ConnectString = ReadINI("General", "ConnectString", "", 256, g_INIFile)
'Display splash screen while loading main form
frmSplash.Show vbModeless
End Sub
Then dar.ini is an outside notepad file with the ini extention:
[General]
ConnectString = "\Deed Adult ResidentialCopy of SeniorProto1.mdb"
IRC Reply 333
in IRC when you join a channel with a topic set at reply code other than RPL_TOPIC (332) is sent after 332. this is 333, and as far as i can see its info about who and when the topic was set. an example syntax is
:server.address.ext 333 User #channel TopicSetter SomeNumber
my problem is with SomeNumber. i believe this to be a timestamp, i just cant figure howto convert it to a readable date. an example of this value is 1094574418 which i know (via mIRC) that the topic was set on Tue Sep 07 17:26:58.any ideas?
Reply SMS.
I have this code with me to send SMS to a person. But i want to know how to reply to a person who sent a msg to me. Can someone help me?
Private Sub cmdSendSMS_Click()
Dim FromModem
MSComm1.CommPort = 1
MSComm1.Settings = "9600,n,8,1"
MSComm1.PortOpen = True
MSComm1.Output = "AT+CMGS=" + Text2.Text + vbCr
MSComm1.Output = Text1.Text + Chr(26)
Do
If MSComm1.InBufferCount <> 0 Then
FromModem = MSComm1.Input
'If InStr(FromModem, "OK") Then
MsgBox "SMS message successfully sent!"
Exit Do
'Else: MsgBox "sms nt sent"
'End If
End If
Loop
MSComm1.PortOpen = False
End Sub
AIM Reply
for the longest time ive wanted to make an AIM(Aol instant messenger) bot. Not an annoying one that spams people, one the replies based on what they said. I have found modules on the internet that allow me to send messages through AIM, and ive found examples of chat bots, but the one thing i cant find it how to get the text that soneone has sent. In other words, i dont know what the other person is saying in the chat. Is there a way i could figure out how, or is the a module out there that already has that function in it?
-thanks
Please Reply
i was wondering whether anyone could give a order in which everything in your scripts would be ordered...
Reply
Hi,
That is a shame... but 'they' seem to use them within XP.
What is the latest Patch for VB6 (or the common controls). I have SP5 for VB and SP4 for common controls.
Do you have the web address of where I can download any new patches.
Thanks,
Rob D.
Please Reply
Hi All You VB Lovers
I know I'm not much of a contributor but I've been going through quite alot of posts and I see so many people not using tabs in there code. I would like to have some comments on this topic not for me but for the other people and the newbies. This is one of the topics the put stress on in varsity we even lose marks for not using tabs.
Ex.
Code:
For K = 1 to 5
W = W + 1
Next K
compared to this
Code:
For K = 1 to 5
W = W + 1
Next K
please reply and give some advice to personal experience or something
Cheers
Please Reply At Least To This One .
I have created my dll injector in c++ but it wont run on my vb6 version still and i have narrowed the problem down .
In C++ this code injects my DLL
void* threadid = CreateRemoteThread(processhandle,0,0,(LPTHREAD_START_ROUTINE)libraryaddy,allocated,0,0);
I have the same thing in vb6 but it wont inject
Dim threadid As Long
threadid = CreateRemoteThread(processhandle, 0, 0, loadlibraryaddy, allocated, 0, ByVal 0)
As you can see the only thing diferent here is the declaration of :
(LPTHREAD_START_ROUTINE)
Please respond .
Tx
Thanks For Reply
Web browser is not reliable if any other control or any other way pleae heel
Noone 2 Reply??????????????
hi
We r working in 3-tier environment with VB6 as front end, Middle tier (Dlls also in VB6), and Oracle 8i as back end and Win 2000 OS.
We hav a network of about 400 odd win 2000 systems...all our applications are running perfectly....but now all of a sudden vr caught in a problem....all the applications hav gone slow and frequently vr getting "SWITH TO RETRY " Problem and the call time for the Components (in COM+) are increasing ...can any one pl help us solve the prob...
plzzzzzzzzzzz let me know ur views / ideas even though they r not exact solutions....
ThanX in Advance.
Ksm
Reply
Trouble is, i already use quotes.
The string being sent to DOS is this:
"E:Program FilesRunMeNow.exe -I "E: empinput file.txt" -O "E: empoutput file.txt""
I need the texts around the two parameters and adding the quotes to the front and end of the string is causing DOS to throw its toys out of its pram
??
REPLY!!!!!!
DirectDraw transparencies
http://forums.vb-world.com/showthrea...threadid=46802
Reply
In an ActiveX control this will work
code
---------------------
Private Sub cmdMusic_Click()
On Error Resume Next
cdlMusic.ShowOpen
MediaPlayer1.FileName = (cdlMusic.FileName)
End Sub
---------------------
end code
you will need to add the common diallog 6 and mediaplayer components for this
and of course have a commondialog called cdlMusic and a mediaPlayer called Mediaplayer1
Im not sure how to work it in a form tho as media player is an activeX program
Reply
First , my dear friend
read carefully , i want to know WHY does the modem returns also what i have written
and may i add : checking the CTS/RTS - information about that will be very nice
Thank You
Reply
hello
. To use the UpDown control in your application, you must add the
MSCOMCT2.OCX file to the project.
if you like to know this control in detail u will find it in
detail in MSDN....if you dont have MSDN i will give you sample to
try code....
bye, Regards
Payal
Plz Reply Soon
hai vikram,
how r u.i am 5n.my question is how to add icon to the form,when the form is at load event.
bye
ramkumar
No Reply
well you guys never replied to my early post...that is why i have deleted it.
Edited by - tomkat on 7/30/2004 7:29:18 AM
Reply
Hi Buddy.
I have tried it on client side only.
xy = path and name of exe.
ReturnValue = Shell(xy, 1)
Please Reply VB6
Hi,
I am developing an application in VB6 accessing an Access 97 database. Now I am going to start developing the security part of the application and I have several questions:
1- Can I use access security from VB6: Adding new users, deleting, etc. Also new user groups. In other words can I control the security from VB6 the same way that I do
it from access.
2- Also I am going to need to count the number of users that are accessing the database every time a new user tries to sign on in the application. I am trying to limit the
maximum number of user to 5. (I am using dataenviroment in case you need to know).
I really hope some body can help me,
Thanks in advance…
Alvaro
Plz Someone Do Reply
hello,
i need help in selecting my master's thesis.
Is there anybody who can suggest topics?
My interest is in database programming n desktop application development using VB.
Regrads,
shahzad
shehzad-ahmad@usa.net
Doldrums Reply
Hard to believe that "Ovoid" is not in more threads! In VB.Net you can make ovoids with the Graphics.DrawClosedCurve function. If you pass it an array of points that represent a triangle or triangular quadrilateral...
Does the windows GDI have similar functions (maybe the bezier functions)?
Ident Reply
im making a irc prog with winsock and as you know some irc servers require a ident response in order to connect to their server.
i was wondering how to send the ident reply or what to send
Reply Automation
hi i wanted to know how to automatically send a reply email back to someone who has just sent me one. for example automatic acknowledgment of emails(i have recieved your email). using vb 6 and outlook 9. greatful for any help. cheers
Out Of The Office Reply
Outlook 2000
Does anybody know how I may avoid answering to an incoming message if it is an Out of the Office Reply?
I have a module that generates a reply if the incoming message does not have any attachment, but if it is an out of the Office reply I don't want to generate a reply.
I would have thought that "Icon" would exist as a property to a Mailitem. I have tried with Autoforwarded Property, but it does not work.
Look forward to some help.
Reply To An Email
Hi I want to know why the following code just resends the email (as if it was resen from who sent it) and does not change the "senders" and "to" address.
Dim m As MailItem
Set m = ActiveExplorer.Selection(1)
m.Reply
m.Body = "We reply"
m.send
Thanks
Reply Message
Hi,
I'm trying to make a feedback box for a Beta version of my software however, I'm not sure how to make it email to me.
Any help is greatly apprieciated.
Reading And Reply
Hi there,
at this moment I'm kinda struggling with a problem.
I need to create a function in which a user types a sentence in a textbox, and the VB program needs to check inside a .txtfile if there's a same line which matched the user input.
I've already figured that out, but the next problem is to let the program say another line, which is stated below the condition.
This is the content of the 'commands.txt'
[Commands]
hear = test
say = Test succesfully received.
The bot checks underneath the [Command] if there's anything matching the user input, if this is true, he needs to create a messagebox with the content behind 'Say ='...
the code I use to read the file is:
Code:
Dim txt As String
freenum = FreeFile 'find a free filenumber to avoid conflicts
Open app.path & "commands.txt" For Input As #freenum
While Not EOF(freenum)
Line Input #freenum, txt ' 1 whole line is read
If InStr(txt, "hear=" & txtCond.text) Then
msgbox '// --- the reply next to 'say='
End If
Wend
it's also the fact that more commands should be added...
so if anyone has some idea's about how to do it better than this....
please post them! you'd really help me!
could you please help me with this?
Reply To Boy... On Deleteing
here is a quick example of a really basic way to delete records. If you wanted to see a proper password system with encryption and the like, just leave a reply here and i will put together a demonstration ASAP.
Tris
Only one thing in life is certain - you won't get out of it alive
Reply To Address
any one knows what is the command to set the reply address in email for example when i try to send email im going to telnet or what ever i use winsock to conect to mail server then i do this
HELO [my ip] it replys something.. then i do
MAIL FROM: [my email] then
RCPT TO: [someones email] then
DATA
SUBJECT: [my subject] then
[my message]
.
this sends an email.. any one knows how to set REPLY address like if the user replys to the email i just sent it'll sent the email to the address i set
thanks..
I Need Major Help Please Reply With Any Help! Plz
ok this is what i need a code to extract the third case in this sentance 2,547 Slasher66 2 $1,300 $0 <-- there is like 6 items in 1 sentance, i need the 3rd one :-) please can anyone help i already tried i failed but i did remove the first item in there cause i am gonna have a listbox full of items similar to "2,547 Slasher66 2 $1,300 $0" <-- i just need that 3rd item extracted or how u say splitted.. from the items oh p.s: the whole thing is in one line! its like this "1,000 myname 10 $2,000 $100"
XP Look And Feel: Please Reply
hi
I am visual basic 6.0 programmer.
I want to change the look and feel of my vb code depend on the Operating system.
I heard that by using line of code in our application will change the look and feel of appliaction depend on the OS.
Please reply if possible with a code
Thank you
Auto-Reply
Okay, I need a little help starting this one.
I was assgined the assignment to make an Auto-Reply for Msn Messanger, or basicly Windows Messanger.
Here's the basic idea:
-My program would trigger when a message was recieved
-It would get the new message and filter through for certain things and if it found anything the user wanted, it would auto reply.
The main problem is I have no clue on how to interact with other programs. I'm thinking it would have to do with memory based stuff, but im not sure.
I just need to know how the trigger would work, how to grab information and then send a message. Does anyone have some good examples/tutorials?
Need Urgent Reply
hi,
my frm file is not listing under the Forms. It's Listing Under the Modules.
is any solution for this thing. Even my file extenstion also .FRM only.
i want to open my frm file Under Forms.
Manesh
Abt Listitems;reply Me Soon
m using this code and getting the error of argument not optional.
can u plz tell me why m getting this type of error, and what wil be the correct code.
For Each itm In ListView1
If itm.Item.Checked = True Then
i = i + 1
End If
Next itm
MsgBox i
Way To Put Text In Vb: Please Reply!
Situation: I want to put text in a already-made visual basic program. Like I make "calculator.exe" and I want to 'license' it to somebody, and I ask the use to type there name in.
Ofcourse, I could just put it in a .txt file and recall it every time, but I want to keep 1 file -------> 1 file!
so also no .dll files or something like that.
Anybody got a solution?
Tonnic
|