[mono-vb] Mono VB and WinForms (System.Windows.Forms).
Rolf Bjarne Kvinge
rolflists at ya.com
Mon Sep 7 09:12:57 EDT 2009
Hi,
See: http://www.mail-archive.com/mono-list@lists.ximian.com/msg27150.html
Rolf
> -----Original Message-----
> From: mono-vb-bounces at lists.ximian.com [mailto:mono-vb-
> bounces at lists.ximian.com] On Behalf Of Gruff
> Sent: jueves, 16 de julio de 2009 16:16
> To: mono-vb at lists.ximian.com
> 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
> Mono-vb at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-vb
More information about the Mono-vb
mailing list