Hi,

I have a special question about banners that usually is possible to put on a webpage with HTML code. The HTML code holds some addresses to this specific banner in form a http:// addresses.

As C++ can call addresses like this my quesiton is this:

Is there any possibility to have a banner in a Form application in any way. The code to the banner look like this more or less.

(HTML code for a banner)

<div style="FONT: 11px tahoma,sans-serif; 
WIDTH: 728px; 
TEXT-ALIGN: center">
<a href="http://webaddress" title="one Title ">
<img src="http://imageaddress" width="500" height="50" border="0" alt="one Title"/></a>
<br/>
<a href="http://oneaddress">oneString</a>
</div>

Recommended Answers

All 3 Replies

You ought to be able to use a picturebox, the contents of which you can probably get as a stream from the web, go from a stream to an image. Were you planning on writing the text onto the banner directly? If so you could have a label that you align over the picturebox. I realize I'm being a bit vague but I'm not absolutely sure what the requirements are.

I did find this page which has an example in C# that I was able to put into C++/CLI using dynamic_cast instead of the c style casts.

The problem is that the stream will not be a static image. I understand how you meen and how to call a stream from the web as I am familiar of how to do that.

The thing here is that what I would need to do is to get a flash object.
This meens that the banner in this case more or less is an animation in that format. So I beleive a picturebox cant handle this type ?

I dont know if it is possible to get a stream wich will be located at an direct address like: "http://oneFLASHblabla" and put this Flash stream into any control in C++.

Please check this URL to see what type of banner I am thinking about.
http://www.123-banner.com/

(It is the one that is black with a clock on the side)

Thanks

You ought to be able to use a picturebox, the contents of which you can probably get as a stream from the web, go from a stream to an image. Were you planning on writing the text onto the banner directly? If so you could have a label that you align over the picturebox. I realize I'm being a bit vague but I'm not absolutely sure what the requirements are.

I did find this page which has an example in C# that I was able to put into C++/CLI using dynamic_cast instead of the c style casts.

I have found one solution but one problem in the solution remains.
There is a FlashControl in C++ avaliable. By adding these .DLL:s
- AxInterop.ShockwaveFlashObjects.dll
- Interop.ShockwaveFlashObjects.dll

From the beginning my HTML code look like the first example wich works in a ASP.net application. Now I want to take the nessecary parameters to insert into this FlashControl.

The flashmovie is seen in the Windows application nicely. Now when clicking this flashmovie, one browser will open up to show a webpage.

However when clicking this flashcontrol in the windowsapplication, a browser opens with the address: "http://undefined/"
So I beleive I need to put any additionaly properties for the control that is found in the HTML code but have problem to understand what could be needed ?

(This HTML is working correctly)

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="728" height="90" ><param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="http://online.casinotropez.com/promoLoadDisplay?key=em9uZUlkPTMzMTY2MTUwJmxhbmRpbmdQYWdlSWQ9MCZwcm9maWxlSWQ9NTI2OTUx&amp;clickTAG=http://online.casinotropez.com/promoRedirect?key=em9uZUlkPTMzMTY2MTUwJmxhbmRpbmdQYWdlSWQ9MCZwcm9maWxlSWQ9NTI2OTUx" /><param name="quality" value="high" /><param name="bgcolor" value="" /><embed src="http://online.casinotropez.com/promoLoadDisplay?key=em9uZUlkPTMzMTY2MTUwJmxhbmRpbmdQYWdlSWQ9MCZwcm9maWxlSWQ9NTI2OTUx&amp;clickTAG=http://online.casinotropez.com/promoRedirect?key=em9uZUlkPTMzMTY2MTUwJmxhbmRpbmdQYWdlSWQ9MCZwcm9maWxlSWQ9NTI2OTUx" quality="high" bgcolor="" width="728" height="90" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>

(C++)

AxShockwaveFlashObjects::AxShockwaveFlash^ AxShockwaveFlash1 = gcnew AxShockwaveFlashObjects::AxShockwaveFlash();

 this->Controls->Add(AxShockwaveFlash1);
 AxShockwaveFlash1->Movie = "http://online.casinotropez.com/promoLoadDisplay?key=em9uZUlkPTMzMTY2MTUwJmxhbmRpbmdQYWdlSWQ9MCZwcm9maWxlSWQ9NTI2OTUx&amp;clickTAG=http://online.casinotropez.com/promoRedirect?key=em9uZUlkPTMzMTY2MTUwJmxhbmRpbmdQYWdlSWQ9MCZwcm9maWxlSWQ9NTI2OTUx";
 AxShockwaveFlash1->AllowFullScreen = "false";
 AxShockwaveFlash1->AllowScriptAccess = "sameDomain";

 AxShockwaveFlash1->Enabled = true;

 AxShockwaveFlash1->EmbedMovie = true;

 AxShockwaveFlash1->Size = System::Drawing::Size(386, 56);
 
 AxShockwaveFlash1->Location = System::Drawing::Point(52, 82);
 AxShockwaveFlash1->Play();
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.