Here is a code snippet used to center a form on the screen.
Private Sub Form_Load()
‘ Centering the form on the screen
Me.Move (Screen.Width – Me.Width) \ 2, (Screen.Height – Me.Height) \ 2
End Sub
Principal Software Engineer/Architect, motorcyclist, drummer, and artist
Here is a code snippet used to center a form on the screen.
Private Sub Form_Load()
‘ Centering the form on the screen
Me.Move (Screen.Width – Me.Width) \ 2, (Screen.Height – Me.Height) \ 2
End Sub
The following VB6 code will open an external file with it’s associated application. This assumes that there is an application on the system that is already associated with a specific executable.
Under your General Declarations:
‘ Runs an external file/launches it’s associated app
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
On whatever Form/Button/Event
Dim FileName As String
FileName = "C:\path\to\some\file.pdf"
ShellExecute 0&, "open", FileName, "", "", vbNormalFocus
Here is a quick tutorial on how to create MovieClips that act like buttons using ActionScript 2.0. Attached is a sample .fla file with a complete, working example.
Recently, I have gotten back into roadracing motorcycles after a 7 year hiatus (here are some photos that Yermo took this past weekend, 2008-09-20). Before the weekend, I had to get some minor repairs done to my leathers. I called and talked to Connie at Vanson (the company that made the leathers) and they asked me the last time that I’d given them a cleaning. I had to admit that it had been quite a long time. A full-on “proper” cleaning is moderately involved and can take some time, of which most racers don’t have a lot of. Connie said that a quick and easy thing to do was to hit them with any furniture polish and a soft rag. She went on to say that because it was so quick and easy to do that the benefit of the quick cleaning a few times a season was far better than doing nothing at all.
That got me thinking about small businesses and websites, and that the same axiom applies. You are far better coming up with a strategy to make regular, even minor, updates to your site than doing nothing at all.
As I have mentioned in previous articles, your website should become a valuable resource to people who are looking for information about your product or service.
The best way to further that goal is to just fill it with content. Unfortunately, most small businesses that I know just don’t have the time to spend weeks or months when they redesign, or redevelop their site to write content. Moreover, many of them do not have their website set up with a CMS (Content Management System) that enables them to easily make updates and changes without having to know how to write HTML/CSS/server-side code, navigate FTP programs, and get everything working properly with their hosting environment. The typical result is that because it is so time consuming that the website is never updated.
The solution: get your small business website set-up so that you can use one of the many CMSs out there and come up with a plan whereby you can set aside 20 – 30 minutes a couple of times a month to add a few things to your site. Like cleaning my leathers with furniture polish vs. the full-on “proper” cleaning, it’s far better than doing nothing at all.
In the case of your website, it will continue to grow on a regular incremental basis that fits into your schedule and will hopefully increase your search engine ranking, your relevant traffic, and ultimately your bottom line.
— Ryan Chapin
President, Nuts & Bolts Interactive, Inc.
I am just as much progressive as everyone of the hard-working people at MoveOn.org and am doing what I can to help elect Obama.
However, I think that MoveOn might make a bigger impact if you learned from the masters, and by that I mean the Republicans.
I’ve seen a number of recent e-mails lamenting the horrible ads and slander of the McCain campaign that beg the membership to donate so that the truth can be told.
With all due respect, you guys just don’t get it. It is much easier to sew doubt that convince someone of something. As a result, your efforts would be much better spent generating media that generated doubt about him.
Something like this video ad:
Sinister, or perhaps old-timey music fades in (I’d have to think about the music some more)
McCain video with him saying that the economy is sound and strong, with date in bottom – left.
fade to:
McCain video that shows him admitting he doesn’t understand the economy, dated
fade to:
Stuttering video of him being clueless about how many houses he owns, dated
fade to:
Video of him saying that the economy is having a hard time, dated
fade to some horrible press photo of him looking clueless on one side, with a montage of people who are bumming that fade in and fade out on the other side.
Voice-Over:
Does McCain really have a handle on the economy? Can a man who doesn’t even know how many houses he ownes have any idea of what you are experiencing in these troubled times? Do we want to give the Republicans four more years?
Voila! Doubt! Not lies, just using the rich fodder that McCain has practically given us on a silver platter.
Unfortunately, we live in an era where truth and issues have been replaced with spin and attack ads, and if we (meaning all progressives) don’t catch a clue fast, we are going to lose yet another election (and we can kiss the supreme court goodbye).
When I was a little boy, I got beat up on the playground at school almost everday. I tried talking to the bullies, tried hiding from the bullies, tried everything I could. I didn’t get left alone until I broke one of there noses. Know why? Because that’s all they understood. It wasn’t their fault, I didn’t want to do it, but they gave me no choice.
The progressive movement in this country is in the same position. If we don’t take the gloves off and start bloodying some noses, we are all sunk.
Nobody keeps the same website forever. Websites get redesigned and on a regular basis. Websites also need their content updated or reorganized to keep up with a growing business or organization.
When you change the structure of your site (move pages, rename them, or delete them altogether) you could be losing valuable traffic and costing your business or organization signups, purchases, or more.
One of the primary ways that a site generates traffic is from people clicking on links to it from search engines, other websites, or e-mails. The search engine part is obvious. Links from other sites could come from your website being listed on someone else’s site, or links posted on blogs and forums. Links in e-mails are simply that, a link to some page on your site, sent to someone in a e-mail.
A link is simply the address, or URL (Uniform Resource Locator), of a given page or website. In this case we are talking about links to specific pages on your site.
The reason why rearranging the structure of your site could cost you traffic is because there are very likely many different links to specific pages on your site posted on other websites. Moreover, all of the search engines have those specific pages categorized in their databases.
For example: let’s say that your about us page’s URL is http://somedomain.com/about.htm and during a redesign it is changed to http://somedomain.com/company/about_us.html to make it a sub-page of a new "Company" page. Now that you’ve made that change, all of those links to http://somedomain.com/about.htm on other sites, search engines, and e-mail no longer work. Visitors will get a 404 (file not found) error, and you will likely lose any search engine ranking that you had with the content on that page.
This can cost you big time!
That’s not to say that you can’t reorganize and revamp the structure of your site, you just have to do so intelligently.
There are two ways to go about it:
So, when you decide to do some clean-up and re-organizing on your site, just make sure you take a few minutes to note the existing URLs of your pages so you can set up any redirects and this will keep you from losing valuable traffic to your site.
— Ryan Chapin
President, Nuts & Bolts Interactive, Inc.
The following is a quick tutorial on how to create a hybrid CD under Mac OS X.
Using Toast, you can fairly easily create a hybrid CD with which the Mac OS will only see Mac specific files and the PC OS will only see the PC specific files. This preserves the Mac resource fork and icon data as well as the PC icon data.
Macromedia Studio 8 shipped with Macromedia FlashPaper 2.0, a pretty cool app that will take PDF and other documents and convert them into .swf files that you can load into other flash/swf applications.
The following is a quick tutorial on how to load FlashPaper swf files into Flash applications in ActionScript 2.0.
This tutorial assumes that you know the basics of FlashPaper 2.0 and have a usable FlashPaper .swf file.
Essentially, you will include an ActionScript file that will provide the functions to allow you to load in and scale the FlashPaper .swf and then include a few configurations and lines of code to load in the FlashPaper .swf.
First, create a new ActionScript file, save as "flashpaper.loader.as" and copy and paste the following code into it:
function loadFlashPaperSWF( arg_flashPaper_conf:Object ):Void{
trace( "\nFrom loadFlashPaperSWF" );
trace( "arg_flashPaper_conf.flashPaper_SWF " + arg_flashPaper_conf.flashPaper_SWF );
// Creating the MovieClip into which we’ll load our Flash Paper document.
this.createEmptyMovieClip( "testMovie_mc", this.getNextHighestDepth() );
// callback functions for this clip
var mcObjListener = new Object();
mcObjListener.onLoadComplete = function(){
testMovie_mc._visible = false;
}
mcObjListener.onLoadInit = function( arg_target:MovieClip ):Void{
trace( "running the onLoadInit callback" );
trace( "arg_target = " + arg_target );
// We’ll have to wait until the first page of the flash paper document has loaded
// before we have access to the FlashPaper API
// To do so, we’ll set up an interval that will check for it’s existence.
// Then run the setSize method
var var_intervalID = 0;
// Our check function
function checkFlashPaperLoaded(){
// Hide the holder clip until it is loaded
// eval( arg_target )._visible = false;
// Getting a reference to our FlashPaper object
var var_flashPaperObj = eval( arg_target ).getIFlashPaper();
trace( "var_flashPaperObj = " + var_flashPaperObj );
if( !var_flashPaperObj ){
return;
}
else{
trace( "We now have access to our FlashPaper API" );
clearInterval( var_intervalID );
// Resize the doc to fit the size of the stage
var_flashPaperObj.setSize( arg_flashPaper_conf.flashPaper_width,
arg_flashPaper_conf.flashPaper_height );
// Setting the document to fit to height:
// var_flashPaperObj.setCurrentZoom( "page" );
// Show it
eval( arg_target )._visible = true;
}
}
var_intervalID = setInterval(checkFlashPaperLoaded, 100);
};
// Here we create a new MovieClipLoader Object
var var_movieClipLoader = new MovieClipLoader();
// Here we add the listener to our new MovieClipLoader Object
var_movieClipLoader.addListener( mcObjListener );
// Now we use our new MovieClipLoader object to load the swf into the movieclip holder
var_movieClipLoader.loadClip( arg_flashPaper_conf.flashPaper_SWF, "testMovie_mc" );
}
// ============================================================================
// Configurations:
//
// Our config object
var obj_flashPaper_conf:Object = new Object();
// The flash paper swf to load:
obj_flashPaper_conf.flashPaper_SWF = "files/flashpaper_docs/flashpaper.swf";
// The width and height of our flashpaper doc
obj_flashPaper_conf.flashPaper_width = 650;
obj_flashPaper_conf.flashPaper_height = 320;
// ============================================================================
// Loading our Flash Paper SWF
loadFlashPaperSWF( obj_flashPaper_conf );
That’s not to say that the proper care and feeding of a domain is overly complex. But before we get into the those details let’s go over some core domain related terminology:
With that in mind, let’s take a look at the three most important aspects of domain name ownership and maintenance:
To do a lookup on your domain, click here and enter your domain name.
Double-check the Registrant (the organization listed as the owner, which is different from the registrar) and Expiration Date. If you do not have your login information for your domain, and you are listed as the registrant, give the registrar a call and they can usually reset your password.
If it is going to expire soon, make sure to renew it right away.
If your domain’s Registrant is as an organization other than yourself and that organization isn’t a current, trusted, service provider, get in touch with an Internet technology professional who can help you gain direct ownership of the domain.
If you have any questions or ever need any help with your domain, feel free to send me an e-mail.
Ryan Chapin
President, Nuts & Bolts Interactive, Inc.