473,385 Members | 1,912 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Maquee text on form using ActiveX Control (WebBrowser)

68 64KB
Hi,
I have a form and I have place an ActiveX Control(WebBrowser) that will populate a web page with strolling texts, I have developed in html.
In the form 'On Current Event' I have placed a code that depend on a table called 'strol' that also holds the path to the html file. Normally, this should work but I am not sure why it is not. Can anyone help? This is what I have in the event procedure: I


Expand|Select|Wrap|Line Numbers
  1. If Len([strol]) > 0 Then
  2.         WebBrowser3.Navigate URL:=[strol]
  3.     Else
  4.         WebBrowser3.Navigate URL:="C:\Users\M&E\Documents\Organizations\LTTP\Database\WelcomeStatement.htm"
  5.     End If
  6.  
Oct 5 '12 #1

✓ answered by twinnyfo

Stoic,

Is strol the table name or the name of a field in a table? Your code may be a bit confusing. Just to clear it up a bit, I would have code similar to the following:

Expand|Select|Wrap|Line Numbers
  1. Dim strLink as String
  2. strLink = [use code to find the string you want to look up in a table, etc.]
  3. If LenstrLink) > 0 Then 
  4.     WebBrowser3.Navigate URL:=strLink 
  5. Else 
  6.     WebBrowser3.Navigate URL:="C:\Users\M&E\Documents\Organizations\LTTP\Database\WelcomeStatement.htm" 
  7. End If
  8.  
I've tried with some sample values in strLink and this seems to work just fine. Let me know if this helps.

4 2011
twinnyfo
3,653 Expert Mod 2GB
Stoic,

Is strol the table name or the name of a field in a table? Your code may be a bit confusing. Just to clear it up a bit, I would have code similar to the following:

Expand|Select|Wrap|Line Numbers
  1. Dim strLink as String
  2. strLink = [use code to find the string you want to look up in a table, etc.]
  3. If LenstrLink) > 0 Then 
  4.     WebBrowser3.Navigate URL:=strLink 
  5. Else 
  6.     WebBrowser3.Navigate URL:="C:\Users\M&E\Documents\Organizations\LTTP\Database\WelcomeStatement.htm" 
  7. End If
  8.  
I've tried with some sample values in strLink and this seems to work just fine. Let me know if this helps.
Oct 5 '12 #2
Stoic
68 64KB
Thanks twinnyfo, it did work. I don't understand why my code is not working. I have used it before. Anyway, maybe I am missing out on some lines. You are grate man. Thanks
Oct 5 '12 #3
Stoic
68 64KB
oh! sorry, yes strol is the table as well as the field name.
Oct 5 '12 #4
Rabbit
12,516 Expert Mod 8TB
You should avoid giving two things the same name. It can cause ambiguities that can mess with code.
Oct 5 '12 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Marcin Grzębski | last post by:
Hi Group, I know that if i want to run a windows form with ActiveX control and variables on it, i have to set attribute for Main() function. But if i want to deriving this form in other form...
0
by: Anders Eriksson | last post by:
Hello! I don't get it! How do I use an ActiveX control in VC++ 7.1?? I'm using MFC and I have added the ActiveX control to my ToolBox and then added it to my CFormView. In VC++ 6.0 there...
0
by: batista | last post by:
Hi, i want to write and use activex control in asp.net, and use it to push data from server to client. So, how do i do it? Note: I'm a newbie in Activex control. Any tutorial or example...
1
by: mistral | last post by:
How to compile javascript code in form of ActiveX control? This will make code more compact and easier to manage on web page. I.e. part of my javascript code already contains activex objects, and i...
0
by: LawrenceK | last post by:
Hi All, I don't know if this is the right forum for my question. I want to be able configure a USB HID through a web page (i.e. using IE). I read some where in this forum that it was possible to...
0
by: ananth | last post by:
Hi All, I have a active-x control that checks the registry for whether a file has been installed or not if it is not installed then it will get a content using a property file which has the...
1
by: Remote_User | last post by:
Hi, I am using C# as the code-behing language in ASP.NET and trying to put in ActiveX control in the web page. Could you provide me a suggestion on this as good start up ? Trying to get familiar...
0
by: ministainer | last post by:
am using VStudio.NET 2005 and i created a windows control library project then i added a new button and a simple routine for it i added the dll object to a website it works perfectly in...
0
by: DKn | last post by:
Hello All, I am having an ACtiveX Control developed in C#.Net 2.0 windows Control Library. I have tested this control.TCS through ACtiveX Control Test Container. It is working fine, But the...
1
by: krishnaneeraja | last post by:
Hi, Iam developing c#.net windows application.In that iam using one form(form1) and using two user defined control forms in that form1.If i want to close form1 but it closes the entire application.I...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.