Object("doorCrtlProp").FromControl(Rectanglebutton("lblHelloRectangle").ControlRef)
Object("doorCrtlProp").SetProperty("Width","200")
Select ctrlType
Case "Fggradientbuttons"
Object("doorCrtlProp").FromControl(Fggradientbuttons(ctrlName).ControlRef) 'Everything works fine
Case "Rectanglebutton"
If propName="Text" Then
Rectanglebutton(ctrlName).Text=propVal
Else If propName="Left" Then
Rectanglebutton(ctrlName).Left=propVal
Else If propName="Top" Then
Rectanglebutton(ctrlName).Top=propVal
Else If propName="Width" Then
Rectanglebutton(ctrlName).Width=propVal
Else If propName="Height" Then
Rectanglebutton(ctrlName).Height=propVal
Else If propName="BringToFront"
Rectanglebutton(ctrlName).BringToFront
Else If propName="Visible"
Rectanglebutton(ctrlName).Visible=propVal
End If
...
Object of type 'System.EventHandler' cannot be converted to type 'System.Windows.Forms.MouseEventHandler'.
Sub Globals
End Sub
Sub App_Start
Form1.Show
rb3.New1("form1","RB3",150,40,80,30,cWhite,cBlack,1)
End Sub
Sub rb3_mousedown
Msgbox("Click")
End Sub
public event EventHandler Click;
private object[] eventObject;
public event System.Windows.Forms.MouseEventHandler MouseDown;
private object[] eventObject1;
public event System.Windows.Forms.MouseEventHandler MouseUp;
private object[] eventObject2;
private void gb_Click(Object sender, EventArgs e)
{
gb.Image = bmpup ;
if (Click != null)
Click(eventObject,null);
}
private void gb_MouseDown(Object sender, System.Windows.Forms.MouseEventArgs ed)
{
xpress = width/2 - ed.X;
ypress = height/2 - ed.Y ;
gb.Image = bmpdn ;
if (MouseDown != null)
MouseDown(eventObject1,null);
}
private void gb_MouseUp(Object sender, System.Windows.Forms.MouseEventArgs eu)
{
gb.Image = bmpup ;
if (MouseUp != null)
MouseUp(eventObject,null);
}
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?