Open an HTML File in a Pop-Up Window

guclusat

Tanınmış Üye
Süper Moderatör
Open an HTML File in a Pop-Up Window
In AutoPlay Media Studio, it is possible to open an HTML document in the user's default browser. To accomplish this, please see the How Do I topic Open a web site in an external browser.

Open a Web Site in an External Browser
AutoPlay Media Studio contains a built in quick action which opens a website in the user's default browser: View Website. This is useful, for example, if you want a button labeled "Company Website" to open your company's website in the user's default browser.

To accomplish this use the View Website quick action:

  1. Create a button object.

  2. Double-click the button object, choose the Quick Action tab, and choose View Website as the action to run.

  3. In the Web site field, type your company's website address.

  4. Click OK.
 
AMS projelerinizde bir HTML dosyasını veya web sayfasını ayrı bir pencerede açmak için genellikle şu iki yöntemden biri kullanılır:

1. Dialog (İletişim Kutusu) Kullanarak​

En yaygın yöntem, projenize yeni bir Dialog sayfası eklemek ve bu sayfanın içine bir Web Object (Web Nesnesi) yerleştirmektir.
  • Adım 1: Yeni bir Dialog sayfası oluşturun.
  • Adım 2: İçine "Web" nesnesi ekleyin ve özelliklerinden URL kısmına dosya yolunu (örneğin: AutoPlay\\Docs\\index.html) girin.
  • Adım 3: Ana sayfanızdaki butona şu kodu yazın:
Kod:
Dialog.Ex("Dialog1", "", "", HTML_NORMAL);

2. File.OpenURL Fonksiyonu ile (Varsayılan Tarayıcıda)​

Eğer HTML dosyasının kullanıcının bilgisayarındaki varsayılan web tarayıcısında (Chrome, Edge vb.) açılmasını isterseniz şu kodu kullanabilirsiniz:
Kod:
File.OpenURL("AutoPlay\\Docs\\sayfa.html", SW_SHOWNORMAL);

3. HTTP.Open Web Sayfası İçin​

Eğer yerel bir dosya değil de bir internet sitesini pop-up gibi açmak isterseniz:
Kod:
File.OpenURL("https://www.uydudoktoru.com", SW_MAXIMIZE);
Bu yöntemler, uygulamanızın ana arayüzünü bozmadan kullanıcıya ek bilgi veya web içeriği sunmanıza olanak tanır. Projenizdeki ihtiyaca göre en uygun olanı seçebilirsiniz.
 
Geri
Yukarı