Open the browser loading page in C ++ Builder, and the builder Browser

Source: Internet
Author: User
Tags microsoft outlook

Open the browser loading page in C ++ Builder, and the builder Browser

When developing a project today, you must obtain an IP address that is queried based on the data and return it to the front-end to open it in a browser. This stuff is simple. There are corresponding API functions in C ++ Builder. Let's talk about them together:

Call External commands
If you use the default browser, call ShellExecute (NULL, _ T ("open"), _ T ("assumer.exe"), _ T (""), NULL, SW_SHOW ); if you open it with IE, call ShellExecute (NULL, _ T ("open"), _ T ("iexplore.exe"), _ T (""), NULL, SW_SHOW ); // you can use the API function ShellExecute for details on the Internet. For details, refer to the following: There are three Windows API functions that can run executable files WinExec, ShellExecute, and CreateProcess. The function of ShellExecute is to run an external program (or open a registered file, open a directory, print a file, and so on) and control the external program. Several API functions can implement these functions, but in most cases, ShellExecute is more used and not too complex. Function prototype: HINSTANCE ShellExecute (HWND hwnd, LPCTSTR lpOperation, LPCTSTR lpFile, LPCTSTR lpParameters, LPCTSTR lpDirectory, INT nShowCmd); parameter description: operation performed by the hwnd window name lpOperation, for example, "open", "print", and "explore" correspond to "enable", "print", and "Browse" respectively. They can also be empty (""), the default operation is performed. The file to be operated by lpFile. LpParameters if lpFile specifies an executable file, it indicates the running mode of the new nShowCmd application in the directory where the lpDirectory parameter is operated. The available values are as follows: SW_HIDE hides SW_MAXIMIZE to maximize SW_MINIMIZE and minimizes the Z order after this window (that is, the next layer of the window) in the window the started window SW_SHOWNA displays the window in the current status but does not change the currently started window SW_SHOWNOACTIVATE to display the window in the initial size, but does not change the currently started window SW_SHOWNORMAL to start and display the window, the windows will be restored if they are minimized. This value should be used when you run the program for the first time. Example 1: open the site ShellExecute (Handle, "open", "", nil, nil, SW_SHOWNORMAL ); if you set the FileName parameter to the "mailto:" protocol format, this function starts a preset mail client program, such as Microsoft Outlook (including Microsoft Outlook Express) or Netscape Messanger. Example 2: mail to (User Account @ mail server address) ShellExecute (Handle, "open", "mailto:", nil, nil, SW_SHOWNORMAL ); open the new email writing window and enter the recipient's location automatically. The following introduces some different usage: Start a new application: ShellExecute (Handle, "open", "c: \ test \ app.exe", nil, nil, SW_SHOW ); open notepad and open a file (the system can identify the path of the notepad application, so we do not need to use an absolute path) ShellExecute (Handle, "open", "notepad", "c: \ test \ readme.txt ", nil, SW_SHOW); ShellExecute (Handle," print "," c: \ test \ test.doc ", nil, nil, SW_SHOW); note: you may see that word is temporarily enabled, but it is automatically disabled.

Every time the IE browser opens, it jumps out of the page for managing the add-on.

This is also the problem on my computer. I have read a lot of answers, complicated and useless, and I made it myself. The method is very simple. Open the browser and turn off the management add-on, click the tool on the browser ---- internet Options ----- advanced ----- reset ----- OK. When the browser is closed, the management add-on will not pop up when the browser is opened.
If the website cannot be opened, the browser homepage is opened, but the link in the website is always loading, or the page is displayed incorrectly.

Hello, we recommend that you set it as follows:
1. on the desktop, right-click the network neighbor and choose Properties.
2. Double-click the local connection and click Properties.
3. Double-click Internet Protocol (TCP/IP)
4. Select "Use the following DNS server address", enter in the box, and click OK.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.