if you need to ask such a simple question and you don't have enough VB experience to be doing stuff like this.Quote:
Originally Posted by killl
Printable View
if you need to ask such a simple question and you don't have enough VB experience to be doing stuff like this.Quote:
Originally Posted by killl
hi
I have unloaded Wokawidgets Component Suite, and I have seen the client MSN.... I not to successful in adding AddContact function :cry: it in the clien msn.
I not understend
mobjMSN.AddContact(pobjcommand as command) :eek:
'*******************************************************
Public Sub AddContact(ByRef pobjCommand As Command)
Dim strEmail As String
Dim strDisplayName As String
Dim lngListID As Long
Dim lngGroupID As Long
strEmail = pobjCommand.Param(1)
strDisplayName = URLDecode(pobjCommand.Param(2))
lngListID = pobjCommand.Param(3)
If pobjCommand.ParamCount = 4 Then
lngGroupID = pobjCommand.Param(4)
End If
mstrLastAddedContactKey = mobjContacts.Add(strEmail, strDisplayName, lngGroupID, lngListID).Key
End Sub
'********************************************************
Please halp me
Sorry for My Bad English i am from Italy
Thank you for help
This function should not be called by you.
This is called when the MSN server sends a msg to the client with info of a group being added.
I don't have the code in front of me, but if I'm not mistaken if you look at the UI code for adding a group, I think it calls:
mobjGroups.AddGroup
*I think*
This function then sends a request off to the MSN servers, which in turn send a msg back, which is handled by that function you posted above.
Woka
thank you Wokawidget for answare me ;)
The function for create new Gruop is:
Private Sub CreateNewGroup()
Dim strDesc As String
If GetDescription("New Group", "Description", strDesc) Then
mobjMSN.Groups.Add strDesc
End If
End Sub
This Function WORK ok....
But for add new contact i try:
mobjMSN.AddContact (pobjCommand As Command)
This ---> pobjCommand As Command ----> I not understend :(
This is Funciont for addcontats
Public Sub AddContact(ByRef pobjCommand As Command)
Dim strEmail As String
Dim strDisplayName As String
Dim lngListID As Long
Dim lngGroupID As Long
strEmail = pobjCommand.Param(1)
strDisplayName = URLDecode(pobjCommand.Param(2))
lngListID = pobjCommand.Param(3)
If pobjCommand.ParamCount = 4 Then
lngGroupID = pobjCommand.Param(4)
End If
mstrLastAddedContactKey = mobjContacts.Add(strEmail, strDisplayName, lngGroupID, lngListID).Key
End Sub
i not undertend for add new contact :(.....
Thank you for help
and sorry for my Bad english...
Like I said, that AddContact function is for use with data returned from MSN server, and not for you as a UI developer to call.
In fact, checking over ym code, I have not coded in the functionality to add contacts :D haha. I am a muppet.
Woka
i think the function you need to add to the contacts class would be something like:
[vbcode]
public sub AddNewContact(ByVal emailAddress As string)
BadgerMessenger.Connection.SendCommand "ADC", "FL", "N=" & emailAddress, "F=" & emailAddress
End sub
[/vbcode]
Then from your UI you would do:
[vbcode]
mobjBadgerMessenger.Contacts.AddNewContact("[email protected]")
[/vbcode]
I haven't tested this as my VB6 box no longer had interweb access, but I think that's right.
Steve
hi woka
thank you for answare me
exist:
mobjMSN.Contacts.Count
.Item
.MSNMessenger
.NewEnum
mobjMSN.Contacts.Add not exist in list
but if i write mobjMSN.Contacts.Add(...................
show
mobjMSN.Contacts.Add(ByVal pstEmail As String, ByVal pstrNickname As String, ByVal plngGroupID As Long, ByVal plngListID As Long) as contact
:cry:
i try your code....
thank you for answare me
and sorry for my bad english
.........
ok my friend I have resolved with
[vbcode]
Public Sub AddNewContact(ByVal emailAddress As String)
mobjConn.SendCommand "ADC", "FL", "N=" & emailAddress, "F=" & emailAddress
End Sub
[/vbcode]
thank you very match
for view new contact add in my list
I disconnect and connects
Sorry, I don't understand that bit.
You mean to see the new contact in the list you have to disconnect and then reconnect again?
WOka
yes :blush: my friend
My Friend this command is ok for Adding a contact in list
public sub AddNewContact(ByVal emailAddress As string)
BadgerMessenger.Connection.SendCommand "ADC", "FL", "N=" & emailAddress, "F=" & emailAddress
End sub
but for delete contact what is the command? :confused:
do I think that not all the contacts I can be cancelled because it depends if the other contact has made the same thing, is true??
thank you for you help
and sorry for my bad english.....
However, I never wrote the full code to handle this :DCode:public sub RemoveContact(ByVal emailAddress As string)
BadgerMessenger.Connection.SendCommand "REM", "FL", emailAddress
End sub
This was never meant to be a full complete project.
You need to look at the class BadgerMessenger, and the function HandleCommand.
In there you will see a large Select Case statement and near the bottom there is:
Case "REM"
Ignore the comments under here, they are wrong.
When the case is "REM" this means the svr send a msg to you that the removal of the contact was ok.
You will need to add code here to remove the contact from the contacts list.
I think it's pobjCommand.Param(3) that contains the email of the contact removed.
WOka
Thank you my Friend ;)
i try this command
public sub RemoveContact(ByVal emailAddress As string)
BadgerMessenger.Connection.SendCommand "REM", "FL", emailAddress
End sub
thank you :blush:
i'm using the XP Button part coding...
but it gives me an error msg while i load an image for the XPButton from ImageList during run time...
example:
XPButton1.Picture = ImageList1.ListImages(1).Picture
any guide on this?
An error msg would help ;)
but I am assuming it's because you haven't done:
WoofCode:Set XPButton1.Picture = ImageList1.ListImages(1).Picture
I tried adding the "Set" commad and it works... thanks :DQuote:
Originally Posted by Wokawidget
May I know the reason why the "Set" command is needed also? :confused:
Beacuse thats what you use in VB when setting an object.
Basic VB knowledge and coding here.
Woka
oh i see...Quote:
Originally Posted by Wokawidget
thanks for the lesson ;)
Im trying to load up the msn messenger client, and im getting all kinds of errors!
All of the references to the class modules in vbMSNMessenger dont work, so i put "vbMSNMessenger." without the quotes in front of it, and it passes those errors up, but now im getting errors on 'vbMSNStatusConstants'... How do i fix that one? I dont know where thats at?
The errors are simply down to yourself not really knowing what you're doing when dealing with multi layers apps, that reference each other, in Visual Studio.
Delete all the stuff you've done.
Re-unzip the Messenger zip file.
Then load the VPG file.
Woka
how many projects have you got open in VB? 1? The main MSN client I bet.
Have you compiled the other 3-4 or so projects that the client uses? I bet not.
If yes, then have you added a new referenc eto the compiled dll, and REMOVED the old project reference.
Woka
Quote:
Originally Posted by Wokawidget
You are absolutely correct! Ive never dealt with multi layered apps, never even seen one until now.
Ive fixed all the other issues except that one, i referenced all the others by putting in the project its using, but this one doesnt have one, so im kinda lost, is there a post # in here, or a thread you know of i could look at that could explain more on this so i can learn more about this, and get the MSN app working?
i started with a new instance of VB6, and loaded the MSN Messenger Client.vpg file, but received error upon error, all the same thing, its all references.. As ive said, i fixed all of them except the ones that reference something outside of a class or layered project already within the group.Quote:
Originally Posted by Wokawidget
can u post a screen shot of the error msg...and a screen shot of the references in the project when the error occurs.
Cheers,
Woka
I have some question regarding the XP button...
I don't know what is the reason:
After I make the project group, I getting some error msg like "version 15.0 of ... \vbXPButton.ocx is not registered. The control will be upgraded to version 17.0".
Althought I clicked OK, it still show me the same error msg next time when I open the project group
Beside this, I'm using vbXPButton.ocx at another project, when I press F5 to run the project, I goes to IE with address "C:\Program Files\Microsoft Visual Studio\VB9\XPButton.html"... I have no idea on how to solve this...
Any help please?
Thanks
VB9?
VB6 = VS 6
VB7 = VS 2001
VB8 = VS 2003
VB9 = VS 2005
I think :s
From that I am assuming that you are using a control built in VB6 in VS 2005?
I am afraid I have never tested this, and I have no idea at all why F5 is redirecting you to vbXPButton.html...that's nothing to do with the code I wrote. Are you trying to use this in a web project at all????
Woka
I'm using it in VB6.Quote:
Originally Posted by Wokawidget
umm... is it I just use the vbXPButton.ocx, then add it in under Project -> References?
or I need to create a vbg?
Check to make sure that your app is set as the startup... and not the control's project...
-tg
Open up vbXPButton.vbp in VB6. Click build/compile.
Then open your blank project and go to Components and browse to the newly compiled OCX.
Regarding having a previous app using it and getting it to use the newly compiled version, without needing to recompile your app, you need to set binay compatibility on the build options for vbXPButton.vbp and point it at the old OCX. This keeps means the registered OCS keeps the same GUID.
Woka
OK, let's said I compiled the ocx, then I put it inside "C:\Testing" folder, this folder will have my vb project files as well.Quote:
Originally Posted by Wokawidget
Then I go to Components and browse to the OCX. Click apply & ok button.
But when I move the whole folder "C:\Testing" to "D:\Testing", then I open the vb project again, the refering ocx file location changed :confused:
sorry... can explain to me what are the differences between binay compatibility & project compatibility? :blush:
Errrr....well the OCX gets registered in the registry with C:\Testing\vbXPButton.ocx
Open up regedit and do a search for this.
So when you move your folder and then run the exe it's going to check the registry and then look for the folder c:\Testing...which you have removed.
Copying the folder is essentially as doing an app deployment manually...so you would also need to call RegSvr32 to register the OCX. Open a CMD prompt and type:
RegSvr32 "D:\testing\vbXPButton.ocx"
But this is a VERY bad idea. If you indend to move things around, or put them on a different machine then you really should use an installer for this as that's what they are designed for...copying the files, and then registering the ocx's and dlls.
VB6 ships with the Package and Deployment wizard for this.
Woka
Just because a DLL or OCS has the same name, woof.dll, doesn't means it's the same thing, and each time you build it a new GUID is assigned to it for the registry.
If you compile the OCX into a folder ..\BinCompat\vbXPButton.ocx and use this as the "base" ocx, and then set this OCX for binary compatibility, and then compile the OCX to a diff folder ..\ReleaseOCX\ then this one will be used by your PC, but when compiling it looks at ..\BinCompat\vbXPButton.ocx and uses the same GUID...so you can keep compiling the OCX and your EXE file will still run as the GUID stays the same in the registry.
Woka
Here's some links on the compatibility subject:
http://support.microsoft.com/kb/161137
http://www.visibleprogress.com/vb_bi...patibility.htm
Hope this helps.
WOka
In my sig there's a short walkthrough on setting & using the compatibility, along with a brief description on why it works the way itdoes.
-tg
Hey Woka, the menu for your vbSysTray does not support sub-menus? :(
That's right. I don't think I added that functionality in.
Woka
Will you have time to add such functionality then? :)Quote:
Originally Posted by Wokawidget
Hi,
Sorry, I have no intention of modifying any of my VB6 code in the near future I am afraid. Very busy.
I have supplied the source so I don't have to do things like this, which gives other developers free reign to add functionality of their choice. Why don't you code the functionality?
Woka
Newb
im trying to copy it to my project,but i need to add something... like a reference?
how do i copy the buttons? what do i need to do?
That makes no sense :)
Can you explain in more detail.
Cheers,
Woof
i want to use the winXP buttons on your Zip file..
how do i do it?