Solved

Vb Form Size and database backup

Posted on 2003-11-27
9
240 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 100

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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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 63 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:Raisor
Raisor earned 62 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
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.
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…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

947 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

18 Experts available now in Live!

Get 1:1 Help Now