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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Windows Forms
  4. how to cancel the event of MyBase.Deactivate in windows form?? [modified]

how to cancel the event of MyBase.Deactivate in windows form?? [modified]

Scheduled Pinned Locked Moved Windows Forms
winformshelpcsharpdatabasetutorial
1 Posts 1 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.
  • V Offline
    V Offline
    vbDiggerz
    wrote on last edited by
    #1

    Please help.. im having a difficulties to figure out this problem... Is it possible to cancel or not to invoke the MyBase.Deactivate in vb windows Forms?? I have an application which starts up after the windows environment load in XP... and my application will automatically loads up.. and i need to make it stay the form active and has focus on it under the desktop windows environment.. for the first load it has the focus and of course the active form.. but i dont know what's happening after when my win application load? it lost its focus and its title bar above becomes deactivated and lost focus or not to be active form.. may be because there is still some windows services are still loading by the OS?... correct me if im wrong... even though i've already removed all the auto-start up application in my pc except my application? so what i need is a code in my winform application to make it sure that when the deactivation event is trigger? then it will just trigger again some functions or event function to re-activate my win application and stay active inside the desktop environment... and ohhh.. reminders.. my application is accepting input from a barcode reader that's why i need to make it sure my application always got the focus.. because i assign a pc which has only one functionality, there's no other winforms application is running except my winforms, in such a reason... here's my sample code thats won't work enough... this code only just select the icon in the task bar but not to re-activate the whole winform and can accept input from the barcode reader.. ********************************* Private Sub MaskedTextBox1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles MaskedTextBox1.LostFocus Me.MaskedTextBox1.Focus() MaskedTextBox1.Select(0, Me.MaskedTextBox1.TextLength) 'Me.MaskedTextBox1.SelectAll() End Sub Private Sub frmTimeLogger_Deactivate(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Deactivate Try Me.Activate() Me.Focus() Me.MaskedTextBox1_LostFocus(sender,e) Catch ex As Exception MsgBox(ex.ToString()) End Try End Sub *************************************** please anybody who have an idea about this?? please help... thanks for kindness in advance... :)

    modified on Tuesday, March 4, 2008 1:17 AM

    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