Mike’s Blog

Visual Basic Resize Objects

Filed under: Visual Basic by Mike just before lunchtime on Mon, May 2, 2005

I have found a need to resize certain objects in my Visual Basic apps. Because of this I have written a little chunk of code that will do just that to any Visual Basic 6.0 object that has height and width properties. Now the example here only resizes one object at a time but I also have code to resize multiple objects at once. Well it technically isn’t at once because the different objects will each take turns stepping, but it looks like it is at once. There is one hangup that I have with this code and that happens when you use it to shrink the form. If you attempt to shrink the form with another window open beneath it, the form will leave a trail. I have not figured out how to get around this yet other then just not doing it. In a future post I will include my code for resizing multiple objects at once. I still need to clean up my code and get rid of the useless stuff that I had added.

(Read on …)

Visual Basic 6, Drive Mappings and Windows Explorer

Filed under: Visual Basic by Mike just before lunchtime on Wed, Mar 30, 2005

I have created an app with VB6 for work that will launch a CADD application and set all of the necessary settings for a particular client. We have 7 offices and various people switch between offices daily. I have been trying to add the functionality to remap there drives so that they see the files from another office. Simple right? Well kind of, Writing the code to remap drives was reletively simple but there is one catch. In windows explorer looking at the drive description:

sharename on ’server’ (M:)

After remapping the drives the server name will not change, but the contents of that drive will display the correct server information. This is troubling. Even if you try to refresh, close explorer and reopen, or even curse at teh screen it will not change. To make things a little bit more confusing I have another app that only remaps drives and it works correctly. I used the same exact remapping code for both apps. I am sure there are not that many users who will catch onto this and realize that the two are not correct, but I would rather not take that chance.
If anybody out there has any idea as to what could be causing this or how I can go about fixing this please let me know.

(Read on …)