Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
Search the Tips
Tip Bank > Visual Basic > ActiveX

ActiveX - Page 3

41-60 of 183     Previous     Next
Connect to Microsoft Excel Using OLE DB
by Michael J.
Microsoft documentation says you can connect to Excel 97 or Excel 2000 using the Microsoft.Jet.OLEDB 4.0 provider. If you use the Microsoft ADO Data Control, however, you will have problems. From the ...
ADO in VB
by DevX Pro
I am trying to upgrade a program from DAO to ADO that will take a flat file and create a new database, add the needed fields and then populate the database. Does ADO have "CreateDatabase" funtionality? ie.Set DAODBase=dbEngine.CreateDatabase_ (App.Path & "\" & sDatabaseName) Set TDef = DAODBase.CreateTableDef _ (sTableDef)
Get the Command$ value from inside an ActiveX DLL
by Francesco Balena
At times you may need to access the command line passed to the application from within an ActiveX DLL. Unfortunately, when inside a DLL the Command$ function returns a null string, so you have to resort to some API trickery: Private Declare Function GetCommandLine Lib "kernel32" Alias ...
Use Enums to restrict parameter values in Classes, ActiveX Controls and DLLs
by Glen McLeod
By defining a Public Enum and using it as a parameter type to your property or function, client applications are presented with a drop down list of values to use. Unfortunately, VB doesn't restrict the client from passing something other than one of your enumerated values, since all Enums are ...
Rebase compiled DLLs
by Francesco Balena
Many VB developers know that they should specify a DLL Base Address value - in the Compile tab of the Project Properties dialog box - that is different from the base address of any other DLL or OCX used in the project. When you are working with a compiled DLL or OCX for which you don't ...
Share Data Across MTS Objects
by Deepak Pant
One of the resource dispensers that come with MTS is Shared Property Manager (SPM). SPM provides a mechanism by which you can share global memory among all the objects that are running inside the ...
Use XMLHttpRequest Object for Communication With HTTP Servers
by Deepak Pant
The XMLHttpRequest object provides client-side protocol support for communication with HTTP servers. A client computer can use the XMLHttpRequest object (Microsoft.XMLHTTP) to send an HTTP request, ...
Copy the contents of the WebBrowser control to the Clipboard
by Francesco Balena
To programmatically copy text from the WebBrowser control you can use its ExecWB method, to which you must pass the OLECMDID_COPY constant as its first argument. WebBrowser1.ExecWB OLECMDID_COPY, OLECMDEXECOPT_DODEFAULT You can also select the entire WebBrowser's contents ...
Download and save an HTML page with the Internet Transfer control
by Francesco Balena
You can easily download an HTML page by using the Internet Transfer Control (INet). Here's a reusable routine that uses this control to download the HTML page at the specified URL and optionally save it to a local file. In either case the routine returns the contents of the page as a string:
Print the WebBrowser's contents
by Francesco Balena
The WebBrowser control doesn't expose any method to directly print its contents. You can achieve this effect through the ExecWB method, by passing the OLECMDID_PRINT constant in its first argument: ' display the Print dialog WebBrowser1.ExecWB OLECMDID_PRINT, OLECMDEXECOPT_PROMPTUSER
Programmatically register an ActiveX control or DLL
by Marco Bellinaso
All ActiveX DLL or OCX export two functions: DllRegisterServer and DllUnregisterServer. They are used to register and unregister the ActiveX in the Windows registry, and are usually invoked from regsvr32.exe at registration time. However, you can register and unregister these files ...
Register and unregister components with context menus
by Francesco Balena
The stardard method to register and unregister ActiveX component is running the REGSVR32 utility, which forces you to bring up the Start|Run dialog and manually type the command line. A much better approach is to have the Register and Unregister commands right in the context menu that appears ...
Register and unregister type libraries
by Francesco Balena
All COM-oriented VB developers know how to register and unregister an ActiveX DLL, using the REGSVR32 utility. However, there is no such an utility to register and unregister a type library. You can quickly build your own TLB Registration utility with a handful of statements, thanks to ...
Retrieve the textual or HTML text contained in a WebBrowser control
by Francesco Balena
Here's a quick way to retrieve the textual (that is, without any HTML tag) contents of a WebBrowser control: Dim Text As String Text = WebBrowser1.Document.Body.InnerText Getting the HTML text is a tad less intuitive, though: Dim Text As String Text = WebBrowser1.
Sub Procedures or Functions in Visual Basic
by DevX Pro
Is it possible to have subprocedures or subfunctions in Visual Basic? For example, in COM components we find properties being accessed using the following: myObject.Column("myColumn").Hide = True In this Column is a function with a hide property. Is it possible in Visual Basic to write such functions, and if it is possible, how to write them
Enter Data on an MSFlexGrid
by Srinivasa S.
You can use MSFlexGrid for data entry without using additional ActiveX controls. For this, use the KeyPress and KeyUp events. To use the MSFlexGrid for data entry, add the grid—named ...
Buy an ActiveX Control or Develop Your Own?
by DevX Pro
I am endeavoring to provide a graphical booking sheet metaphor (i.e. timeslots v. names) in an ActiveX Document. The third party grids I've tried, purchased and tested don't allow the following: 1. multiple icons and text per cell 2. auto-merging/auto-joining of matching cells across both rows and columns at the same time 3. hiding individual gridlines on a cell-by-cell basis which would allow me to work around the item 2 requirement Some of the grids looked at so far: True DBGrid Pro, VSFlexGrid Pro, Janus GridEx and GreenTree XGrid (and waiting for replies from a couple others). As a last resort, I will purchase Dundas Software's Ultimate Grid and pay someone to modify the MFC/C++ source code. Someone suggested a large control array of textboxes, line controls, image controls, etc. This would mean coding all my own scrolling, data-refreshing, re-drawing, etc., but it would also mean keeping it all in native VB code and knowing exactly how my "grid" works. Any other suggestions?
A simple way to control a common dialog's position
by Francesco Balena
The CommonDialog control doesn't provide any direct way to decide where a common dialog appears on the screen. In all cases, in fact, the control tries to display the common dialog centered on its owner form. This behavior suggests a simple way to affect the approximate position of the common ...
OLE Automation of Word
by DevX Pro
How do you open a specific Word document through a Visual FoxPro program?
Running an Image Viewer in a Window
by DevX Pro
How can I run an image viewer in a window portion of a form in Visual FoxPro alongside a scrolling list box?
41-60 of 183     Previous     Next
Sitemap