www.pudn.com > CalendarWapp.rar > Form1.frm


VERSION 5.00 
Begin VB.Form Form1  
   BorderStyle     =   1  'Fixed Single 
   Caption         =   "日历墙纸   http://www.mndsoft.com" 
   ClientHeight    =   5580 
   ClientLeft      =   45 
   ClientTop       =   330 
   ClientWidth     =   10890 
   LinkTopic       =   "Form1" 
   MaxButton       =   0   'False 
   MinButton       =   0   'False 
   ScaleHeight     =   5580 
   ScaleWidth      =   10890 
   StartUpPosition =   3  '窗口缺省 
   Begin VB.PictureBox picBlank  
      Appearance      =   0  'Flat 
      AutoRedraw      =   -1  'True 
      AutoSize        =   -1  'True 
      BackColor       =   &H00C0C0C0& 
      ForeColor       =   &H80000008& 
      Height          =   4500 
      Left            =   5370 
      Picture         =   "Form1.frx":0000 
      ScaleHeight     =   298 
      ScaleMode       =   3  'Pixel 
      ScaleWidth      =   400 
      TabIndex        =   3 
      Top             =   495 
      Visible         =   0   'False 
      Width           =   6030 
   End 
   Begin VB.Frame Frame1  
      Caption         =   "选项" 
      Height          =   3945 
      Left            =   120 
      TabIndex        =   2 
      Top             =   60 
      Width           =   4335 
      Begin VB.Frame Frame4  
         Caption         =   "位置:" 
         Height          =   1410 
         Left            =   180 
         TabIndex        =   12 
         Top             =   2430 
         Width           =   3960 
         Begin VB.PictureBox Picture1  
            BackColor       =   &H00808000& 
            Height          =   975 
            Left            =   1200 
            ScaleHeight     =   915 
            ScaleWidth      =   1155 
            TabIndex        =   13 
            Top             =   300 
            Width           =   1215 
            Begin VB.CommandButton Command1  
               Height          =   195 
               Index           =   8 
               Left            =   480 
               TabIndex        =   22 
               Top             =   360 
               Width           =   195 
            End 
            Begin VB.CommandButton Command1  
               Height          =   195 
               Index           =   7 
               Left            =   60 
               TabIndex        =   21 
               Top             =   360 
               Width           =   195 
            End 
            Begin VB.CommandButton Command1  
               Height          =   195 
               Index           =   6 
               Left            =   60 
               TabIndex        =   20 
               Top             =   660 
               Width           =   195 
            End 
            Begin VB.CommandButton Command1  
               Height          =   195 
               Index           =   5 
               Left            =   480 
               TabIndex        =   19 
               Top             =   660 
               Width           =   195 
            End 
            Begin VB.CommandButton Command1  
               Height          =   195 
               Index           =   4 
               Left            =   900 
               TabIndex        =   18 
               Top             =   660 
               Width           =   195 
            End 
            Begin VB.CommandButton Command1  
               Height          =   195 
               Index           =   3 
               Left            =   900 
               TabIndex        =   17 
               Top             =   360 
               Width           =   195 
            End 
            Begin VB.CommandButton Command1  
               Height          =   195 
               Index           =   2 
               Left            =   900 
               TabIndex        =   16 
               Top             =   60 
               Width           =   195 
            End 
            Begin VB.CommandButton Command1  
               Height          =   195 
               Index           =   1 
               Left            =   480 
               TabIndex        =   15 
               Top             =   60 
               Width           =   195 
            End 
            Begin VB.CommandButton Command1  
               Height          =   195 
               Index           =   9 
               Left            =   75 
               TabIndex        =   14 
               Top             =   60 
               Width           =   195 
            End 
            Begin VB.Shape Shape1  
               BorderColor     =   &H00FFFFFF& 
               Height          =   315 
               Left            =   420 
               Top             =   300 
               Visible         =   0   'False 
               Width           =   315 
            End 
         End 
      End 
      Begin VB.Frame Frame3  
         Caption         =   "字体" 
         Height          =   870 
         Left            =   180 
         TabIndex        =   9 
         Top             =   1440 
         Width           =   3975 
         Begin VB.ComboBox cboMFont  
            Height          =   315 
            Left            =   780 
            Style           =   2  'Dropdown List 
            TabIndex        =   10 
            Top             =   300 
            Width           =   2895 
         End 
         Begin VB.Label Label2  
            Caption         =   "字体" 
            Height          =   195 
            Left            =   240 
            TabIndex        =   11 
            Top             =   360 
            Width           =   435 
         End 
      End 
      Begin VB.Frame Frame2  
         Caption         =   "日期" 
         Height          =   1155 
         Left            =   180 
         TabIndex        =   4 
         Top             =   240 
         Width           =   3975 
         Begin VB.OptionButton optDate  
            Caption         =   "当前月份/年" 
            Height          =   195 
            Index           =   0 
            Left            =   180 
            TabIndex        =   8 
            Top             =   300 
            Value           =   -1  'True 
            Width           =   1935 
         End 
         Begin VB.OptionButton optDate  
            Caption         =   "自定义月份/年" 
            Height          =   195 
            Index           =   1 
            Left            =   195 
            TabIndex        =   7 
            Top             =   660 
            Width           =   1515 
         End 
         Begin VB.ComboBox cboMmm  
            Enabled         =   0   'False 
            Height          =   315 
            Left            =   1740 
            Style           =   2  'Dropdown List 
            TabIndex        =   6 
            Top             =   600 
            Width           =   975 
         End 
         Begin VB.ComboBox cboYYYY  
            Enabled         =   0   'False 
            Height          =   315 
            Left            =   2760 
            Style           =   2  'Dropdown List 
            TabIndex        =   5 
            Top             =   600 
            Width           =   975 
         End 
      End 
   End 
   Begin VB.CommandButton Command2  
      Caption         =   "生成(&M)" 
      Height          =   495 
      Left            =   8595 
      TabIndex        =   1 
      Top             =   4980 
      Width           =   1575 
   End 
   Begin VB.PictureBox picBuffer  
      Appearance      =   0  'Flat 
      AutoRedraw      =   -1  'True 
      AutoSize        =   -1  'True 
      BackColor       =   &H00C0C0C0& 
      ForeColor       =   &H80000008& 
      Height          =   4500 
      Left            =   4710 
      Picture         =   "Form1.frx":57522 
      ScaleHeight     =   298 
      ScaleMode       =   3  'Pixel 
      ScaleWidth      =   400 
      TabIndex        =   0 
      Top             =   90 
      Width           =   6030 
   End 
   Begin VB.Image Image1  
      Height          =   900 
      Left            =   780 
      Picture         =   "Form1.frx":AEA44 
      Top             =   4080 
      Width           =   2535 
   End 
End 
Attribute VB_Name = "Form1" 
Attribute VB_GlobalNameSpace = False 
Attribute VB_Creatable = False 
Attribute VB_PredeclaredId = True 
Attribute VB_Exposed = False 
'/**************************************************************************** 
' * Summary   : 日历墙纸生成程序 
' * Version   : 1.00 
' * Start Date: 2005-02-17 
' * My home   : http://www.mndsoft.com 
' * E-Mail    : Mnd@Mndsoft.Com 
' ****************************************************************************/ 
 
Option Explicit 
 
Private Sub Command1_Click(Index As Integer) 
    Shape1.Move Command1(Index).Left - 30, Command1(Index).Top - 30, Command1(Index).Width + 50, Command1(Index).Height + 50 
    If Shape1.Visible = False Then Shape1.Visible = True 
End Sub 
 
Private Sub Command2_Click() 
Dim Stamp As New clsCalendarStamp 
With Stamp 
    .Background = vbBlack 
    .BackgroundTrim = border 
     
    .TrimDepth = 1 
     
    .Left = 10 
    .Top = 10 
     
    .CalendarMonth = Month(Now) 
    .CalendarYear = Year(Now) 
     
    .TargetImage = picBuffer 
     
    .DayBold = True 
    .DayColor = RGB(220, 220, 220) 
    .DayFont = "Arial" 
    .DayFontSize = 12 
     
    .LabelBold = True 
    .LabelColor = RGB(255, 255, 220) 
    .LabelFont = "Arial" 
    .LabelFontSize = 12 
     
    .TitleBold = True 
    .TitleColor = RGB(230, 230, 255) 
    .TitleFont = "Arial" 
    .TitleFontSize = 24 
     
    .TodayColor = RGB(255, 130, 155) 
     
    .DrawCalendar 
End With 
 
End Sub 
 
 
Private Sub Form_Load() 
Dim x As Integer 
    For x = 1 To 12 
        cboMmm.AddItem Format(DateSerial(2005, x, 1), "Mmm") 
    Next 
    For x = 2005 To 2099 
        cboYYYY.AddItem x 
    Next 
     
    For x = 0 To Screen.FontCount 
        cboMFont.AddItem Screen.Fonts(x) 
    Next 
End Sub 
 
Private Sub optDate_Click(Index As Integer) 
    If Index = 1 Then 
        cboMmm.Enabled = True 
        cboYYYY.Enabled = True 
    Else 
        cboMmm.Enabled = False 
        cboYYYY.Enabled = False 
    End If 
End Sub