Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Vb Form Size and database backup

Posted on 2003-11-27
9
Medium Priority
?
248 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Technology Partners: 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!

 
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

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The SignAloud Glove is capable of translating American Sign Language signs into text and audio.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Six Sigma Control Plans

722 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