Click here to Skip to main content
15,919,613 members
Home / Discussions / Visual Basic
   

Visual Basic

 
General.Net ToolTip properties Pin
mryan999910-Sep-04 8:43
mryan999910-Sep-04 8:43 
GeneralRe: .Net ToolTip properties Pin
Dave Kreskowiak10-Sep-04 10:04
mveDave Kreskowiak10-Sep-04 10:04 
GeneralRe: .Net ToolTip properties Pin
mryan999916-Sep-04 12:19
mryan999916-Sep-04 12:19 
Generalvb and ms soap Pin
necroleak9-Sep-04 21:58
sussnecroleak9-Sep-04 21:58 
GeneralRe: vb and ms soap Pin
Purple Monk9-Sep-04 23:42
Purple Monk9-Sep-04 23:42 
GeneralRe: vb and ms soap Pin
necroleak10-Sep-04 0:41
sussnecroleak10-Sep-04 0:41 
GeneralRe: vb and ms soap Pin
Purple Monk10-Sep-04 4:33
Purple Monk10-Sep-04 4:33 
GeneralA little problem in ActiveX control programming Pin
gamerPotatoe9-Sep-04 21:15
gamerPotatoe9-Sep-04 21:15 
HI guys

I have a couple of questions on creating custom activeX controls. I have a customs activeX control with two constotutent controls An ImageBox and a label. I've exposed two properties namely Picture which corrsponds to the image boxes picture property and Caption which corresponds to teh labels caption.

At the moment I'm like setting the picture property by just passing it a string. But that's seriously not how it should be working I mean when you set the Image controls picture property you choose from a file dialog. My code is as below:

<bold>
Option Explicit
Public Event Click()

Private Sub Image1_Click()
RaiseEvent Click

End Sub

Private Sub UserControl_InitProperties()
With Image1
' .Picture = Nothing
End With
With lblRouterIP
.Caption = ""
End With

End Sub

Private Sub UserControl_ReadProperties(PropBag As PropertyBag)
BackColor = PropBag.ReadProperty("BackColor", BackColor)
With Image1
.picture = PropBag.ReadProperty("Picture", .picture)
End With

With lblRouterIP
.Caption = PropBag.ReadProperty("caption", .Caption)
End With

End Sub

Private Sub UserControl_WriteProperties(PropBag As PropertyBag)
Call PropBag.WriteProperty("Picture", Image1.picture)
Call PropBag.WriteProperty("caption", lblRouterIP.Caption, "")
End Sub

'PROBLEM AREA


Public Property Get picture() As String
picture = Trim(Image1.picture)

End Property

Public Property Let picture(ByVal img As String)
Image1.picture = LoadPicture(img)
Call UserControl.PropertyChanged("picture")
End Property




Public Property Get Caption() As String
Caption = lblRouterIP.Caption
End Property

Public Property Let Caption(ByVal str As String)
lblRouterIP.Caption = str
Call UserControl.PropertyChanged("Caption")
End Property



it doesn't make any sense to return a picture as a string.

Also lets say that I want to create my own property for this active X control like uh the name of Status that can hold 3 values. How can I do that.

I've been using vb6 for a while but this is my initial attempt at activeX programming.

I'm using vb 6 and would greatly appreciate the help.

Big Grin | :-D
GeneralRe: A little problem in ActiveX control programming Pin
Hadi Fakhreddine13-Sep-04 0:25
Hadi Fakhreddine13-Sep-04 0:25 
GeneralRe: A little problem in ActiveX control programming Pin
gamerPotatoe13-Sep-04 2:42
gamerPotatoe13-Sep-04 2:42 
GeneralRe: A little problem in ActiveX control programming Pin
Hadi Fakhreddine13-Sep-04 4:53
Hadi Fakhreddine13-Sep-04 4:53 
Generalhandling events of a combo box in datagrid Pin
sribusam9-Sep-04 20:33
sribusam9-Sep-04 20:33 
QuestionMouse Hit Test: How?? Pin
bitpusher9-Sep-04 13:05
bitpusher9-Sep-04 13:05 
AnswerRe: Mouse Hit Test: How?? Pin
beowulfagate9-Sep-04 13:37
beowulfagate9-Sep-04 13:37 
GeneralRe: Mouse Hit Test: How?? Pin
bitpusher9-Sep-04 13:49
bitpusher9-Sep-04 13:49 
GeneralRe: Mouse Hit Test: How?? Pin
Purple Monk10-Sep-04 0:00
Purple Monk10-Sep-04 0:00 
AnswerRe: Mouse Hit Test: How?? Pin
Dennis C. Dietrich10-Sep-04 9:09
Dennis C. Dietrich10-Sep-04 9:09 
AnswerRe: Mouse Hit Test: How?? Pin
Dennis C. Dietrich10-Sep-04 15:15
Dennis C. Dietrich10-Sep-04 15:15 
GeneralVBA Word ActiveDocument.RoutingSlip problem Pin
Doug Wright9-Sep-04 10:52
Doug Wright9-Sep-04 10:52 
GeneralDataGrid Pin
Jeeva Jose9-Sep-04 8:04
Jeeva Jose9-Sep-04 8:04 
GeneralRe: DataGrid Pin
Dave Kreskowiak9-Sep-04 10:05
mveDave Kreskowiak9-Sep-04 10:05 
GeneralRe: DataGrid Pin
partt10-Sep-04 4:49
partt10-Sep-04 4:49 
Generalget ip from client Pin
fo0lish9-Sep-04 5:36
fo0lish9-Sep-04 5:36 
GeneralRe: get ip from client Pin
Anonymous9-Sep-04 6:14
Anonymous9-Sep-04 6:14 
QuestionWYSIWYG HTML Controls? Pin
Chris Quick9-Sep-04 3:28
Chris Quick9-Sep-04 3:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.