You are not logged in.

Dear visitor, welcome to Jabaco - Community. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

lol

Beginner

  • "lol" started this thread

Posts: 1

Date of registration: Aug 22nd 2010

  • Send private message

1

Sunday, August 22nd 2010, 3:50am

OLE_COLOR and richtextbox.selcolor

I am porting a vb app to jabaco, but i encountered some problems

Jabaco Source

1
2
3
Public Property Get BackColor() As OLE_COLOR 
 BackColor = rtb.BackColor
End Property


Error: Class 'OLE_COLOR' not found

Jabaco Source

1
2
3
4
5
Public Property Get SelColor() As Variant 
 If Ambient.UserMode = False Then 
 Err.Raise 394  End If 
 SelColor = rtb.SelColor
End Property


I cant edit selcolor

Jabaco Source

1
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long


That also does not work

A1880

Intermediate

  • "A1880" is male

Posts: 500

Date of registration: Jan 1st 2009

Location: Hanover, Germany

Occupation: Software Engineer

Hobbies: Hilbert Curves

  • Send private message

2

Tuesday, August 24th 2010, 3:17pm

OLE_COLOR is not defined in Jabaco.
RichTextBox.BackColor is of type "long". You can use "RGB(r, g, b)" to set such a color.

There are 143 hits on "color" if you consult the search facility of this forum.
Give it a try!

Calling external DLLs is one of the more involved areas of Jabaco.
It might be easier to go for the Java way rather than exploiting all sorts of tricky Microsoft APIs.

Happy experimenting!

A1880

Rate this thread
WoltLab Burning Board