Click here to Skip to main content
16,015,097 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am beginner .net

I try https://github.com/cbenard/SODailyMotionUpload I convert Vb.net Work good on console. but I want convert this on windows form project. I want upload with click upload button etc. I delete console.writeline codes but give error when come this code

client.UploadFile(uploadUrl, fileToUpload)

give error = request canceled



how to use this code in form project. any idea?

What I have tried:

I convert c# codes to vb.net
Combine in my project but give error
Posted
Updated 4-Sep-19 2:18am
v2

1 solution

Windows forms is very, very different from a console app: when you run a console app you control what happens when, and demand input from the user when you want it.
Windows apps work in a totally different way - they react to event that occur because the user did something, or something happened in the system
Just removing Console read and write instructions doesn't make it a windows application, and is likely the main source of your problem. When you took out the read-from-the-user stuff, you prevented processes that were occuring in the background (via Process.Start) for example from completing before your code continued.

You can't just take C# console code, translate it to VB, rip out the user I/O, and expect it to work as a "proper" windows app. You need to sit down and understand exactly what the original is doing, and how it works, then design a completely new windows application based on that. And we can't do your work for you!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900