how to save any one form what i want?

image box , image processing , vb6 Sungai Ara, Malaysia
  • 10 years ago

    dear all

    the following is the code what i got it from the discussion forum,

    Option Explicit

    Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, _ ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)

    Private Const KEYEVENTF_KEYUP = &H2

    Private Function SaveFormPic() As Picture Dim pic As StdPicture Set pic = Clipboard.GetData(vbCFBitmap) keybdevent vbKeyMenu, 0, 0, 0 keybdevent vbKeySnapshot, 0, 0, 0 DoEvents keybdevent vbKeySnapshot, 0, KEYEVENTFKEYUP, 0 keybdevent vbKeyMenu, 0, KEYEVENTFKEYUP, 0 DoEvents Set SaveFormPic = Clipboard.GetData(vbCFBitmap) Clipboard.SetData pic, vbCFBitmap End Function

    Private Sub Command1_Click() SavePicture SaveFormPic, "C:\MyPic.jpg" 'picture location End Sub

    but i would like to save any one form, but it only save several forms together. how to save any one form what i want? thanks. urgent.

  • 10 years ago

    dear all

    the following is the code what i got it from the discussion forum,

    Option Explicit

    Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, _ ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)

    Private Const KEYEVENTF_KEYUP = &H2

    Private Function SaveFormPic() As Picture Dim pic As StdPicture Set pic = Clipboard.GetData(vbCFBitmap) keybdevent vbKeyMenu, 0, 0, 0 keybdevent vbKeySnapshot, 0, 0, 0 DoEvents keybdevent vbKeySnapshot, 0, KEYEVENTFKEYUP, 0 keybdevent vbKeyMenu, 0, KEYEVENTFKEYUP, 0 DoEvents Set SaveFormPic = Clipboard.GetData(vbCFBitmap) Clipboard.SetData pic, vbCFBitmap End Function

    Private Sub Command1_Click() SavePicture SaveFormPic, "C:\MyPic.jpg" 'picture location End Sub

    but i would like to save any one form, but it only save several forms together. how to save any one form what i want? thanks. urgent.

  • 10 years ago

    dear all

    the following is the code what i got it from the discussion forum,

    Option Explicit

    Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, _ ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)

    Private Const KEYEVENTF_KEYUP = &H2

    Private Function SaveFormPic() As Picture Dim pic As StdPicture Set pic = Clipboard.GetData(vbCFBitmap) keybdevent vbKeyMenu, 0, 0, 0 keybdevent vbKeySnapshot, 0, 0, 0 DoEvents keybdevent vbKeySnapshot, 0, KEYEVENTFKEYUP, 0 keybdevent vbKeyMenu, 0, KEYEVENTFKEYUP, 0 DoEvents Set SaveFormPic = Clipboard.GetData(vbCFBitmap) Clipboard.SetData pic, vbCFBitmap End Function

    Private Sub Command1_Click() SavePicture SaveFormPic, "C:\MyPic.jpg" 'picture location End Sub

    but i would like to save any one form, but it only save several forms together. how to save any one form automatically what i want? thanks. urgent.

  • 10 years ago
    dear all
    

    the following is the code what i got it from the discussion forum,

    Option Explicit

    Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, _ ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)

    Private Const KEYEVENTF_KEYUP = &H2

    Private Function SaveFormPic() As Picture Dim pic As StdPicture Set pic = Clipboard.GetData(vbCFBitmap) keybdevent vbKeyMenu, 0, 0, 0 keybdevent vbKeySnapshot, 0, 0, 0 DoEvents keybdevent vbKeySnapshot, 0, KEYEVENTFKEYUP, 0 keybdevent vbKeyMenu, 0, KEYEVENTFKEYUP, 0 DoEvents Set SaveFormPic = Clipboard.GetData(vbCFBitmap) Clipboard.SetData pic, vbCFBitmap End Function

    Private Sub Command1_Click() SavePicture SaveFormPic, "C:\MyPic.jpg" 'picture location End Sub

    but i would like to save any one form, but it only save several forms together. how to save any one form automatically what i want? i just call this function and save one form what i want. thanks. urgent.

  • 10 years ago

    the following is the code what i got it from the discussion forum,

     Option Explicit 
    
     Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, _ ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long) 
    
      Private KEYEVENTF_KEYUP = &H2 
    
    Private Function SaveFormPic() As Picture Dim pic As StdPicture Set pic = Clipboard.GetData(vbCFBitmap)    keybdevent vbKeyMenu, 0, 0, 0 keybdevent vbKeySnapshot, 0, 0, 0 DoEvents keybdevent vbKeySnapshot, 0, KEYEVENTFKEYUP, 0 keybdevent vbKeyMenu, 0, KEYEVENTFKEYUP, 0 DoEvents Set SaveFormPic = Clipboard.GetData(vbCFBitmap) Clipboard.SetData pic, vbCFBitmap 
    End Function 
    
    Private Sub Command1_Click() SavePicture SaveFormPic, "C:\MyPic.jpg" 'picture location 
    End Sub
    

    but i would like to save any one form, but it only save several forms together. how to save any one form automatically what i want? i just call this function and save one form what i want. thanks. urgent.

  • 10 years ago

    the following is the code what i got it from the discussion forum,

         Option Explicit 
    
         Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, _ ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long) 
    
          Private KEYEVENTF_KEYUP = &H2 
    
        Private Function SaveFormPic() As Picture 
    Dim pic As StdPicture 
    Set pic = Clipboard.GetData(vbCFBitmap)    
    keybdevent vbKeyMenu, 0, 0, 0 
    keybdevent vbKeySnapshot, 0, 0, 0 
    DoEvents 
    keybdevent vbKeySnapshot, 0, KEYEVENTFKEYUP, 0 
    keybdevent vbKeyMenu, 0, KEYEVENTFKEYUP, 0 
    DoEvents 
    Set SaveFormPic = Clipboard.GetData(vbCFBitmap) 
    Clipboard.SetData pic, vbCFBitmap 
        End Function 
    
        Private Sub Command1_Click() SavePicture 
    SaveFormPic, "C:\MyPic.jpg" 'picture location 
        End Sub
    

    but i would like to save any one form, but it only save several forms together. how to save any one form automatically what i want? i just call this function and save one form what i want. thanks. urgent.

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Nine people can't make a baby in a month.” - Fred Brooks