Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Vb Form Size and database backup

Posted on 2003-11-27
9
Medium Priority
?
251 Views
Last Modified: 2010-04-17
Hi All,
  i developed one application in VB6.0. I want to know how to adjust Display resolution as i developed my application in 1024 * 768 pixels. as when i run my application in 800 *  600 pixels  the form size gets increase (or going out of display) .. How to adjust the size of form automatically ?
 Also, how to take compress backup of MS-Access Database using VB Application.

thaks in advance
0
Comment
Question by:Piter
9 Comments
 
LVL 48

Expert Comment

by:AlexFM
ID: 9830940
Compressing of Access Database:

' Compact and repair database
' Function uses DAO 3.6 Library which works with Access 2000 database format
'
' Function writes result to sDestName file.
' Caller must ensure that sDestName doesn't exist before call to this function.
' If function finished successfully, caller may copy
' compacted database sDestName to source database sDBName
Public Function CompactAndRepairDatabase(ByVal sDBName As String, ByVal sDestName As String) as Boolean
    On Error GoTo errorHandler

    DBEngine.CompactDatabase sDBName, sDestName
    CompactAndRepairDatabase = True
   
    Exit Function

errorHandler:
   MsgBox Err.Description
    CompactAndRepairDatabase = False
End Function
0
 
LVL 48

Expert Comment

by:AlexFM
ID: 9831762
This code sets form size to screen size:

Private Sub Form_Load()
    Me.Width = Screen.Width
    Me.Height = Screen.Height
    Me.Left = 0
    Me.Top = 0
End Sub
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 9834008
As a help in the future.  You should develop your forms in the lowest resolution yours users will use.

mlmcc
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 1

Author Comment

by:Piter
ID: 9841344

 I forget to tell that i am using ADO database..
 ab form resize.. i think Mr. mlmcc give a good suggession.. i will think ab that next time...  anyway.. tell  me about compressing Access database (MS-ACCESS and using ADO)

thks for reply


 
0
 
LVL 48

Accepted Solution

by:
AlexFM earned 252 total points
ID: 9841365
It's impossible. I work with Access using ADO too, but use DAO for compressing.
0
 
LVL 15

Assisted Solution

by:Ralf Klatt
Ralf Klatt earned 248 total points
ID: 9846803
Hi,

Watch this:
http://www.phpbuilder.com/lists/php-db/2003092/0027.php

For the screen resolution I suggest:
http://www.mvps.org/vbnet/index.html?code/enums/enumdisplaychange.htm

With these two urls you should be able to solve both of your problems.

By the way why didn't you make to postings for two different problems?

Best regards, Raisor
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
Make the most of your online learning experience.
Loops Section Overview
Screencast - Getting to Know the Pipeline

886 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question