Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. my program running on background makes my current open application in desktop to blink blink such excel , google, outlook etc.

my program running on background makes my current open application in desktop to blink blink such excel , google, outlook etc.

Scheduled Pinned Locked Moved Visual Basic
sysadmincsharpmysqlquestion
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    User 12776818
    wrote on last edited by
    #1

    Hi All, I create a program that runs on backgound using VB.NET minicap.exe with CMD as process. Inside the code is module and SUB_MAIN with system timers. It works fine except i notice that when my program runs on background as process? The other application on desktop is BLINKING intermittently. the system timer is set to 2sec upto 10seconds. heres my code below. The main purpose of my program is to capture screenshot of desktop and save to network drive using MINICAP.EXE and CMD and SYSTEM TIMERS.

    Imports System.Timers
    Imports Microsoft.Win32
    Imports MySql.Data.MySqlClient

    Module Module1
    Private myTimer1 As Timer
    Private myTimer2 As Timer
    Private myTimer3 As Timer
    Private WithEvents MyProcess As Process
    Private Delegate Sub AppendOutputTextDelegate(ByVal text As String)

    Sub main()
    
    
        DBconnection()
    
        Dim uname As String
        Dim mname As String
        Dim Yourpath As String
    
    
        uname = Environment.UserName
        mname = Environment.MachineName
    
        Try
            Dim squery As String = "Select \* from tbl\_settings WHERE Computer = '" & mname & "'"
            Dim sadapter As New MySqlDataAdapter
            Dim scommand As New MySqlCommand
            Dim sqltable As New DataTable
            Dim i As Integer
            Dim PAT
            Dim STAT
            Dim INTR
            Dim COMPR
            Dim x As Integer
            With scommand
                .CommandText = squery
                .Connection = myconnection
            End With
            With sadapter
                .SelectCommand = scommand
                .Fill(sqltable)
            End With
    
            x = sqltable.Rows.Count
            STAT = IIf(sqltable.Rows(i)("Status") IsNot DBNull.Value, sqltable.Rows(i)("Status"), vbNullChar)
            If STAT = "ON" Then
    
    
                COMPR = IIf(sqltable.Rows(i)("Compression") IsNot DBNull.Value, sqltable.Rows(i)("Compression"), vbNullChar)
                INTR = IIf(sqltable.Rows(i)("Interval") IsNot DBNull.Value, sqltable.Rows(i)("Interval"), vbNullChar)
                PAT = IIf(sqltable.Rows(i)("server\_path") IsNot DBNull.Value, sqltable.Rows(i)("server\_path"), vbNullChar)
    
    
                'InputTextBox.Text = "minicap.exe -capturedesktop -stderr -noerr -cursor -compress" & " " & CAP & " " & "-exit -save" & " " & PAT
    
    
                Yourpath = PAT & "\\" & Format(Now, "MM-d-yyyy") & "\\" & mname & "\\" & uname
                If (Not System.IO.Direc
    
    L 2 Replies Last reply
    0
    • U User 12776818

      Hi All, I create a program that runs on backgound using VB.NET minicap.exe with CMD as process. Inside the code is module and SUB_MAIN with system timers. It works fine except i notice that when my program runs on background as process? The other application on desktop is BLINKING intermittently. the system timer is set to 2sec upto 10seconds. heres my code below. The main purpose of my program is to capture screenshot of desktop and save to network drive using MINICAP.EXE and CMD and SYSTEM TIMERS.

      Imports System.Timers
      Imports Microsoft.Win32
      Imports MySql.Data.MySqlClient

      Module Module1
      Private myTimer1 As Timer
      Private myTimer2 As Timer
      Private myTimer3 As Timer
      Private WithEvents MyProcess As Process
      Private Delegate Sub AppendOutputTextDelegate(ByVal text As String)

      Sub main()
      
      
          DBconnection()
      
          Dim uname As String
          Dim mname As String
          Dim Yourpath As String
      
      
          uname = Environment.UserName
          mname = Environment.MachineName
      
          Try
              Dim squery As String = "Select \* from tbl\_settings WHERE Computer = '" & mname & "'"
              Dim sadapter As New MySqlDataAdapter
              Dim scommand As New MySqlCommand
              Dim sqltable As New DataTable
              Dim i As Integer
              Dim PAT
              Dim STAT
              Dim INTR
              Dim COMPR
              Dim x As Integer
              With scommand
                  .CommandText = squery
                  .Connection = myconnection
              End With
              With sadapter
                  .SelectCommand = scommand
                  .Fill(sqltable)
              End With
      
              x = sqltable.Rows.Count
              STAT = IIf(sqltable.Rows(i)("Status") IsNot DBNull.Value, sqltable.Rows(i)("Status"), vbNullChar)
              If STAT = "ON" Then
      
      
                  COMPR = IIf(sqltable.Rows(i)("Compression") IsNot DBNull.Value, sqltable.Rows(i)("Compression"), vbNullChar)
                  INTR = IIf(sqltable.Rows(i)("Interval") IsNot DBNull.Value, sqltable.Rows(i)("Interval"), vbNullChar)
                  PAT = IIf(sqltable.Rows(i)("server\_path") IsNot DBNull.Value, sqltable.Rows(i)("server\_path"), vbNullChar)
      
      
                  'InputTextBox.Text = "minicap.exe -capturedesktop -stderr -noerr -cursor -compress" & " " & CAP & " " & "-exit -save" & " " & PAT
      
      
                  Yourpath = PAT & "\\" & Format(Now, "MM-d-yyyy") & "\\" & mname & "\\" & uname
                  If (Not System.IO.Direc
      
      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      If you are capturing images of the screen at regular intervals then you must expect some disruption to the screen display.

      U 1 Reply Last reply
      0
      • L Lost User

        If you are capturing images of the screen at regular intervals then you must expect some disruption to the screen display.

        U Offline
        U Offline
        User 12776818
        wrote on last edited by
        #3

        I understand that loading of mouse cursor is normal every interval but interacting with other windows form or programs is not.

        1 Reply Last reply
        0
        • U User 12776818

          Hi All, I create a program that runs on backgound using VB.NET minicap.exe with CMD as process. Inside the code is module and SUB_MAIN with system timers. It works fine except i notice that when my program runs on background as process? The other application on desktop is BLINKING intermittently. the system timer is set to 2sec upto 10seconds. heres my code below. The main purpose of my program is to capture screenshot of desktop and save to network drive using MINICAP.EXE and CMD and SYSTEM TIMERS.

          Imports System.Timers
          Imports Microsoft.Win32
          Imports MySql.Data.MySqlClient

          Module Module1
          Private myTimer1 As Timer
          Private myTimer2 As Timer
          Private myTimer3 As Timer
          Private WithEvents MyProcess As Process
          Private Delegate Sub AppendOutputTextDelegate(ByVal text As String)

          Sub main()
          
          
              DBconnection()
          
              Dim uname As String
              Dim mname As String
              Dim Yourpath As String
          
          
              uname = Environment.UserName
              mname = Environment.MachineName
          
              Try
                  Dim squery As String = "Select \* from tbl\_settings WHERE Computer = '" & mname & "'"
                  Dim sadapter As New MySqlDataAdapter
                  Dim scommand As New MySqlCommand
                  Dim sqltable As New DataTable
                  Dim i As Integer
                  Dim PAT
                  Dim STAT
                  Dim INTR
                  Dim COMPR
                  Dim x As Integer
                  With scommand
                      .CommandText = squery
                      .Connection = myconnection
                  End With
                  With sadapter
                      .SelectCommand = scommand
                      .Fill(sqltable)
                  End With
          
                  x = sqltable.Rows.Count
                  STAT = IIf(sqltable.Rows(i)("Status") IsNot DBNull.Value, sqltable.Rows(i)("Status"), vbNullChar)
                  If STAT = "ON" Then
          
          
                      COMPR = IIf(sqltable.Rows(i)("Compression") IsNot DBNull.Value, sqltable.Rows(i)("Compression"), vbNullChar)
                      INTR = IIf(sqltable.Rows(i)("Interval") IsNot DBNull.Value, sqltable.Rows(i)("Interval"), vbNullChar)
                      PAT = IIf(sqltable.Rows(i)("server\_path") IsNot DBNull.Value, sqltable.Rows(i)("server\_path"), vbNullChar)
          
          
                      'InputTextBox.Text = "minicap.exe -capturedesktop -stderr -noerr -cursor -compress" & " " & CAP & " " & "-exit -save" & " " & PAT
          
          
                      Yourpath = PAT & "\\" & Format(Now, "MM-d-yyyy") & "\\" & mname & "\\" & uname
                      If (Not System.IO.Direc
          
          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          On a slower PC, the "blink" may become more visible; my PC isn't a very fast one, but running on a high resolution - you'd be saving a large blob every so often. So no, the spyware isn't going to work.

          Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^] "If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.

          U 1 Reply Last reply
          0
          • L Lost User

            On a slower PC, the "blink" may become more visible; my PC isn't a very fast one, but running on a high resolution - you'd be saving a large blob every so often. So no, the spyware isn't going to work.

            Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^] "If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.

            U Offline
            U Offline
            User 12776818
            wrote on last edited by
            #5

            I dont save it as blob. You can check the minicap.exe by donation coader. it saves directly to shared drive. loading of a mouse cursor if fine. but the main problem is the Windows form is intermittently loosing focus and focusing on minimized forms.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups