VB.NET doesn't treat ItemForeCOlor and ItemBackColor as common properties, you need use setItemForeColor or setItemBackColor method to change the fore color or back color of an item.
VB.NET program uses a complete new Font object, so you need change your code as followings.
' load in program names
lstProgram.AddItem(" " & ProListName)
Dim fontFamily As New FontFamily("Arial")
Dim oldFont As Font = _
Dim fnt As New Font(fontFamily, oldFont.Size, _
oldFont.Style Or FontStyle.Bold)
Please refer to following links for more details:
1) How to: Construct Font Families and Fonts
2) Font Constructor
[ 6 comments ] ( 860 views ) | [ 0 trackbacks ] | permalink | related link | ( 3.1 / 87 )
Dear Mr. Hai Li. I must thank you for vbio16.dll and vbio32.dll development, specially vbio16.dll because it is exactly what I was searching since a cop of months. I use Foxpro 2.6 Windows and I guess it is the only one Foxpro Windows (not Visual) 16 bits mode version and it's running in my PC under Windows 98. It runs under Windows 3.1 and Windows 95 too. Here is an example of how to use vbio16.dll with Foxpro 2.6 Windows. If you want, you can add it to others examples published in your Web page.
Foxpro 2.6 Windows uses foxtools.fll special Foxpro library. It contains many functions but specially provides a special way to use external libraries. It is by using RegFn and CallFn functions. RegFn is to declare a external library function and CallFn executes it.
SET LIBRARY TO SYS(2004)+"foxtools.fll" ADDITIVE
**sys(2004) is a Foxpro System Function that provides the complete path to Foxpro directory.
**ADDITIVE avoid others libraries to be disabled.
inpuerto=RegFn("inport", "I", "I", "vbio16.dll")
**This will return an integer to identify this declaration and wil be stored on the user memory variable "inpuerto".
**"inport" is a vbio16.dll function to read a port.
**First "I" is the parameter will be passed to the function, in this case it is port address as integer. Port address can be obtained from Windows 98 Pannel Control System Information or using DOS function DEBUG running Windows 98 in DOS mode. Some functions requires more than one parameter and the number of parameters required will be indicated with the same number of I. It is "II" or "III" and so on.
**Second "I" specifies type of value will return RegFn. In this case it will be an integer. Foxpro will return zero for the first function declared, one for the second and so on; all of them stored at the desired user memory variable.
**"vbio16.dll" is the library where Foxpro will search for the specified function.
**You can declare all functions you want and Foxpro will return a handle integer for each one.
**"Vbio16 function "inportw" can be declared in the same way.
**Same considerations listed for inpuerto but, note that in this case parameters to pass are two integers ("II"). First is port address, second is the byte to be written as integer.
**"outportw" can be declared in the same way.
readpuerto=CallFn(inpuerto, port address)
**This will read a byte form the specified port and will be stored at "readpuerto" user memory variable.
writepuerto=CallFn(wpuerto, port address, byte to be written as integer)
**This will return the written byte as integer.
**This releases all memory variables.
RELEASE LIBRARY SYS(2004)+"foxtools.fll"
**This releases "foxtools.fll" from memory.
Reading about paralell port addresses is recommended.
For further information about foxtools.fll using refer to an installed Foxpro 2.6; path C:\Fpw26\Goodies \Foxtools\foxtools.wri
Congratulations Hai for your job. Special regards.
Alberto O. Compagnucci
Punta Alta - BUENOS AIRES - ARGENTINA
[ 1 comment ] ( 4 views ) | [ 0 trackbacks ] | permalink | related link | ( 2.9 / 107 )
introduced 64-bit browser in Windows x64 and recalled all vendors to write 64-bit ActiveX.
We are trying to migrate our ActiveX controls to x64 platform(AMD64 and EM64T). Microsoft chose LLP64 data model, so that 32-bit ActiveX and 64-bit ActiveX can be compiled from same source code. Both 64-bit and 32-bit ActiveX can share same CLSID, because WOW64 presents 32-bit applications with an alternate view of the registry. Please notes Regsvr32.exe file in the System32 folder is a 64-bit version. When you run Regsvr32 to register a DLL, you are using the 64-bit version by default. If you want to register 32-bit version, please run Regsvr32.exe from the %SystemRoot%\Syswow64 folder.
[ add comment ] ( 1 view ) | [ 0 trackbacks ] | permalink | related link | ( 3.1 / 35 )
Thanks in advance.
[ 1 comment ] ( 2 views ) | [ 0 trackbacks ] | permalink | related link | ( 3 / 91 )