Search results for query: *

  1. L

    Question Code to convert UTF-8 into Windows-1252?

    In case someone else needs the code, here it is (as used in the SharpDevelop IDE instead of MS Visual Studio): Public Sub New() ' The Me.InitializeComponent call is required for Windows Forms designer support. Me.InitializeComponent() Dim w1252 As Encoding = Encoding.GetEncoding(1252)...
  2. L

    Question Code to convert UTF-8 into Windows-1252?

    Hello I googled for this and tried a few things, but I'm still stuck at something so simple. I simply need to let the user copy some UTF-8 text into the clipboard, convert it to Windows-1252, and paste the output back into the clipboard. It looks like I need to use the System.Text.Encoding...
  3. L

    Question Good FTP control?

    Hello I need to write a simple FTP client so that users can upload files to our server with no hassle. I'm using the VB 2010 Express IDE: Is there a good FTP control that you would recommend, either free or affordable? Ideally, it should be able to resume uploading in case the connection was...
  4. L

    Question Wrong use of regex?

    Hello I can't figure out why the regex object fails to find a pattern in a web page, although it's pretty simple and a test shows that the pattern is OK. Could it be that I misunderstood how VB's regex object works? Here's the HTML input: <table cellspacing="0" cellpadding="0" id="oft">...
  5. L

    Answered Pass data from BackgroundWorker to main thread?

    Thanks John, problem solved. Here's the code: Private Sub BackgroundWorker1_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker1.DoWork 'Lengthy process here e.Result = "Blah" End Sub Private Sub...
  6. L

    Answered Pass data from BackgroundWorker to main thread?

    Hello In a Windows Form, I need to delegate a lengthy action to a BackgroundWorker so that the main application doesn't freeze. However, the code in the BackgroundWorker must send data back to the main application. This code from MSDN doesn't include how to do this: Private Sub...
  7. L

    Question Accessing GUI from thread?

    Thanks for the feedback. I'll read up on RunWorker and async web downloads to figure it out.
  8. L

    Question Accessing GUI from thread?

    Hello I need to write an application that will download a few web pages. The action is launched by clicking on Button1. To avoid freezing the UI, I use a Background Worker. To prevent the user from clicking the button again while the pages are being downloaded, I'd like to disable the button...
  9. L

    Question [SQLite] Which package to install?

    Their wiki says that the "bundle" version contains System.Data.SQLite.dll, a single, mixed-mode assembly (SQLite + .Net wrapper), and should only be used "to support legacy applications by having it installed in the Global Assembly Cache (GAC)." I don't understand what it means. Does someone...
  10. L

    Question [SQLite] Which package to install?

    Got it: It just needs the following line at the top of the file: Imports System.Data.SQLite But I'm still curious about why there are so many options.
  11. L

    Question [SQLite] Which package to install?

    After installing "Visual Studio Express 2012 for Windows Desktop", I downloaded and ran "Setups for 32-bit Windows (.Net Framework 4.5) bundle 1.0.84.0". I left the default option checked "Generate native images for the assemblies and install the images in the native image cache", and didn't...
  12. L

    Question [SQLite] Which package to install?

    Hello I'd like to install the SQLite Ado .Net package, but am confused between... Setups Precompiled binaries Precompiled static ... and whether to use the bundle/no bundle option. The FAQ recommends always using the Precompiled binaries for both development and user hosts. I understand...
  13. L

    [webClient.DownloadStringAsync] How to make sure download occurs in right order?

    Thanks for the tips. I'll write the output into an SQLite database, so I can sort the results and write them into a single HTML file once all the threads are done.
  14. L

    [webClient.DownloadStringAsync] How to make sure download occurs in right order?

    Hello I need to write a small application to download web pages. I only need basic features, so I guess the WebClient object is good enough. To avoid freezing the UI, I was thinking of using WebClient.DownloadStringAsync(), but dowloading must occur in the right order, while...
  15. L

    Question Reading and writing UTF8 file?

    Thank you. Turns out the output file itself is indeed UTF8, and the display errors I had was due to an editor not really supporting it.
  16. L

    Question Reading and writing UTF8 file?

    Hello This is probably an easy issue for experts but Google didn't help. I need to read a text file that contains addresses formatted thusly: Address1 Address1 Address1 Address2 Address2 Address2 etc. ... and write them into this: Address1, Address1, Address1 Address2, Address2, Address2...
  17. L

    Question Convert from UTF8 to ANSI?

    Thanks John, I didn't know about that property. Problem solved.
  18. L

    Question Convert from UTF8 to ANSI?

    This doesn't work: Input page: <title>Cinéma Paradiso</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> Code: 'BAD EMPTY Dim Response As String = Encoding.ASCII.GetString(Encoding.Unicode.GetBytes(e.Result)) Dim Response As String =...
  19. L

    Question Convert from UTF8 to ANSI?

    Problem identified: There was a hidden LF character in the title, which is what was causing the error when creating the file. Next, I need to find a way to convert a UTF8 filename into its user-friendly ANSI alternative.
Back
Top