Click here to Skip to main content
15,887,585 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Questionhow can i change messagebox background color in windows applications ? Pin
pramod251713-Mar-09 10:33
pramod251713-Mar-09 10:33 
AnswerRe: how can i change messagebox background color in windows applications ? Pin
Luc Pattyn13-Mar-09 12:34
sitebuilderLuc Pattyn13-Mar-09 12:34 
QuestionMaking changes to an unmanaged struct from VB.NET Pin
Kurt Richardson13-Mar-09 9:52
Kurt Richardson13-Mar-09 9:52 
AnswerRe: Making changes to an unmanaged struct from VB.NET Pin
Luc Pattyn13-Mar-09 10:23
sitebuilderLuc Pattyn13-Mar-09 10:23 
GeneralRe: Making changes to an unmanaged struct from VB.NET Pin
Kurt Richardson13-Mar-09 10:52
Kurt Richardson13-Mar-09 10:52 
GeneralRe: Making changes to an unmanaged struct from VB.NET Pin
Luc Pattyn13-Mar-09 11:10
sitebuilderLuc Pattyn13-Mar-09 11:10 
GeneralRe: Making changes to an unmanaged struct from VB.NET Pin
Kurt Richardson13-Mar-09 11:38
Kurt Richardson13-Mar-09 11:38 
QuestionAsk For Image Location? [modified] Pin
Schoof13-Mar-09 9:05
Schoof13-Mar-09 9:05 
Hi,

I'm currently working on a program that automaticly adds pictureboxes whenever you add an entree to a database (access).
I got that working, but Now I'm wondering how you make the picturebox (or whatever) ask where the image is located to draw it in the picturebox.

Example:

Database:
tblAnimals contains
- Dog
- Cat

Now in my form it auto adds 2 pictureboxes without containing any images. Now it should ask for the image location (C/Document/Pictures/Dog.jpg) and draw that in the picturebox.

I have no idea how to this, anyone has any ideas?
Already thx Smile | :)

This is my code now:
Dim bytTeller As Byte
Dim objdtsProducten As New dtsProducten
Dim objtblProductenTA As New dtsProductenTableAdapters.tblProductenTableAdapter
Dim dtrProduct As dtsProducten.tblProductenRow

objtblProductenTA.Fill(objdtsProducten.tblProducten)

For Each dtrProduct In objdtsProducten.tblProducten

    Dim ptbKnop As New PictureBox

    ptbKnop.Name = dtrProduct.ProductID
    ptbKnop.Text = dtrProduct.ProductNaam
    ptbKnop.Size = New Size(80, 40)
    ptbKnop.Location = New Point((bytTeller Mod 4) * 90, (bytTeller \ 4) * 50)

    AddHandler ptbKnop.Click, AddressOf KnopGeklikt
    Me.Controls.Add(ptbKnop)
    bytTeller += 1
Next


I know I can open a picture with this:
With OpenFileDialog1
    .CheckFileExists = True
    .ShowReadOnly = False
    .Filter = "All Files|*.*|Bitmap Files (*)|*.bmp;*.gif;*.jpg"
    .FilterIndex = 2
    If .ShowDialog = DialogResult.OK Then
        ' Load the specified file into a PictureBox control.
        Dog.Image = Image.FromFile(.FileName)
    End If
End With


But I don't know the name of the picture yet (see DOG)

modified on Friday, March 13, 2009 3:24 PM

AnswerRe: Ask For Image Location? Pin
Dave Kreskowiak15-Mar-09 3:32
mveDave Kreskowiak15-Mar-09 3:32 
QuestionNEED 1 VB PROGRAMMER TO DEVELEP SOME SAMLL PROGRAMES FOR MY BUSINESS Pin
carlhaley13-Mar-09 7:11
carlhaley13-Mar-09 7:11 
AnswerRe: NEED 1 VB PROGRAMMER TO DEVELEP SOME SAMLL PROGRAMES FOR MY BUSINESS Pin
Xmen Real 13-Mar-09 8:34
professional Xmen Real 13-Mar-09 8:34 
AnswerRe: NEED 1 VB PROGRAMMER TO DEVELEP SOME SAMLL PROGRAMES FOR MY BUSINESS Pin
Dave Kreskowiak13-Mar-09 8:44
mveDave Kreskowiak13-Mar-09 8:44 
AnswerRe: NEED 1 VB PROGRAMMER TO DEVELEP SOME SAMLL PROGRAMES FOR MY BUSINESS Pin
Dave Kreskowiak13-Mar-09 8:47
mveDave Kreskowiak13-Mar-09 8:47 
GeneralRe: NEED 1 VB PROGRAMMER TO DEVELEP SOME SAMLL PROGRAMES FOR MY BUSINESS Pin
Christian Graus14-Mar-09 8:32
protectorChristian Graus14-Mar-09 8:32 
GeneralRe: NEED 1 VB PROGRAMMER TO DEVELEP SOME SAMLL PROGRAMES FOR MY BUSINESS Pin
Dave Kreskowiak14-Mar-09 10:29
mveDave Kreskowiak14-Mar-09 10:29 
AnswerRe: NEED 1 VB PROGRAMMER TO DEVELEP SOME SAMLL PROGRAMES FOR MY BUSINESS Pin
Eddy Vluggen13-Mar-09 8:47
professionalEddy Vluggen13-Mar-09 8:47 
AnswerRe: NEED 1 VB PROGRAMMER TO DEVELEP SOME SAMLL PROGRAMES FOR MY BUSINESS Pin
0x3c013-Mar-09 9:00
0x3c013-Mar-09 9:00 
AnswerRe: NEED 1 VB PROGRAMMER TO DEVELEP SOME SAMLL PROGRAMES FOR MY BUSINESS Pin
Jon_Boy13-Mar-09 9:36
Jon_Boy13-Mar-09 9:36 
AnswerRe: NEED 1 VB PROGRAMMER TO DEVELEP SOME SAMLL PROGRAMES FOR MY BUSINESS Pin
EliottA14-Mar-09 6:04
EliottA14-Mar-09 6:04 
AnswerRe: NEED 1 VB PROGRAMMER TO DEVELEP SOME SAMLL PROGRAMES FOR MY BUSINESS Pin
Christian Graus14-Mar-09 8:34
protectorChristian Graus14-Mar-09 8:34 
GeneralRe: NEED 1 VB PROGRAMMER TO DEVELEP SOME SAMLL PROGRAMES FOR MY BUSINESS Pin
0x3c015-Mar-09 6:39
0x3c015-Mar-09 6:39 
AnswerRe: NEED 1 VB PROGRAMMER TO DEVELEP SOME SAMLL PROGRAMES FOR MY BUSINESS Pin
Thomas Krojer16-Mar-09 5:31
Thomas Krojer16-Mar-09 5:31 
Questionado connection to access mdb file. Pin
udikantz13-Mar-09 4:29
udikantz13-Mar-09 4:29 
AnswerRe: ado connection to access mdb file. Pin
Dave Kreskowiak13-Mar-09 5:25
mveDave Kreskowiak13-Mar-09 5:25 
GeneralRe: ado connection to access mdb file. Pin
udikantz13-Mar-09 5:42
udikantz13-Mar-09 5:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.