- Imports System.IO
-
Imports System.Data
-
Imports System.Data.OleDb
-
Imports Microsoft.VisualBasic
-
-
-
Public Class CARD_DECK_ENTRY Public myConString As String Dim con As New OleDb.OleDbConnection Dim myStream As Stream = Nothing
-
-
Private Sub ExitToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExitToolStripMenuItem.Click
-
End
-
Operator_ID.Close()
-
End Sub
-
-
Private Sub OpenFileToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OpenFileToolStripMenuItem.Click
-
-
Dim openFileDialog1 As New OpenFileDialog()
-
-
openFileDialog1.InitialDirectory = "c:\"
-
openFileDialog1.Filter = "mdb files (*.mdb)|*.mdb|All files (*.*)|*.*"
-
openFileDialog1.FilterIndex = 1
-
openFileDialog1.RestoreDirectory = True
-
-
-
If openFileDialog1.ShowDialog() = System.Windows.Forms.DialogResult.OK Then
-
Try
-
myStream = openFileDialog1.OpenFile()
-
If (myStream IsNot Nothing) Then
-
myConString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & openFileDialog1.FileName
-
Dim x As String = openFileDialog1.FileName.Substring(0, openFileDialog1.FileName.Length - 20) & "Images"
-
con.ConnectionString = myConString
-
con.Open()
-
-
datagridshow()
-
End If
-
Catch Ex As Exception
-
MessageBox.Show("Cannot read file from disk. Original error: " & Ex.Message)
-
Finally
-
' Check this again, since we need to make sure we didn't throw an exception on open.
-
-
If (myStream IsNot Nothing) Then
-
myStream.Close()
-
End If
-
End Try
-
End If
-
-
End Sub
-
-
-
Private Sub CARD_DECK_ENTRY_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
-
-
con.ConnectionString = myConString
-
-
con.Open()
-
-
datagridshow()
-
-
End Sub
-
-
Private Sub datagridshow()
-
Dim ds As New DataSet
-
Dim dt As New DataTable
-
ds.Tables.Add(dt)
-
Dim da As New OleDbDataAdapter
-
-
da = New OleDbDataAdapter("Select * from Data001", con)
-
da.Fill(dt)
-
-
DataGridView1.DataSource = dt.DefaultView
-
-
con.Close()
-
-
-
End Sub
---
The above codes was to browse an MDB file and it worked, but now i'm about to load the images into a imageViewer with same time on browsing mdb. As you can see in the above codes, there was ("Select * from Data001", con) because it was a table I will be showing on the DataGridView. On the database there was a two table, those are "CardDeck" and "Data001." In CardDeck there was a "Image001" column. This column contains tif image names. On the folder where the database was found there was another folder on the same path(path of the database folder) named "Images". The column value of "Image001" will be found there. My point is how can I browse those "Image001" column value to a ImageViewer where those value are located in Folder "Images"? Please help. :'(
0 996 Sign in to post your reply or Sign up for a free account.
Similar topics |
by: ktenney |
last post by:
Howdy,
I've written some code which manipulates images,
now I want an interface for choosing images.
I'm curious what people might recommend as the
easiest way framework to do the following:
- present a (directory) view, with images represented
by thumbnails
|
by: Dalan |
last post by:
At first I was not certain what could cause Access 97 from displaying
most jpeg images, but not all. After further testing, it seemed that
all original images of less than 275 pixels per inch or less would
display, but those close to 300 pixels/inch or greater would not (MS
Access cannot recognize the file format xxx.jpg). The larger, original
images were scanned and saved as .bmp (at 300 dpi producing a 15MB
file). Then the images were...
|
by: Anita C |
last post by:
Hi,
On the click of a button I want to be able to display a dialog so that a
file can be picked , the name of which needs to be passed to a function as a
parameter in my asp.net app.. However for the file dialog I need to specify
the type of file and the directory which can be browsed. Can someone please
point out articles/code samples which will help achieve the above.
Thanks a lot.
|
by: Darren |
last post by:
Hi,
I am not an experienced PHP programmer and have look on the net for
what I want to do.
I'd like to allow the user on my website to upload two images one is to
be turned into a thumbnail and one is to be turned into something of
around 500 x 300, one stored in a thumbnail folder and one stored in an
image folder.
|
by: den 2005 |
last post by:
Hi everybody,
I like to allow user to select and browse to which location to save the
pdf file of a crystal report viewed on a web page, how can i do this in
ASP.Net? I need to get the path selected from dialog box. Thanks.
Note: Using VS 2002
den2005
| |
by: Ashok |
last post by:
Hi,
I would like to seek your help to get more understanding of how to
concert a htm file (with images) to a word or excel file using vb.net
programe.
Appreciate if anyone can give the code for the above function.
Thanks for your suggestion.
|
by: ApexData |
last post by:
I am using code from the following links to establish a
Browse File and Browse Folder dialog.
http://www.mvps.org/access/api/api0001.htm
http://www.mvps.org/access/api/api0002.htm
This code works great. However, once the file dialog becomes visible,
if the user clicks on my popup form that exists under the file dialog,
the file dialog disappears under the form. Then, when the form
clears, the file dialog shows. Select a file, and...
|
by: shabana |
last post by:
hi,
i wrote a code to display image from a file using adsp imageviewer,
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
AxADspImageViewer1.SourceLocation = IMAGEPLUGINLib.adspImageSourceLocation.sourceLocationFile
AxADspImageViewer1.PixelFormat = IMAGEPLUGINLib.adspImagePixelFormat.pixelYuy2
|
by: prashantdixit |
last post by:
Hi,
I have a form "FormA" which three browse button and texbox control.
There two radio buttons at the top with option
option1: Auto
option2: Manual
These option decides how to select a file through Browse dialog button
|
by: mayankshri |
last post by:
hi, I am open a word file from open dialog box in rich text box.
i am using this code it open a word file but shows only text .i want to open file with text,images and bullets.
Microsoft.Office.Interop.Word.ApplicationClass wordObject = new Microsoft.Office.Interop.Word.ApplicationClass();
object File = txtfilepath.Text; //this is the path
object nullobject = System.Reflection.Missing.Value;
...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |