Quantcast

Maximum PC

It is currently Thu Dec 18, 2014 4:54 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 55 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
 Post subject:
PostPosted: Sun Nov 02, 2008 6:30 pm 
Team Member Top 500
Team Member Top 500
User avatar

Joined: Thu Dec 23, 2004 2:34 pm
Posts: 3977
Location: Building my 4-8-9
I can actually get Visual Studio 2008 Professional for free through DreamSpark. I think I'll go that route.


Top
  Profile  
 
 Post subject:
PostPosted: Mon Nov 03, 2008 2:05 am 
Team Member [Top 500]*
Team Member [Top 500]*
User avatar

Joined: Thu Jun 24, 2004 2:22 pm
Posts: 8721
Location: Cleveland, Ohio
Owww, me want to return to school and be a student. :lol:

Sweet deal on some nice stuff!

Nothing at all to lose and you could make yourself some useful little apps.

Ron


Top
  Profile  
 
 Post subject:
PostPosted: Mon Nov 03, 2008 6:31 am 
Team Member Top 500
Team Member Top 500
User avatar

Joined: Thu Dec 23, 2004 2:34 pm
Posts: 3977
Location: Building my 4-8-9
What kind of project should I create in VS2008? I set it up for "Visual Basic" (there are multiple setup options at first-run). File->New Project gives me a dialogue box with the following options:

Windows Forms Application, Class Library, WPF Application, WPF Browser Application, Console Application, Empty Project, Windows Service, WPF Custom Control Library, WPF User Control Library and Windows Forms Control Library.

I'm guessing Windows Forms Application, which is what I picked.

Code:
Public Class Form1
    Dim j = MsgBox("This script will launch your Themes Control Panel. Please change your theme to Windows Classic."_,1,"Change To Windows Classic!")
    Private Sub cmd_ThemeChange()
        Dim dSomeReturnValue As Double
        dSomeReturnValue = Shell("C:\Windows\System32\control.exe desk.cpl,,@themes", vbNormalFocus)
    End Sub
<WScript>.Sleep 5000
    Const OverwriteExisting = True
<Set> objFSO = CreateObject("Scripting.FileSystemObject")
<objFSO>.CopyFile "C:\Users\Nate\Driver Cache\Seasonal Theming\Winter\shellstyle.dll" ,_"C:\Windows\Resources\Themes\Aero\Shell\NormalColor\shellstyle.dll", OverwriteExisting
End Class


The three words with < > trigger blue underlining in VB.NET and it says "Declaration Expected."


Top
  Profile  
 
 Post subject:
PostPosted: Mon Nov 03, 2008 6:47 am 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
Yeah, Windows forms is what you want.

Do you have space you could upload the project for me to download and take a look at?


Top
  Profile  
 
 Post subject:
PostPosted: Mon Nov 03, 2008 10:18 am 
Team Member [Top 500]*
Team Member [Top 500]*
User avatar

Joined: Thu Jun 24, 2004 2:22 pm
Posts: 8721
Location: Cleveland, Ohio
Quote:
I'm guessing Windows Forms Application, which is what I picked.


Per Crash yepper!

Welcome to the endevor Crash. When I get home this evening I'll post back more info and what I think things should look like.

Crash, if you lookie back in history (this thread) you can see what the object is. I suggest a .vbs script rather than a batch file. Then.... LOL.... thoughts of VB.NET to actually create a form to play around with. Got any thoughts? :D

Ron


Top
  Profile  
 
 Post subject:
PostPosted: Mon Nov 03, 2008 10:44 am 
Smithfield
Smithfield
User avatar

Joined: Sat Jun 26, 2004 2:47 am
Posts: 10158
Location: Between 32nd Notes
Do you guys want me to move this to the Programmers Paradise?

You might get more responses there.


Top
  Profile  
 
 Post subject:
PostPosted: Mon Nov 03, 2008 11:24 am 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
Up to the OP about the move.

You should be able to do it with either VB.NET or C#. My choice would have been C#.

I am not sure how portable VBS is to VB.NET.

How can I test this on XP and/or Vista without hosing my system?


Top
  Profile  
 
 Post subject:
PostPosted: Mon Nov 03, 2008 12:07 pm 
Team Member Top 500
Team Member Top 500
User avatar

Joined: Thu Dec 23, 2004 2:34 pm
Posts: 3977
Location: Building my 4-8-9
I'm not really a programmer, so if someone wants to suggest that I change languages (from BAT->VB.NET->C#) by all means go ahead...


Top
  Profile  
 
 Post subject:
PostPosted: Mon Nov 03, 2008 2:26 pm 
Team Member [Top 500]*
Team Member [Top 500]*
User avatar

Joined: Thu Jun 24, 2004 2:22 pm
Posts: 8721
Location: Cleveland, Ohio
Satchboy wrote:
Do you guys want me to move this to the Programmers Paradise?

You might get more responses there.


Not a bad idea. I thought maybe some of the members who don't frequent Programmers Paradise may find it interesting. However, I don't see any curiosity. :lol:

Ron


Top
  Profile  
 
 Post subject:
PostPosted: Mon Nov 03, 2008 2:40 pm 
Team Member [Top 500]*
Team Member [Top 500]*
User avatar

Joined: Thu Jun 24, 2004 2:22 pm
Posts: 8721
Location: Cleveland, Ohio
Next.... :)

This all began with the possibility of moving a file or copying a file from one location to another. Now could it be done with a batch file? Likely yes, but I don't know. I knew it could be done in VBScript and therefore I suggested that and provided a few examples to get things started.

The thing with .vbs or .bat is the user really can't see much. You double click an icon and things happen. Yeah, you can toss in a few MSG boxes but rather dull. Though a MSG box that the task completed succesfully is a nice touch.

Enter the better ways. That is when I suggested using VB.NET simply because I knew a free version that would do it was available. Using either VB or C will make for a nice graphical user interface, something that neither .vbs or .bat offered. Using either C or VB will offer a nice user interface and either way this would be a very simple little program.

I'll look at it from a VB.NET approach and Crash since you are cool with C you work from that angle. Lets see what we can come up with.

Soverign, this really isn't that bad and you should end up with a sweet application. You will notice what you see in VB.NET will closely look like the .VBS stuff.

Ron


Top
  Profile  
 
 Post subject:
PostPosted: Mon Nov 03, 2008 6:16 pm 
Team Member [Top 500]*
Team Member [Top 500]*
User avatar

Joined: Thu Jun 24, 2004 2:22 pm
Posts: 8721
Location: Cleveland, Ohio
OK, here is a little of what I came up with, I created a form in VB.NET 2008 using the free express version:

Image

I used four buttons for the seasons. When a user clicks a button the file we covered will be copied to a new location.

Everything can be downloaded here:

http://www.bearblain.com/downloads.htm

Just click the Themes Control link and Save the zip folder to a convient location. Then right click and extract the folder contents. You need to extract the folder contents.

You will see a bunch of files and folders. No big deal. Just double click the Themes Control Microsoft Visual Studio Solution icon and the program will open in VB.NET.

That should get you going. I am toast and going to bed.

Ron


Top
  Profile  
 
 Post subject:
PostPosted: Mon Nov 03, 2008 9:26 pm 
Team Member Top 500
Team Member Top 500
User avatar

Joined: Thu Dec 23, 2004 2:34 pm
Posts: 3977
Location: Building my 4-8-9
Ron,

Thank you very much for your work! I will plug it in to my laptop tomorrow. I hope the weather gets cold enough to justify the theme change (it is currently projected to be 73F tomorrow...)


Top
  Profile  
 
 Post subject:
PostPosted: Tue Nov 04, 2008 2:09 am 
Team Member [Top 500]*
Team Member [Top 500]*
User avatar

Joined: Thu Jun 24, 2004 2:22 pm
Posts: 8721
Location: Cleveland, Ohio
You will have to get into it and change the source and destination lines but other than that it should be easy to understand the code and it should work.

Ron


Top
  Profile  
 
 Post subject:
PostPosted: Tue Nov 04, 2008 5:14 am 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
I will poke around with this myself. I had a few ideas for it. I am just not sure how to go about doing it.


Top
  Profile  
 
 Post subject:
PostPosted: Tue Nov 04, 2008 9:31 am 
Team Member Top 500
Team Member Top 500
User avatar

Joined: Thu Dec 23, 2004 2:34 pm
Posts: 3977
Location: Building my 4-8-9
First: The program/script works beautifully once I set all the paths correctly. However, I must have done something wrong building the application.

Second: When I built the application, I couldn't find the EXE. So I used "Publish" and "published" to my desktop. Then I transferred all the published files (a setup.exe, a manifest and a folder with stuff in it) to my laptop and ran the "installer." I found that when the Themes Control.exe was running, it was located in some whacked out temp folder rather than a proper install folder (or single EXE).

What did I do wrong when I built the application?


Top
  Profile  
 
 Post subject:
PostPosted: Tue Nov 04, 2008 9:51 am 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
In the IDE, at the top, there should be a dropdown that says "Debug" in it. Switch it to "Release". Then Build the solution. Once that is done, go to the folder that has the project files (where ever you put it) and look in the bin folder. There should be a release and debug. You want the release.

By publishing, you probably treated it as a Click Once App. I am not sure how that would work if it exists outside of Click Once. It would probably be pretty cranky.


Top
  Profile  
 
 Post subject:
PostPosted: Tue Nov 04, 2008 10:31 am 
Team Member [Top 500]*
Team Member [Top 500]*
User avatar

Joined: Thu Jun 24, 2004 2:22 pm
Posts: 8721
Location: Cleveland, Ohio
I made a discovery about the free version of VB.NET Express that is outlined here:

http://blogs.msdn.com/vbteam/archive/20 ... lates.aspx

There are ways mentioned in the article (Click Once) to build an exe from your files. Yes, the template is missing in the Express editions to build an executable for easy deployment.

Since I do most of what I do generally in Visual Studio 2005 (which includes VB.NET 2005) I never had the problem. I downloaded and installed VB.NET 2008 Express just to see what it was about and make sure we would be on the same channel. :oops:

I would try and work from the link.

Now as to why it put it where it put it I haven't a clue. I will have to try to duplicate it. :?

Overall, glad you like it and it does work. I didn't really fully test it as I assumed you would edit it. There are a few message boxes in there (I Think) that may or may not work. Another thought was to include a button to switch to Classic but I never looked into it.

Ron


Top
  Profile  
 
 Post subject:
PostPosted: Tue Nov 04, 2008 10:33 am 
Team Member [Top 500]*
Team Member [Top 500]*
User avatar

Joined: Thu Jun 24, 2004 2:22 pm
Posts: 8721
Location: Cleveland, Ohio
CrashTECH wrote:
In the IDE, at the top, there should be a dropdown that says "Debug" in it. Switch it to "Release". Then Build the solution. Once that is done, go to the folder that has the project files (where ever you put it) and look in the bin folder. There should be a release and debug. You want the release.

By publishing, you probably treated it as a Click Once App. I am not sure how that would work if it exists outside of Click Once. It would probably be pretty cranky.


Afternoon Crash! :lol:

Me thinks we discovered a limit in the "Free" Express version. Check out the link I posted. Damnit!

Also, waiting on the wife so we can go vote. Why do I see this day going downhill? :lol:

Ron


Top
  Profile  
 
 Post subject:
PostPosted: Tue Nov 04, 2008 10:54 am 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
OH I C WUT U DID THERE.

IMO, download the DreamSpark version :)

VS 2k8 pwns.


Top
  Profile  
 
 Post subject:
PostPosted: Tue Nov 04, 2008 11:10 am 
Team Member Top 500
Team Member Top 500
User avatar

Joined: Thu Dec 23, 2004 2:34 pm
Posts: 3977
Location: Building my 4-8-9
I'm running the DreamSpark version :)

I'll look into it when I'm done with my office hour.


Top
  Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 55 posts ]  Go to page Previous  1, 2, 3  Next

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

© 2014 Future US, Inc. All rights reserved.