Click here to Skip to main content
15,920,031 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Generalconnecting via LAN Pin
revath8-Feb-08 20:43
revath8-Feb-08 20:43 
GeneralRe: connecting via LAN Pin
nishkarsh_k8-Feb-08 22:52
nishkarsh_k8-Feb-08 22:52 
GeneralRe: connecting via LAN Pin
Dave Kreskowiak11-Feb-08 4:09
mveDave Kreskowiak11-Feb-08 4:09 
GeneralOpening x64 registry using a 32-bit program Pin
Techguy8-Feb-08 20:03
Techguy8-Feb-08 20:03 
GeneralRe: Opening x64 registry using a 32-bit program Pin
Techguy10-Feb-08 15:12
Techguy10-Feb-08 15:12 
GeneralRe: Opening x64 registry using a 32-bit program Pin
Dave Kreskowiak11-Feb-08 4:07
mveDave Kreskowiak11-Feb-08 4:07 
GeneralRe: Opening x64 registry using a 32-bit program Pin
Techguy11-Feb-08 11:05
Techguy11-Feb-08 11:05 
GeneralAuto-Click on run Pin
Prower8-Feb-08 16:52
Prower8-Feb-08 16:52 
Hello everyone and thanks for looking, my group and I have been working on a project at school for our senior project and we have run into a little snag.

We have a program in VB.net designed to connect using USB communication to a development board to interface with a microcontroller, the program is successful and we have only one last problem to solve.

When the program first starts up we would like it to automatically run a command within the program, specifically this button:

Private Sub cmdConnect_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdConnect.Click

OpenMPUSBDevice()
If myOutPipe <> INVALID_HANDLE_VALUE Then
Timer1.Enabled = True
End If

End Sub

Basically what we would like to happen is that once the program is first run this button "auto-clicks" itself to automatically connect through USB to our development board then could be used later for reconnect if possible. We tried to encapsulate it into a simple while loop but the button needs to be clicked prior to entering.

I tried implementing something like this:

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

cmdConnect.PerformClick()

End Sub

But ended up receiving this error:

------------------------------------------------------------------------
Microsoft Development Environment

An unhandled exception of type 'System.Security.SecurityException' occured in USBAuto.exe

Additional information: System.Security.Permissions.SecurityPermission
------------------------------------------------------------------------

Where in the program the command: OpenMPUSBDevice() was highlighted

I’m sorry if I’m asking a really easy/hard question as programming is not my specialty, hardware person myself, any help would be greatly appreciated,

-Prower
GeneralRe: Auto-Click on run Pin
nishkarsh_k8-Feb-08 18:03
nishkarsh_k8-Feb-08 18:03 
GeneralRe: Auto-Click on run [modified] Pin
Prower9-Feb-08 12:12
Prower9-Feb-08 12:12 
GeneralRe: Auto-Click on run Pin
Dave Kreskowiak11-Feb-08 3:59
mveDave Kreskowiak11-Feb-08 3:59 
Generaldatagrid as a data entry Pin
alzaabi20xx8-Feb-08 11:59
alzaabi20xx8-Feb-08 11:59 
GeneralRe: datagrid as a data entry Pin
pmarfleet8-Feb-08 13:22
pmarfleet8-Feb-08 13:22 
GeneralRe: datagrid as a data entry Pin
Vimalsoft(Pty) Ltd11-Feb-08 3:45
professionalVimalsoft(Pty) Ltd11-Feb-08 3:45 
Generalacting on non windows appliction from vb application. Pin
karl kruse8-Feb-08 8:01
karl kruse8-Feb-08 8:01 
GeneralRe: acting on non windows appliction from vb application. Pin
pmarfleet8-Feb-08 8:51
pmarfleet8-Feb-08 8:51 
QuestionHow can i get a table in richtextbox Pin
massaslayer8-Feb-08 7:10
massaslayer8-Feb-08 7:10 
GeneralHTML tables equivalent in windows form Pin
keniagm8-Feb-08 5:58
keniagm8-Feb-08 5:58 
GeneralSaving Images to SQL 05' DB Table Pin
Joey Picerno8-Feb-08 5:05
Joey Picerno8-Feb-08 5:05 
GeneralRe: Saving Images to SQL 05' DB Table Pin
pmarfleet8-Feb-08 13:19
pmarfleet8-Feb-08 13:19 
GeneralRe: Saving Images to SQL 05' DB Table Pin
nishkarsh_k8-Feb-08 16:12
nishkarsh_k8-Feb-08 16:12 
GeneralCombo box event firing on form close... but why? [modified] Pin
Payrok8-Feb-08 4:32
Payrok8-Feb-08 4:32 
GeneralRe: Combo box event firing on form close... but why? Pin
Thomas Stockwell8-Feb-08 7:38
professionalThomas Stockwell8-Feb-08 7:38 
GeneralRe: Combo box event firing on form close... but why? Pin
Payrok8-Feb-08 8:57
Payrok8-Feb-08 8:57 
QuestionHow do i get the coordinates of selected text in a webbrowser control? Pin
Ahmad Zaidi8-Feb-08 4:12
Ahmad Zaidi8-Feb-08 4:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.