Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Feb 5th, 2006, 4:26 PM   #1
Austin123
Newbie
 
Join Date: Feb 2006
Posts: 4
Rep Power: 0 Austin123 is on a distinguished road
[Help] Scripting with VB.net

Hello,

I just started working with VB.net after downloading the Visual Studio Express package. I've spent the day tinkering with it and I have to say - It's been a long time since I used VB... and it seems to be completely different than Vbscript (which is the language of choice the last couple of years).

What I've been wanting to do is create a DeskShade-sque (http://www.macrabbit.com/deskshade/) like program for Windows:

It basically organizes your wallpapers or pics and lets you add more and/or group them. It applies them or lets you hue/shift them, it shows a little icon in the menubar with the desktop you're currently using. It has pretty nice effects (fades, rotate while changing desktop, etc) and features(hotkeys, drag and drop, etc).

I've been able to do it with VBscript but the results were less than consumer-friendly, hence the switch over to a language that offers a little more in the way of building an user interface.

Now to the dilemma: I've gotten all the images created for the program and the layout of the program is complete, the problem is I haven't had much luck populating a ListView with the jpegs of a folder; actually, I've had even less luck with parsing the images into an imagelist...and now I'm at a complete loss.

In Vbscript it was as simple as using a GetFiles() method and saving each image into an array but with VB.net...

I know there are some genius programmers here and would really appreciate if someone might be able to point me in the right direction.

Thankyou and I apologize for the length of this comment.
Austin123 is offline   Reply With Quote
Old Feb 8th, 2006, 8:52 PM   #2
Austin123
Newbie
 
Join Date: Feb 2006
Posts: 4
Rep Power: 0 Austin123 is on a distinguished road
are there any activeX controls that deal with system tray icons that can be used with VBscript?
Thanks
Austin123 is offline   Reply With Quote
Old Feb 17th, 2006, 5:37 PM   #3
melbolt
Hobbyist Programmer
 
melbolt's Avatar
 
Join Date: Feb 2005
Location: PA, USA
Posts: 233
Rep Power: 4 melbolt is on a distinguished road
Send a message via AIM to melbolt Send a message via Yahoo to melbolt
Quote:
Originally Posted by Austin123
Now to the dilemma: I've gotten all the images created for the program and the layout of the program is complete, the problem is I haven't had much luck populating a ListView with the jpegs of a folder; actually, I've had even less luck with parsing the images into an imagelist...and now I'm at a complete loss.
to add an image to your image list, you could do this:

Private Sub AddImageToList(imageToLoad As String)

            If imageToLoad <> "" Then
                imageList1.Images.Add(Image.FromFile(imageToLoad))
            End If

End Sub


where imageToLoad parameter is simply the path to the image.


if you wanted to use an openfiledialogue control you could get the image's filenames like so:

openFileDialog1.Multiselect = True

If openFileDialog1.ShowDialog() = DialogResult.OK Then
'for multiple images selected
                If Not (openFileDialog1.FileNames Is Nothing) Then
                    Dim i As Integer
                    For i = 0 To openFileDialog1.FileNames.Length - 1
                        addImage(openFileDialog1.FileNames(i))
                    Next i
                Else
'for a single image selected
                    addImage(openFileDialog1.FileName)
                End If
End If

http://msdn.microsoft.com/library/de...classtopic.asp


btw, VB .NET is not a scripting language, its compiled

if you have more questions you can post back and i'll try to check again, i'm not really sure how you want this program to work. is it to get all the images out of a folder or is it letting the user select them?
__________________
I have never let my schooling interfere with my education. -Mark Twain-

Xbox live gamertag: melbolt
melbolt is offline   Reply With Quote
Old Feb 17th, 2006, 5:44 PM   #4
melbolt
Hobbyist Programmer
 
melbolt's Avatar
 
Join Date: Feb 2005
Location: PA, USA
Posts: 233
Rep Power: 4 melbolt is on a distinguished road
Send a message via AIM to melbolt Send a message via Yahoo to melbolt
Quote:
Originally Posted by Austin123
are there any activeX controls that deal with system tray icons that can be used with VBscript?
Thanks

I'm not sure about scripting, but in VB .NET...

Creating the system tray icon is pretty simple. The .NET Framework provides the NotifyIcon class. From the designer, all you need to do is drag a NotifyIcon control to the form. You may also want to design a custom icon to go with it.

Strangely, there's no way to go from the icon property on the NotifyIcon object directly to the icon editor. You need to add a new icon file to your project, edit the icon, and then refer to that file to hook it to the NotifyIcon object.


now that you have the icon you'll probably want to add contextmenu control to your form as well, this will give you the right click menu in which you can then code to do whatever you want.

there's some useful stuff here: http://msdn.microsoft.com/library/de...rp06102002.asp

although this is for C#, a lot of it is still similar since they share the .NET framework.
__________________
I have never let my schooling interfere with my education. -Mark Twain-

Xbox live gamertag: melbolt
melbolt is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 6:05 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC