0
아래와 같이 사용자 정의 양식을 작성했습니다. 내가 말할 때 : 그것은 나에게 말하고있다"New": 인수가 너무 많습니다.
Dim nSplash As New frmSplash(nBitmap)
"공공에 대한 너무 많은 인수 하위 새로운"가 있음.
내가 왜 조롱하는지 모르겠다.
Imports System.Drawing
Imports System.Drawing.Imaging
Imports System.Runtime.InteropServices
Imports System.Windows.Forms
Namespace AlphaWindow
Public Class frmSplash
Inherits Form
Public Sub New(ByRef uBitmap As Bitmap)
Me.Size = uBitmap.Size
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
APIHelp.ShowTopmost(Me)
Me.SelectBitmap(uBitmap)
End Sub
(...)
' Class to assist with Win32 API calls
Class APIHelp
Private Const SW_SHOWNOACTIVATE As Integer = 4
Private Const HWND_TOPMOST As Integer = -1
(...)
End Class
End Namespace
코드를 사용하여 잘못하고있는 것이 확실하지 않습니다. 오류없이 frmSplash를 새로 만들 수 있습니다. 생성자에 InitializeComponents를 추가해야합니다. –
@Mark Hall 양식을 어떻게 인스턴스화합니까? Dim bitmap as New Bitmap (GetType)(). [Module] .Assembly.GetManifestResourceStream ("AlphaWindow.Channel9.png")) Dim nSplash As 새 frmSplash (nBitmap) 여기에 결함이 있습니까? ? – tmighty
네임 스페이스 AlphaWindow를 제거하면 제대로 작동하지만 네임 스페이스를 유지하려고합니다. 누구든지 도와 줄 수 있습니까? – tmighty