⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vbtocpp.txt

📁 一个把VB原代码转换为VC原代码的软件代码。
💻 TXT
📖 第 1 页 / 共 2 页
字号:
----------------------------------------------------------------------------------
VB2Cpp - Visual Basic to C++ translator.
Copyright (C) 2002-2003 Franck Charlet.

VB2Cpp is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.

VB2Cpp is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with VB2Cpp; see the file Copying.txt.  If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
----------------------------------------------------------------------------------

----------------------------------------------------------------------------------
Forewords:

	VB2Cpp is a tool able to translate Visual Basic 4/5/6 source codes
	into Visual C++ 5/6 ones.

	What can it be used for ?

		- Conversions of routines or projects (without forms) 
		  for further optimisations of the generated code.
		- Creation of plain DLLs (not Active X DLLs) to be re-used later
		  in other VB projects.
		- Removal of VB runtimes.
		- Learning tool for VB developpers/students who are interested
		  to see how their code could (but shouldn't) be translated in C.
		- Writing VB programs without owning the tool.
		- The translator could be extended to create a complete language.

		and maybe something else...

	Notice that projects to be converted MUST at least be correct VB projects.

----------------------------------------------------------------------------------
Installation:

	- Copy the file:

		src/MiniWin.h

		into visual C include directory.
		(Usually: C:\Program Files\Microsoft Visual Studio\VC98\Include)

----------------------------------------------------------------------------------
About the examples:

	Some examples showing the (lousy) capabilities of VB2Cpp are included
	in the package:

		Example1 - Show a simple messagebox.
		Example2 - Calculate some prime numbers.
		Example3 - Show a dialog window using APIs.
		Example4 - Do some work with arrays.
		Example5 - Garbage test module (to be expanded as much as possible).

----------------------------------------------------------------------------------
Output files:

	From a project to be converted it should produce:

		<ProjectName>.dsw
		- Visual C++ workspace file.

		<ProjectName>.dsp
		- Visual C++ project file.

		<ProjectName>.cpp
		- Main file containing:
		  
		  All APIs definition.
		  Includes to secondary files.
		  Emulated functions.

		<ProjectName>const.h
		- Containing all constants definitions.

		<ProjectName>type.h
		- Containing all user types definitions.

		<ProjectName>var.h
		- Containing all (global) variables definitions.

		<xxx>.cpp
		- Depending on the modules referenced in the project.
		  With constants/variables and user types definitions extracted.

----------------------------------------------------------------------------------
What IS supported:

Files:

	Projects files (.vbp)
	Standard modules files (.bas).

Operators:

	In compares:

	and			or			=
	<>			<			>
	<=			>=

	In operations:

	and			or			mod
	xor			+			-
	*			/			&
	addressof		\ *

	* Converted to /

Datas types:

	integer			long			string
	byte			boolean			utype
	double			string * x		single

Arguments and returned values:

	as integer		as long			as string
	as byte			as boolean		as utype
	as double		as single		as any*

	* External declarations (APIs) only.

	Optionals and Byref arguments are supported.

Arrays types:

	array()			array(x)		array(x,x,x...)
	array(0 to x)		array(0 to x,0 to x...)

Predicats:

	global			public			private
	byval			byref			static
	with			end with		attribute*

	* Internal to VB (ignored)

Declarations:

	const			type			function
	sub			declare	sub		declare function
	dim (single var)	dim (multi vars)	end sub
	end function		end type		sub main()
	enum			end enum

Flow controls:

	for			for/step		next
	exit sub		exit for		exit do
	exit function		if (block)		if (single line)
	else			end if			select case
	case			case is			case else
	end select		do while		do until
	do (single)		loop			loop while
	loop until		end			_ (line breaking)
	elseif (block)		elseif (single line)	stop
	while			wend			goto (label)
	goto (line number)	gosub			return
	on (expr) goto (label)

Statements:

	option explicit		kill			mkdir
	filecopy		name			rmdir
	chdir			beep			redim
	redim preserve		erase			debug.print*
	debug.?*		debug.assert*		chdrive
	call			let			rem
	option compare**	option private		mid
	midb			randomize		doevents

	* Ignored
	** Global

Functions:

	All operations involving Windows API or external Dlls
	(No ActiveX unless you handle Com servers by hand).

	$&!# suffixes are handled for these functions.

	len()			filelen()		abs()
	left()			right()			trim()
	ucase()			lcase()			chr()
	mid()			instr()*		asc()
	sgn()			space()			string()
	cstr()			clng()			cint()
	cdbl()			val()			sin()
	cos()			atn()			exp()
	log()			sqr()			tan()
	RGB()			varptr()		hex()
	replace()		environ()		ltrim()
	rtrim()			strreverse()		command()
	str()			ubound()**		lbound()**
	isnumeric()		curdir()***		now()
	date()****		time()****		ascb()
	oct()			strcomp()		msgbox()
	midb()			rnd()			int()
	dir()			timer()			split()

	* Only the two last arguments are optionals
	** Work only with Dynamic arrays
	*** Doesn't maintain dirs cache/drive
	**** Read only

Builtin objects:

	app.path		app.hinstance		app.threadid
	app.startmode*		app.title		app.exename

	* Always equal to vbSModeStandalone

Builtin enums:

	Constants				VbCompareMethod
	VbMsgBoxResult				VbMsgBoxStyle
	ColorConstants				SystemColorConstants
	VbAppWinStyle				VbCalendar
	VbCallType				VbDateTimeFormat
	VbDayOfWeek				VbFileAttribute
	VbFirstWeekOfYear			VbIMEStatus
	VbStrConv				VbTriState
	VbVarType				KeyCodeConstants
	RecordsetTypeConstants			AlignConstants
	AlignmentConstants			ApplicationStartConstants
	AsyncReadConstants			AsyncStatusCodeConstants
	AsyncTypeConstants			BorderStyleConstants
	ButtonConstants				CheckBoxConstants
	ClipBoardConstants			ComboBoxConstants
	DataBOFconstants			DataEOFConstants
	DataErrorConstants			DataValidateConstants
	DefaultCursorTypeConstants		DragConstants
	DragModeConstants			DragOverConstants
	DrawModeConstants			DrawStyleConstants
	FillStyleConstants			FormArrangeConstants
	FormBorderStyleConstants		FormShowConstants
	FormWindowStateConstants		HitResultConstants
	LinkErrorConstants			LinkModeConstants
	ListBoxConstants			LoadPictureColorConstants
	LoadPictureSizeConstants		LoadResConstants
	LogEventTypeConstants			LogModeConstants
	MenuAccelConstants			MenuControlConstants
	MouseButtonConstants			MousePointerConstants
	MultiSelectConstants			OldLinkModeConstants
	OLEContainerConstants			OLEDragConstants
	OLEDropConstants			OLEDropEffectConstants
	PaletteModeConstants			ParentControlsType
	PictureTypeConstants			PrinterObjectConstants
	QueryUnloadConstants			RasterOpConstants
	ScaleModeConstants			ScrollBarConstants
	ShapeConstants				ShiftConstants
	StartUpPositionConstants		VariantTypeConstants
	ZOrderConstants

Builtin constants:

	vbbinarycompare				vbtextcompare
	vbcr					vblf
	vbback					vbformfeed
	vbnullchar				vbtab
	vbverticaltab				vbabort
	vbcancel				vbignore
	vbno					vbok
	vbretry					vbyes
	vbabortretryignore			vbapplicationmodal
	vbcritical				vbdefaultbutton1
	vbdefaultbutton2			vbdefaultbutton3
	vbdefaultbutton4			vbexclamation
	vbinformation				vbmsgboxhelpbutton
	vbmsgboxright				vbmsgboxrtlreading
	vbmsgboxsetforeground			vbokcancel
	vbokonly				vbquestion
	vbretrycancel				vbsystemmodal
	vbyesno					vbyesnocancel
	vbblack					vbblue
	vbcyan					vbgreen
	vbmagenta				vbred
	vbwhite					vbyellow
	vb3ddkshadow				vb3dface
	vb3dhighlight				vb3dlight
	vb3dshadow				vbactiveborder
	vbactivetitlebar			vbactivetitlebartext
	vbapplicationworkspace			vbbuttonface
	vbbuttonshadow				vbbuttontext
	vbdesktop				vbgraytext
	vbhighlight				vbhighlighttext
	vbinactiveborder			vbinactivecaptiontext
	vbinactivetitlebar			vbinactivetitlebartext
	vbinfobackground			vbinfotext
	vbmenubar				vbmenutext
	vbscrollbars				vbtitlebartext
	vbwindowbackground			vbwindowframe
	vbwindowtext				vbdatabasecompare
	vbhide					vbmaximizedfocus
	vbminimizedfocus			vbminimizednofocus
	vbnormalfocus				vbnormalnofocus
	vbcalgreg				vbcalhijri
	vbget					vblet
	vbmethod				vbset
	vbgeneraldate				vblongdate
	vblongtime				vbshortdate
	vbshorttime				vbfriday
	vbmonday				vbsaturday
	vbsunday				vbthursday
	vbtuesday				vbusesystemdayofweek
	vbwednesday				vbalias
	vbarchive				vbdirectory
	vbhidden				vbnormal
	vbreadonly				vbsystem
	vbvolume				vbfirstfourdays
	vbfirstfullweek				vbfirstjan1
	vbusesystem				vbimealphadbl
	vbimealphasng				vbimedisable
	vbimehiragana				vbimekatakanadbl
	vbimekatakanasng			vbimemodealpha
	vbimemodealphafull			vbimemodedisable
	vbimemodehangul				vbimemodehangulfull
	vbimemodehiragana			vbimemodekatakana
	vbimemodekatakanahalf			vbimemodenocontrol
	vbimemodeoff				vbimemodeon
	vbimenoop				vbimeoff
	vbimeon					vbfromunicode
	vbhiragana				vbkatakana

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -