| 1 |
using System; |
| 2 |
using System.Collections; |
| 3 |
using System.ComponentModel; |
| 4 |
using System.Drawing; |
| 5 |
using System.Data; |
| 6 |
using System.Windows.Forms; |
| 7 |
|
| 8 |
namespace nft.controls |
| 9 |
{ |
| 10 |
/// <summary> |
| 11 |
/// WebBrowserControl の概要の説明です。 |
| 12 |
/// </summary> |
| 13 |
public class WebBrowserControl : System.Windows.Forms.UserControl |
| 14 |
{ |
| 15 |
private AxSHDocVw.AxWebBrowser axWebBrowser; |
| 16 |
/// <summary> |
| 17 |
/// 必要なデザイナ変数です。 |
| 18 |
/// </summary> |
| 19 |
private System.ComponentModel.Container components = null; |
| 20 |
|
| 21 |
public WebBrowserControl() |
| 22 |
{ |
| 23 |
// この呼び出しは、Windows.Forms フォーム デザイナで必要です。 |
| 24 |
InitializeComponent(); |
| 25 |
|
| 26 |
Navigate("about:blank"); |
| 27 |
} |
| 28 |
|
| 29 |
public void Navigate(string url) |
| 30 |
{ |
| 31 |
object o = null; |
| 32 |
axWebBrowser.Navigate(url,ref o,ref o,ref o,ref o); |
| 33 |
} |
| 34 |
|
| 35 |
/// <summary> |
| 36 |
/// 使用されているリソースに後処理を実行します。 |
| 37 |
/// </summary> |
| 38 |
protected override void Dispose( bool disposing ) |
| 39 |
{ |
| 40 |
if( disposing ) |
| 41 |
{ |
| 42 |
if(components != null) |
| 43 |
{ |
| 44 |
components.Dispose(); |
| 45 |
} |
| 46 |
} |
| 47 |
base.Dispose( disposing ); |
| 48 |
} |
| 49 |
|
| 50 |
#region コンポーネント デザイナで生成されたコード |
| 51 |
/// <summary> |
| 52 |
/// デザイナ サポートに必要なメソッドです。このメソッドの内容を |
| 53 |
/// コード エディタで変更しないでください。 |
| 54 |
/// </summary> |
| 55 |
private void InitializeComponent() |
| 56 |
{ |
| 57 |
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(WebBrowserControl)); |
| 58 |
this.axWebBrowser = new AxSHDocVw.AxWebBrowser(); |
| 59 |
((System.ComponentModel.ISupportInitialize)(this.axWebBrowser)).BeginInit(); |
| 60 |
this.SuspendLayout(); |
| 61 |
// |
| 62 |
// axWebBrowser |
| 63 |
// |
| 64 |
this.axWebBrowser.Dock = System.Windows.Forms.DockStyle.Fill; |
| 65 |
this.axWebBrowser.Enabled = true; |
| 66 |
this.axWebBrowser.Location = new System.Drawing.Point(0, 0); |
| 67 |
this.axWebBrowser.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axWebBrowser.OcxState"))); |
| 68 |
this.axWebBrowser.Size = new System.Drawing.Size(136, 112); |
| 69 |
this.axWebBrowser.TabIndex = 0; |
| 70 |
// |
| 71 |
// WebBrowserControl |
| 72 |
// |
| 73 |
this.AutoScroll = true; |
| 74 |
this.Controls.Add(this.axWebBrowser); |
| 75 |
this.Name = "WebBrowserControl"; |
| 76 |
this.Size = new System.Drawing.Size(136, 112); |
| 77 |
((System.ComponentModel.ISupportInitialize)(this.axWebBrowser)).EndInit(); |
| 78 |
this.ResumeLayout(false); |
| 79 |
|
| 80 |
} |
| 81 |
#endregion |
| 82 |
|
| 83 |
} |
| 84 |
} |