Ok, how do i make so if ihave a form on and press a button and a new form opens on the right side of the first form and follows when i move the first form and also i cant move the second form from the side of the first one

Recommended Answers

All 9 Replies

on button click you just calculate the location of the new form:

newForm.Location= new point((alreadyOpenForm.location.X + alreadyOpenForm.Width),alreadyOpenForm.location.Y)
newForm.Show

for keep this newForm sticking on the right you add a handler locationChanged for the alreadyOpenForm and set the location of newForm in there.

hi!
we want to implement a project in vb2008wev have download a source code and it works alone.when we tried to call this form from another form it doest work and says this form is not declrate.the name of this form is form1 like the name of the form when we have put login.please can you tell us how to change the name of the form and how to declare it.please help us.
thx in advance

go into your designer, select the form and change the name in its properties.
to declare it you simply do:
dim frm as new form1
then you just need to use frm instead of Form1 to call the function.
but this is ofc just a guess since you didnt show any source code.

http://www.a1vbcode.com/app-3920.asp
this is the adress where you can find the code.please have a look at it.it works alone .we have one form thas is the log in.when we press log in qe go to another form named form2.then in this form we have three web service.two of them work and the third is this with the exchange rate but when i put the cod to the botton form1.show() and i run the program it doesnt show this form but the form of login because form1 is the same name for 2 forms.how can i resolve it please?????????

ok....go to your solutions explorer, right click your main form and choose rename. rename it to something like "MainForm")

then in your code behind you add:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
		  Dim frm As New Form1
		  frm.Show(Me)
End Sub

Example is attached

we have tried the code MainForm.show()
but it doesnt work for this .for the others it works.it isnt declared it says.please help me because is very impotant for me.

attach your solution here.
really dont get what your problem is.

can you sugest us another address where we can found free source code because we have this for our diploma and we dont know what to do.we have found some codes in the address the projec code but if you could help us with another it would be great.

wher can i sent to you the printscrin of what is shown.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.