how to enable HTML objects, such as TABLE, FORM,, etc in VB 6
dear all,
i'd like to apologize if this question incidentally have been asked before.
i am building an inventory application.
I have one trouble - which until now not solved yet - in delivering the view of the data.
I wonder, if there is any way to view the data with HTML component such as <TABLE> in vb 6 ? the data will be taken from MSSQL using ADO, and will be shown in a VB6 form, inside a table, but the table is not a DataGrid, or FlexGrid, or another grid, because i have a hard experience in programming those GRID things. I think the solution is, If only I can insert the HTML TABLE object into one of my FORM, and from that FORM i can control or modify the <TABLE> value, spanning the column, inserting an event, just like HTML things ..
Re: how to enable HTML objects, such as TABLE, FORM,, etc in VB 6
Maybe using a WebBrowser control? That would dispay the html, but you'd have to edit it using an editor, or from within VB, and then reload a new page.
Re: how to enable HTML objects, such as TABLE, FORM,, etc in VB 6
yes, using the webbrowser control you can display an HTML file or even create the HTML document interactively.. here's my sample code, the first line instantiates the document property of the control.. hope it helps.
Re: how to enable HTML objects, such as TABLE, FORM,, etc in VB 6
thnx thread1 and david.
the web browser control work well.
but it raise another question is..
suppose i have made the TABLE succesfully, then
how to make that HTML TABLE can interact with the VB6 FORM ?
lets say FORM1 contain the TABLE from WEB BROWSER control,
if i right click on the cell, there is an event that will show another form, but the form is from VB6 not HTML page.
Re: how to enable HTML objects, such as TABLE, FORM,, etc in VB 6
@Thread1: I seem to get an error when trying wbb.Document.open:
Runtime error 438, saying method is not supported (in german).
Any Idea? Because I'd like to try that piece of code.
Re: how to enable HTML objects, such as TABLE, FORM,, etc in VB 6
how to make that HTML TABLE can interact with the VB6 FORM ?
As far as i can remember, making interaction between your VB application and HTML content is one side only. If you can easily and dinamically write an HTML file based on a SQL table content and put it in a webbrowser control, like shown in the samples below. Reading the content of the HTML in the control to interact with your VB, is another issue to which i see no easy solution.
If someone know, please tell us. I'm also very interested...
Re: how to enable HTML objects, such as TABLE, FORM,, etc in VB 6
Here is an older sample. I hope they haven't changed the webpage layout, or it wouldl need more work. In any case, it won't work for any other webpage, but you can see how it's done.
If you have the Firefox Browser, it has on the TOOLS MENU, a link to the DOM Parser. It lets you see the underlying Markup Language in most webpages (except some PHP and ASP sites).
Re: how to enable HTML objects, such as TABLE, FORM,, etc in VB 6
Originally Posted by szpilman
thnx thread1 and david.
the web browser control work well.
but it raise another question is..
suppose i have made the TABLE succesfully, then
how to make that HTML TABLE can interact with the VB6 FORM ?
lets say FORM1 contain the TABLE from WEB BROWSER control,
if i right click on the cell, there is an event that will show another form, but the form is from VB6 not HTML page.
thnk U.
rgrds,
szpilman
well, thanks to the control's TitleChange event . .. the event fires whenever there is a change in the document.title or whenever you assign a value to this property. since this event also fires upon load of the document, perhaps you can declare your own format that can be filtered out.. here is the revised code, see how i raised the event in the script
Re: how to enable HTML objects, such as TABLE, FORM,, etc in VB 6
Originally Posted by WoF
@Thread1: I seem to get an error when trying wbb.Document.open:
Runtime error 438, saying method is not supported (in german).
Any Idea? Because I'd like to try that piece of code.
is your "wbb" a web browser control (reference : microsoft internet controls)?
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.