Solved

Vb Form Size and database backup

Posted on 2003-11-27
9
241 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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
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 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…

803 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