掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
Formを継承したユーザーコントロールのデザイン時の動作 (ID:91916)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
[VB.NET 2003] 同じようなフォームをいくつものアプリで使い回ししているので Formを継承したユーザーコントロールを作ろうと思っています。 下記コードなのですが、使う側のプロジェクトでデザイナで開くと プロパティページの Location=(0,0) Size=(xxx,xxx) となっています デザイナで開いたときも初期化コードに書いたように Me.Location = New Point(25, 35) Me.ClientSize = New Size(920, 680) Me.FormBorderStyle = FormBorderStyle.FixedDialog とし、サイズ変更もできなくしたいのですが、どういった方法があるの でしょうか? -------------------------------------------------------------------- Imports System.Drawing Imports System.Windows.Forms Public Class FormEx Inherits System.Windows.Forms.Form Public Sub New() MyBase.New() InitializeComponent() '--- 初期化 Me.KeyPreview = True Me.MaximizeBox = False Me.StartPosition = Windows.Forms.FormStartPosition.Manual Me.Location = New Point(25, 35) Me.ClientSize = New Size(920, 680) Me.FormBorderStyle = FormBorderStyle.FixedDialog Me.Font = New Font("MS ゴシック", 11) End Sub Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose() End If End If MyBase.Dispose(disposing) End Sub Private components As System.ComponentModel.IContainer <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() components = New System.ComponentModel.Container End Sub -------------------------------------------------------------------
←解決時は質問者本人がここをチェックしてください。
戻る
掲示板システム
Copyright 2020 Takeshi Okamoto All Rights Reserved.