Solved

Vb Form Size and database backup

Posted on 2003-11-27
9
239 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
Comment Utility
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
Comment Utility
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 100

Expert Comment

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

mlmcc
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 1

Author Comment

by:Piter
Comment Utility

 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 63 total points
Comment Utility
It's impossible. I work with Access using ADO too, but use DAO for compressing.
0
 
LVL 15

Assisted Solution

by:Raisor
Raisor earned 62 total points
Comment Utility
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

Purpose To explain how to place a textual stamp on a PDF document.  This is commonly referred to as an annotation, or possibly a watermark, but a watermark is generally different in that it is somewhat translucent.  Watermark’s may be text or graph…
I know it’s not a new topic to discuss and it has lots of online contents already available over the net. But Then I thought it would be useful to this site’s visitors and can have online repository on vim most commonly used commands. This post h…
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

763 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now