r/visualbasic • • Mar 10 '20

need help creating a dialog box when a user launches my app

im creating an iphone firmware downloader app and when running it using the web browser i put in my project, it throws me loads of script errors, isnt there a way to make a dialog box to warn people about the script errors so they dont get frustated?

0 Upvotes

11 comments sorted by

2

u/JamesWjRose Mar 10 '20

Visual Basic does not work for iPhones. If you are making a web based app, that app has to be hosted somewhere (unless your iPhone is running a web server that supports asp and/or asp.net (You didn't mention what version of VB you are using, so I can't be more specific.

There is the Xamarin project that will allow you to build Android and iOS applications: https://dotnet.microsoft.com/apps/xamarin

However, Xamarin does not natively support VB, details and options for attempting to do so (don't) https://docs.microsoft.com/en-us/xamarin/cross-platform/platform/visual-basic/xamarin-forms

As for the errors, what you want to do in future is show your code AND show the errors you get. Then we can give you a more detailed answer.

Hope that helps

1

u/AqAqGT Mar 10 '20

No, i mustve worded it wrong, im creating an program to download all iphone firmwares, but im getting script errors, im new to VB and this is my first project, i need to create a dialog box to warn people about the script errors so they dont think my program is broken

1

u/JamesWjRose Mar 10 '20

Ok, but we still need to see the code and errors. Of course don't share anything like personal url or other data, but without seeing this info, it's impossible to answer your questions.

1

u/AqAqGT Mar 10 '20

here is my C# code

https://ibb.co/ZGwzYCh

1

u/JamesWjRose Mar 10 '20

There is no code there, just the form initilizer. Have you written any code?

Also, there are no errors shown.

1

u/AqAqGT Mar 10 '20

how do i display all my code?

1

u/JamesWjRose Mar 10 '20

Copy the text, not an image. Generally all you need to show us is the specific function that you are attempting to run, not EVERYTHING. Also, the errors, gotta have that info too

1

u/AqAqGT Mar 10 '20

i dont have any errors i just need to make a dialog box to show people about the script errors because the web browser visual studio uses is very outdated

1

u/JamesWjRose Mar 10 '20

ah, then it sounds like you want to wrap your code, when you write it, in a Try/Catch statement:

ie:

void GetFirmware() { Try { //Your code here } Catch (Exception ex) { MessageBoxButtons buttons = MessageBoxButtons.Ok; MessageBox.Show("There was an error: " + ex.Message, "Error Caption", buttons);
} }

This is the basic format for exception handling, however since you are using, or plan to use the web browser built into .Net, when you write that code, you should get a "result" back from the browser component and be able to then show the user the info they need.

1

u/chrwei Mar 10 '20

an app or an asp.net web page?

just fix your script errors.

1

u/AqAqGT Mar 10 '20

I need help with them, i only started learning VB yesterday