none
How to make a button transfer to another page in Visual Basic (WPF) RRS feed

  • Question

  • Hello!

    I'm trying to make a button in the Mainwindow (which I called Wilton) to transfer the user to another page (which I called page1). 

    I've seen how to do it in C#, but I want to make this in Visual Basic. What code should I use?


    Wednesday, March 1, 2017 5:49 PM

All replies

  • The Response object is for web applications. If you are working with an ASP.NET app I would recommend posting  to the below forum:

    https://forums.asp.net/18.aspx/1?Web+Forms


    Paul ~~~~ Microsoft MVP (Visual Basic)

    Wednesday, March 1, 2017 5:57 PM
  • Hello,

    A Response.Redirect is very much a method of old HTML web creating

    Pages are as well something about that. In old VB persons were always talking about Forms, that still is an important presentation way of VB. But with VB you can currently do more. However, nowhere really related to what you write. 

    It seams you use Windows Forms, than if you have created more forms the normal command would be. 

    Construct the form and then show it preferable with

    TheConstructedForm.ShowDialog


    Success
    Cor

    Wednesday, March 1, 2017 5:58 PM
  • Wednesday, March 1, 2017 11:11 PM
  • Hi jontanner95,

    >>I'm trying to make a button in the Mainwindow (which I called Wilton) to transfer to another page (which I called page1).

    Based on your description, I'm not sure what is another page, is it a web page, or a winform form windows? Could you please describe it in detail.

    Best Regards,

    Cole Wu


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, March 2, 2017 7:29 AM
    Moderator
  • I'm not great at describing things, let alone in detail lol. So, I wanna make a separate page for this Kiosk I'm making that has links that will open up PDF files (which is another beast that I have to tackle), so I went to Project>Add page at the top of the screen, and it came up. So I created a button in the MainWindow that is labeled "Documents" (Which is what I'm trying to get to direct to page1) and a big red button on page1 that says "Button" (which will be the button that opens PDFs). Again, I apologize that I'm not a very descriptive person. 
    Thursday, March 2, 2017 12:45 PM
  • OK, so you are working on a WPF project. There is a forum where they should be able to help. If a moderator does not move this thread you can re-post to the WPF forum:

    https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=wpf


    Paul ~~~~ Microsoft MVP (Visual Basic)

    • Marked as answer by jontanner95 Thursday, March 2, 2017 7:50 PM
    • Unmarked as answer by jontanner95 Monday, March 6, 2017 5:20 PM
    Thursday, March 2, 2017 1:14 PM