PC Review


Reply
Thread Tools Rate Thread

Array syntax question - sorry

 
 
Colin McGuire
Guest
Posts: n/a
 
      12th Oct 2003
Sorry to ask a simple question on syntax but the line inside the
subroutine "assignBitmapArray" won't compile giving me an "Expression
Expected" error. What is the correct syntax to initialize an array of
Objects/Bitmaps?
Thank you
Colin


Public Structure testStruct
Dim testBitmap() As Bitmap
End Structure

Dim globalStruct As testStruct

Private Sub assignBitmapArray
globalStruct.testBitmap = {new Bitmap("c:\tb\WApp01\flower023.bmp")}
End Sub
 
Reply With Quote
 
 
 
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      12th Oct 2003
* (E-Mail Removed) (Colin McGuire) scripsit:
> Sorry to ask a simple question on syntax but the line inside the
> subroutine "assignBitmapArray" won't compile giving me an "Expression
> Expected" error. What is the correct syntax to initialize an array of
> Objects/Bitmaps?

[...]
> Public Structure testStruct
> Dim testBitmap() As Bitmap
> End Structure
>
> Dim globalStruct As testStruct
>
> Private Sub assignBitmapArray
> globalStruct.testBitmap = {new Bitmap("c:\tb\WApp01\flower023.bmp")}
> End Sub


\\\
Public Structure testStruct
Dim testBitmap() As Bitmap
End Structure

Dim globalStruct As testStruct

Private Sub assignBitmapArray()
globalStruct.testBitmap = New Bitmap() {New Bitmap("c:\tb\WApp01\flower023.bmp")}
End Sub
///

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
 
Reply With Quote
 
Colin McGuire
Guest
Posts: n/a
 
      12th Oct 2003
> globalStruct.testBitmap = New Bitmap() {New
Bitmap("c:\tb\WApp01\flower023.bmp")}


Of course it is. Thank you Herfried.
Colin



"Herfried K. Wagner [MVP]" <hirf-spam-me-(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> * (E-Mail Removed) (Colin McGuire) scripsit:
> > Sorry to ask a simple question on syntax but the line inside the
> > subroutine "assignBitmapArray" won't compile giving me an "Expression
> > Expected" error. What is the correct syntax to initialize an array of
> > Objects/Bitmaps?

> [...]
> > Public Structure testStruct
> > Dim testBitmap() As Bitmap
> > End Structure
> >
> > Dim globalStruct As testStruct
> >
> > Private Sub assignBitmapArray
> > globalStruct.testBitmap = {new Bitmap("c:\tb\WApp01\flower023.bmp")}
> > End Sub

>
> \\\
> Public Structure testStruct
> Dim testBitmap() As Bitmap
> End Structure
>
> Dim globalStruct As testStruct
>
> Private Sub assignBitmapArray()
> globalStruct.testBitmap = New Bitmap() {New

Bitmap("c:\tb\WApp01\flower023.bmp")}
> End Sub
> ///
>
> --
> Herfried K. Wagner
> MVP · VB Classic, VB.NET
> <http://www.mvps.org/dotnet>


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Array Formula Syntax question... Steve P Microsoft Excel Misc 3 6th Nov 2009 04:44 PM
Populating an array<System::UInt32>^ from an unmanaged array in the new C++/CLI syntax Bern McCarty Microsoft VC .NET 2 21st Dec 2006 05:14 AM
Array Syntax Samuel Shulman Microsoft VB .NET 2 20th Aug 2006 11:34 PM
Want to Use an Array; Not Sure of Syntax RichK Microsoft Excel Misc 4 6th May 2005 08:15 AM
Syntax Question - String Array C Downey Microsoft ASP .NET 1 29th Apr 2004 07:57 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:39 PM.