Hi, See: http://www.mail-archive.com/[email protected]/msg27150.html
Rolf > -----Original Message----- > From: [email protected] [mailto:mono-vb- > [email protected]] On Behalf Of Gruff > Sent: jueves, 16 de julio de 2009 16:16 > To: [email protected] > Subject: [mono-vb] Mono VB and WinForms (System.Windows.Forms). > > > I am getting a compile error when using "any" property of e as > MouseEventArgs. > Button, Shift, X, Y. All thow an error. > > > '----------- > ' frmMain.vb > '----------- > > Option Explicit On > Option Strict On > > Imports System > Imports System.Drawing > Imports System.Windows.Forms > > > Public Class frmMain > > Private Sub Button1_Click(byval Sender as object,byval e as > EventArgs) > handles Button1.click > messagebox.show("Hello World!") > End Sub > > ' The following MouseDown code causes the comple error: > ' --- > ' [Task:File=/home/tgroff/Sample/Sample/<MyGenerator>, > ' Line=1, Column=1, Type=Error, Priority=Normal, > ' Description=Unexpected error: CodePage 1252 not supported(VBNC99999)] > > Private Sub Button1_MouseDown(ByVal Sender As Object, ByVal e As > MouseEventArgs) Handles Button1.MouseDown > If e.Button = System.Windows.Forms.MouseButtons.Left then > messagebox.show(e.X & ", " & e.Y) > End If > End Sub > > End Class > > '----------- > ' End frmMain.vb > '----------- > > '-------------------- > 'frmMain.Developer.vb > '-------------------- > > Option Explicit On > Option Strict On > > Partial Class frmMain > Inherits System.Windows.Forms.Form > > Public Sub New() > InitializeComponent > End Sub > > Private Sub InitializeComponent() > Button1 = new System.Windows.Forms.Button > Suspendlayout > > ' Button > Button1.Name = "Button1" > Button1.Text = "Hello" > Button1.Size = New System.Drawing.Size(60,30) > me.Controls.add(Button1) > Button1.Location = New System.Drawing.Point(100,30) > > ' Form > Me.Text = "frmMain" > Me.Name = "frmMain" > Me.Size = New System.Drawing.Size(250, 200) > Me.CenterToScreen > > Resumelayout(False) > End Sub > > Public Shared Sub Main > System.Windows.Forms.Application.Run(New frmMain) > End Sub > > ' Add button Events for frmMain. > Public Withevents Button1 as System.Windows.Forms.Button > End Class > > '-------------------- > 'End frmMain.Developer.vb > '-------------------- > -- > View this message in context: http://www.nabble.com/Mono-VB-and- > WinForms-%28System.Windows.Forms%29.-tp24516622p24516622.html > Sent from the Mono - VB mailing list archive at Nabble.com. > > _______________________________________________ > Mono-vb mailing list > [email protected] > http://lists.ximian.com/mailman/listinfo/mono-vb _______________________________________________ Mono-vb mailing list [email protected] http://lists.ximian.com/mailman/listinfo/mono-vb
