By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,665 Members | 2,212 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,665 IT Pros & Developers. It's quick & easy.

Implementing a Filmstrip

P: n/a

I need to duplicate something that is easy to do in Access using a recordset
with its movenext, moveprevious, movefirst, movelast, and move(i) where i is
a positive or negative integer. I do not know how to do this in .NET. None
of the existing data structures dataset, arraylist, etc support this type of
access.

I need pull in the photos in a particular order and show 3 at a time in 3
images boxes. The user has First, Next, Previous, Last and Jump button
(moves 4, 5 or 10, etc at a time after the user enters a number between 1 and
number of photos in the sequence). There can be anywhere from 1 photo to
1000 photos in the list.

The database keeps the path to the photo not the actual photo. So the list
is essentially sequential list (recordset) of paths along with other a few
other fields.

WR
Jul 21 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Hey WR,

Many of the ways of dealing with data sets (not just the DataSet) don't
really keep a pointer like a DBMS environment. They're often just
referenced ordinally (with a position). To implement this on your own you
can keep whatever the "current" item is in a variable or property and use
that to reference the appropriate row in the table.

With an index value, reference the table's Rows collection appropriately,
like
strPictureLoc = tblPicture.Rows[intCurrentRow]["PictureURL"].ToString();

One way would be to implement a property with the appropriate "move"
methods. Something like...

private DataTable tblPictures;
private int intCurrentRow = 0;
public int CurrentRow
{
get
{
return intCurrentRow;
}
set
{
if (value < 0)
// tried to move prior to top -- move top
intCurrentRow = 0;
else if (value >= tblPictures.Rows.Count)
// Tried to move past end -- move bottom
intCurrentRow = tblPictures.Rows.Count - 1;
else
intCurrentRow = value;
}
}

private void MoveFirst()
{
CurrentRow = 0;
}

private void MovePrevious()
{
CurrentRow--;
}

private void MoveNext()
{
CurrentRow++;
}

private void MoveVaried()
{
// Assumes you have a NumericUpDown control that indicates how many
places to move
CurrentRow += nudMoveRows.Value;
}
There are probably a dozen other approaches, but that is one option!

HTH,

John
"WhiskyRomeo" <Wh*********@discussions.microsoft.com> wrote in message
news:71**********************************@microsof t.com...

I need to duplicate something that is easy to do in Access using a recordset with its movenext, moveprevious, movefirst, movelast, and move(i) where i is a positive or negative integer. I do not know how to do this in .NET. None of the existing data structures dataset, arraylist, etc support this type of access.

I need pull in the photos in a particular order and show 3 at a time in 3
images boxes. The user has First, Next, Previous, Last and Jump button
(moves 4, 5 or 10, etc at a time after the user enters a number between 1 and number of photos in the sequence). There can be anywhere from 1 photo to
1000 photos in the list.

The database keeps the path to the photo not the actual photo. So the list is essentially sequential list (recordset) of paths along with other a few other fields.

WR

Jul 21 '05 #2

P: n/a
Thanks for your time and suggestion.

This exactly the ticket.

wr

"John Spiegel" wrote:
Hey WR,

Many of the ways of dealing with data sets (not just the DataSet) don't
really keep a pointer like a DBMS environment. They're often just
referenced ordinally (with a position). To implement this on your own you
can keep whatever the "current" item is in a variable or property and use
that to reference the appropriate row in the table.

With an index value, reference the table's Rows collection appropriately,
like
strPictureLoc = tblPicture.Rows[intCurrentRow]["PictureURL"].ToString();

One way would be to implement a property with the appropriate "move"
methods. Something like...

private DataTable tblPictures;
private int intCurrentRow = 0;
public int CurrentRow
{
get
{
return intCurrentRow;
}
set
{
if (value < 0)
// tried to move prior to top -- move top
intCurrentRow = 0;
else if (value >= tblPictures.Rows.Count)
// Tried to move past end -- move bottom
intCurrentRow = tblPictures.Rows.Count - 1;
else
intCurrentRow = value;
}
}

private void MoveFirst()
{
CurrentRow = 0;
}

private void MovePrevious()
{
CurrentRow--;
}

private void MoveNext()
{
CurrentRow++;
}

private void MoveVaried()
{
// Assumes you have a NumericUpDown control that indicates how many
places to move
CurrentRow += nudMoveRows.Value;
}
There are probably a dozen other approaches, but that is one option!

HTH,

John
"WhiskyRomeo" <Wh*********@discussions.microsoft.com> wrote in message
news:71**********************************@microsof t.com...

I need to duplicate something that is easy to do in Access using a

recordset
with its movenext, moveprevious, movefirst, movelast, and move(i) where i

is
a positive or negative integer. I do not know how to do this in .NET.

None
of the existing data structures dataset, arraylist, etc support this type

of
access.

I need pull in the photos in a particular order and show 3 at a time in 3
images boxes. The user has First, Next, Previous, Last and Jump button
(moves 4, 5 or 10, etc at a time after the user enters a number between 1

and
number of photos in the sequence). There can be anywhere from 1 photo to
1000 photos in the list.

The database keeps the path to the photo not the actual photo. So the

list
is essentially sequential list (recordset) of paths along with other a

few
other fields.

WR


Jul 21 '05 #3

P: n/a

You might also want to look at the DataGrid control.

It can do all of that for you in a webForm if you bind it to a DataSet.
WhiskyRomeo wrote:
Thanks for your time and suggestion.

This exactly the ticket.

wr

"John Spiegel" wrote:

Hey WR,

Many of the ways of dealing with data sets (not just the DataSet) don't
really keep a pointer like a DBMS environment. They're often just
referenced ordinally (with a position). To implement this on your own you
can keep whatever the "current" item is in a variable or property and use
that to reference the appropriate row in the table.

With an index value, reference the table's Rows collection appropriately,
like
strPictureLoc = tblPicture.Rows[intCurrentRow]["PictureURL"].ToString();

One way would be to implement a property with the appropriate "move"
methods. Something like...

private DataTable tblPictures;
private int intCurrentRow = 0;
public int CurrentRow
{
get
{
return intCurrentRow;
}
set
{
if (value < 0)
// tried to move prior to top -- move top
intCurrentRow = 0;
else if (value >= tblPictures.Rows.Count)
// Tried to move past end -- move bottom
intCurrentRow = tblPictures.Rows.Count - 1;
else
intCurrentRow = value;
}
}

private void MoveFirst()
{
CurrentRow = 0;
}

private void MovePrevious()
{
CurrentRow--;
}

private void MoveNext()
{
CurrentRow++;
}

private void MoveVaried()
{
// Assumes you have a NumericUpDown control that indicates how many
places to move
CurrentRow += nudMoveRows.Value;
}
There are probably a dozen other approaches, but that is one option!

HTH,

John
"WhiskyRomeo" <Wh*********@discussions.microsoft.com> wrote in message
news:71**********************************@micros oft.com...
I need to duplicate something that is easy to do in Access using a


recordset
with its movenext, moveprevious, movefirst, movelast, and move(i) where i


is
a positive or negative integer. I do not know how to do this in .NET.


None
of the existing data structures dataset, arraylist, etc support this type


of
access.

I need pull in the photos in a particular order and show 3 at a time in 3
images boxes. The user has First, Next, Previous, Last and Jump button
(moves 4, 5 or 10, etc at a time after the user enters a number between 1


and
number of photos in the sequence). There can be anywhere from 1 photo to
1000 photos in the list.

The database keeps the path to the photo not the actual photo. So the


list
is essentially sequential list (recordset) of paths along with other a


few
other fields.

WR


Jul 21 '05 #4

P: n/a
Now that I have a way to find the image in the dataset as the path, it
appears the PictureBox does not have a property to accept a path.

What control will allow this to be done in Windows form?

wr

"WhiskyRomeo" wrote:

I need to duplicate something that is easy to do in Access using a recordset
with its movenext, moveprevious, movefirst, movelast, and move(i) where i is
a positive or negative integer. I do not know how to do this in .NET. None
of the existing data structures dataset, arraylist, etc support this type of
access.

I need pull in the photos in a particular order and show 3 at a time in 3
images boxes. The user has First, Next, Previous, Last and Jump button
(moves 4, 5 or 10, etc at a time after the user enters a number between 1 and
number of photos in the sequence). There can be anywhere from 1 photo to
1000 photos in the list.

The database keeps the path to the photo not the actual photo. So the list
is essentially sequential list (recordset) of paths along with other a few
other fields.

WR

Jul 21 '05 #5

P: n/a
never mind, I found it:

pbx.Image = Image.FromFile(datatable.Rows(0).Item("Path"))

"WhiskyRomeo" wrote:
Now that I have a way to find the image in the dataset as the path, it
appears the PictureBox does not have a property to accept a path.

What control will allow this to be done in Windows form?

wr

"WhiskyRomeo" wrote:

I need to duplicate something that is easy to do in Access using a recordset
with its movenext, moveprevious, movefirst, movelast, and move(i) where i is
a positive or negative integer. I do not know how to do this in .NET. None
of the existing data structures dataset, arraylist, etc support this type of
access.

I need pull in the photos in a particular order and show 3 at a time in 3
images boxes. The user has First, Next, Previous, Last and Jump button
(moves 4, 5 or 10, etc at a time after the user enters a number between 1 and
number of photos in the sequence). There can be anywhere from 1 photo to
1000 photos in the list.

The database keeps the path to the photo not the actual photo. So the list
is essentially sequential list (recordset) of paths along with other a few
other fields.

WR

Jul 21 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.