Is there anywhere a list of what the API2 equivalent of API1 is? Would be useful to quickly see what the replacement is …
There is not as some has no exact direct equivalent
ie/ now in some case you’ll get an exception instead of an error code
however we could certainly start a topic here for this
I do think I’ve seen a page where it said things like
ubound becomes lastIndex
Listbox.ListIndex becomes ListBox.SelectedRowIndex
but I’ll be damned if I can find it again …
There might be duplicates in this, and here is a starting list from two of my books. I am sure there are many more.
- Drawline is deprecated in some instances, using GraphicsPath instead
- DrawPolygon is deprecated, using GraphicsPath instead
- Graphics is using double instead of integer – updates throughout code
- Graphics DrawRect is deprecated. Using DrawRectangle instead
- Graphics DrawRoundRect is deprectated. Using DrawRoundRectangle instead
- Graphics DrawString is deprectated. Using DrawText instead
- ForeColor is deprecated. The newer DrawingColor is used instead.
- FillPolygon is deprecated. The newer FillPath is used instead.
- FillRect is deprecated. The newer FillRectangle is used instead.
- FillRoundRect is deprecated. The newer FillRoundRectangle command is used instead.
- DoubleBuffer is deprectated and removed
- EraseBackground is deprecated and removed
- PenWidth is deprecated. PenSize is used instead.
- PenHeight is deprecated. PenSize is used instead.
- Pixel is deprecated. RGBSurface.Pixel is used instead.
- MsgBox is deprecated, and MessageDialog.Show is used instead
- Pixel is deprecated, and RGBSurface.Pixel is used instead
- Mid is deprecated, and String.Middle is used instead
- OpenDialog is deprecated, OpenFileDialog is used instead
- EraseBackground is deprectated and removed from the programs
- OpenAsPicture is deprecated. FolderItem.OpenAsPicture is used instead.
- Save is deprecated. Using Save Folderitem instead.
- Updated to newer Picture.Formats picture types
- TextFont is Deprecated, FontName is used instead
- TextSize is Deprecated, FontSize is used instead
- StringShape is Deprecated, TextShape is used instead
- Text is deprecated, Value is used instead
- PageSetupDialog is deprecated, using ShowPageSetupDialog instead
- LiveScroll is deprecated, using AllowLiveScrolling instead
- StringWidth is deprecated, using TextWidth instead
- Border is deprecated, using BorderOpacity instead
- Append is deprecated, use Add instead
- Ubound is deprecated, LastIndex is used instead
- Remove is deprecated, using RemoveAt instead
- Mask is deprecated, using ApplyMask instead
- AcceptFocus is deprecated, using AllowFocus instead
- Mode is deprecated, using RunMode instead
- Using new IconTypes API2 code for MessageDialog
- Microseconds is deprecated, using System.Microseconds instead
- Run is deprecated, using Thread.Start instead
- Kill is deprecated, using Thread.Stop instead
- Default is deprecated, using IsDefault instead
- Icon is deprecated, IconType is used instead
- GraphicStop is Deprecated, using IconTypes.Stop instead
- SupportsHiDPI is deprecated, using AllowHiDPI instead
- Redim is deprecated, using ResizeTo instead
Datatype NULL is now called BLOB
• Update a large number of screen grabs with newer DB Browser for SQLite
• OpenDialog is deprecated, using OpenFileDialog instead
• Value is deprecated, using Text instead
• MsgBox is deprecated, using MessageDialog.Show.
• Field is deprecated, using Column instead
• Field is deprecated, using RowSet instead
• SQLSelect is deprecated, using SelectSQL instead
• RecordSet is deprecated, using RowSet instead
• ErrorMessage is deprecated, using DatabaseException instead
• EOF is deprecated, using For Each x as DatabaseRow in RS instead and/or AfterLastRow
• LastIndex is deprecated, using LastAddedRowIndex instead
• HasHeading is deprecated, using HasHeader instead
• Cell is deprecated, CellValueAt is used instead
• DatabaseRecord is deprecated, DatabaseRow is used instead
• InsertRecord is deprecated, AddRow is used instead
• Delete is deprecated, using Remove instead
• CopyFileTo is deprecated, using CopyTo instead
• MaxHorizontalResolution is deprectated, using MaximumHorizontalResolution instead
• MaxVerticalResolution is deprecated, using MaximumVerticalResolution instead
• PageSetupDialog is deprecated, using ShowPageSetupDiaolog instead
• Date is deprecated, DateTime is used instead
• SaveAsDialog is deprecated, using SaveFileDialog instead
• CreateDatabaseFile is deprecated, using CreateDatabase instead
• SQLExecute is deprecated, using ExecuteSQL instead
• SleepCurrentThread is deprecated, using Thread.SleepCurrent instead
• Commit is deprecated, using CommitTransaction instead
• Rollback is deprecated, using RollbackTransaction instead
Edit: removed some which are not applicable for API1 to API2 conversion
with 2.1 its not so bad. most everything works as before but you have the opportunty to refocator up as you go. I am trying my best to form good habits to that end. I dont always but…im moving forward with 2.1 and so far its a bit snappier, especially on the m1