Visual Basic .NET Forums  
Click here to advertise with us

Go Back   Visual Basic .NET Forums > VB.NET > Windows Forms

Windows Forms Discussion related to Winforms application development

VB.NET Forums Newsletter Signup:
Email address:


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-30-2009, 7:49 AM
VB.NET Forum Newbie
.NET Framework: .NET 3.5 (VS 2008)
 
Join Date: Jun 2009
Age: 20
Posts: 12
Reputation: 10
oXiDe is on a distinguished programming path ahead
Default Images into RTB, works on xp... not vista?

Hi All,

We are creating a Chat Application for our chatnetwork, we originally made it in VB6 works like a beauty and converting to VB.NET

At the moment, it joins the channel fine, nothing wrong with this displays everything it needs to however we are in the process of showing emoticons...

While we were on XP in debug mode and release mode, the emoticons showed... Once we moved the compiled version over to Vista Home and Ulitmate the emoticons would not show, we have looked and looked all over google and have not come to a conclusion, today we even moved the whole Project folder over to Vista, ran it in debug mode, and the images still wouldn't show in the RTB. Works fine in XP but not Vista?

Same version VS, same Framework, i'm confused?

Any help would be appreciated.


Thank you.
oXiDe
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 06-30-2009, 8:35 AM
JohnH's Avatar
VB.NET Forum Moderator
.NET Framework: .NET 3.5 (VS 2008)
 
Join Date: Dec 2005
Location: Norway
Age: 37
Posts: 10,173
Reputation: 1273
JohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond repute
Default

Images displays in Richtextbox on Vista Business and Vista Home, so other Vista versions should be the same. I don't know how you insert the images, but I used the 'Paste' trick
__________________
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 06-30-2009, 10:21 AM
VB.NET Forum Newbie
.NET Framework: .NET 3.5 (VS 2008)
 
Join Date: Jun 2009
Age: 20
Posts: 12
Reputation: 10
oXiDe is on a distinguished programming path ahead
Default

Problem with the Paste Method is it deletes the user's clipboard... We don't want that.. hmmm
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 06-30-2009, 10:45 AM
VB.NET Forum Newbie
.NET Framework: .NET 3.5 (VS 2008)
 
Join Date: Jun 2009
Age: 20
Posts: 12
Reputation: 10
oXiDe is on a distinguished programming path ahead
Default

I did a bit more testing and I don't think the DLL is responsible...

At the moment, we are coverting it into a WMF, then into RTF then into the RTB

The string we receive is (data1.txt)

String is fine, no image...

I used the copy and paste method and received the exact same string (data1.txt)

Except with using the copy and paste method... The emoticon showed...

I'm a bit lost.. We recieve the same string, but emoticon doesn't show...
Attached Files
File Type: txt data1.txt (9.3 KB, 0 views)
File Type: txt data2.txt (9.3 KB, 0 views)

Last edited by JohnH; 06-30-2009 at 11:59 AM. Reason: rtf to attachments, board not suitable to display the string
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 06-30-2009, 11:39 AM
JohnH's Avatar
VB.NET Forum Moderator
.NET Framework: .NET 3.5 (VS 2008)
 
Join Date: Dec 2005
Location: Norway
Age: 37
Posts: 10,173
Reputation: 1273
JohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond repute
Default

Quote:
Originally Posted by oXiDe View Post
Problem with the Paste Method is it deletes the user's clipboard... We don't want that.. hmmm
The good practice in this case is to take what's there and put it back when you're done borrowing the users clipboard.
Code:
Dim o As IDataObject = Clipboard.GetDataObject
'borrow clipboard
Clipboard.SetDataObject(o)
Quote:
At the moment, we are coverting it into a WMF, then into RTF then into the RTB
...
I used the copy and paste method and received the exact same string
Are you sure it is the exact same? I also can load the image by setting the Rtf just fine. I noticed your string has upper case hex values, while the string produced by pasting the image has lower case hex. Did a test where I converted the hex data to upper and assigned Rtf, no problem with this also, the RTB just converts is to lower again when parsing the input data. Another difference is the string that is returned from Rtf property has linefeeds (not par's), but I can also confirm this don't affect the outcome. Apart from that I can't compare any differences, but you should make sure yours is.
__________________
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 07-01-2009, 7:40 AM
VB.NET Forum Newbie
.NET Framework: .NET 3.5 (VS 2008)
 
Join Date: Jun 2009
Age: 20
Posts: 12
Reputation: 10
oXiDe is on a distinguished programming path ahead
Default

I still prefer not to use the Paste method, but look's like i'm going to have to since I cannot work out why what we are currently doing is not working
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 07-01-2009, 8:32 AM
VB.NET Forum Newbie
.NET Framework: .NET 3.5 (VS 2008)
 
Join Date: Jun 2009
Age: 20
Posts: 12
Reputation: 10
oXiDe is on a distinguished programming path ahead
Default

Okay, so tried the paste thing out, it's not gonna work for what we need to do... (To Difficult to explain)

I'm back to my previous code I mentioned.. Why does it not work on Vista?
As mentioned.. we get the same string? so wtf?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 07-01-2009, 10:22 AM
JohnH's Avatar
VB.NET Forum Moderator
.NET Framework: .NET 3.5 (VS 2008)
 
Join Date: Dec 2005
Location: Norway
Age: 37
Posts: 10,173
Reputation: 1273
JohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond repute
Default

As I said, are you sure the strings are the same, neither of the strings you posted is produced by RTB control. You should paste an image to the control and get the generated rtf codes from the controls Rtf property and compare with what you get from the library. If there is any difference you should look into it. As you also know you can take the Rtf generated when pasting the image and assign and empty RTB control and it will display the same image, so the error must be with the string produced by the library somehow. I can confirm the string you posted does not produce an image in RTB control, but I can't tell you why as I don't have the image that should produce that code in RTB control.
__________________
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





All times are GMT -4. The time now is 8:23 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2


For advertising opportunities click here.