Click here to Skip to main content
15,867,308 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: Searching for a type in a solution Pin
Alex Korchemniy25-Oct-04 11:23
Alex Korchemniy25-Oct-04 11:23 
GeneralGroup box text will not display an Ampersand Pin
Tony D. Abel22-Oct-04 13:37
Tony D. Abel22-Oct-04 13:37 
GeneralRe: Group box text will not display an Ampersand Pin
Luis Alonso Ramos22-Oct-04 22:47
Luis Alonso Ramos22-Oct-04 22:47 
GeneralRe: Group box text will not display an Ampersand Pin
Anonymous23-Oct-04 2:43
Anonymous23-Oct-04 2:43 
GeneralUser Control Embedded in IE Pin
Anonymous22-Oct-04 3:50
Anonymous22-Oct-04 3:50 
GeneralRe: User Control Embedded in IE Pin
Frank Hileman25-Oct-04 5:44
Frank Hileman25-Oct-04 5:44 
GeneralOpen a form on socket receive Pin
Gian21-Oct-04 23:18
Gian21-Oct-04 23:18 
GeneralRe: Open a form on socket receive Pin
Fade (Amit BS)25-Oct-04 19:50
Fade (Amit BS)25-Oct-04 19:50 
The windows forms will behave abnormally when you try to access them forom a different thread then they are, and as you are probably getting the communication message on another thread you cannot directly control the forms

BUT!

the .net developers have been kind enough to porvide us with the 'Invoke' method, which is a member of each and every control (forms, buttons etc.)
this allows you to tell the control (form for this matter) to do something in it's own thread

what you need to do is to create a method (sub) that creates the new form and assigns it to a variable, that method should be located in your startup form, or any other form you want to use.
<br />
    private AdminFormMember as AdminForm<br />
<br />
    Private Sub CreateNewForm() <br />
        AdminFormMember= New SocketControlForm()<br />
<br />
        AdminFormMember.Show()<br />
    End Function<br />


and Create a delegate to it like so

<br />
       private delegate sub CreateNewFormDlg()<br />


and call it from your code when you want to create to new form using the 'Invoke' method, like so:

<br />
    If (OpenAdminForm = True) then<br />
             ' Creating a delegate instance<br />
         dim CreationDelegate as new CreateNewFormDlg()<br />
             ' invoking it from the main form's thread !<br />
         MainForm.Invoke(CreationDelegate)<br />
<br />
    end if




That's it, not too complicated and it works, trust me Wink | ;)

Fade (Amit BS)
QuestionLocal time for arbitrary location? Pin
UgN21-Oct-04 23:03
UgN21-Oct-04 23:03 
GeneralTransparent Controls (Compact Framework) Pin
Vinnepin21-Oct-04 13:04
Vinnepin21-Oct-04 13:04 
GeneralRe: Transparent Controls (Compact Framework) Pin
Alex Korchemniy25-Oct-04 11:18
Alex Korchemniy25-Oct-04 11:18 
Generaldeploying .net dll for com access Pin
Verdant12321-Oct-04 9:57
Verdant12321-Oct-04 9:57 
GeneralRe: deploying .net dll for com access Pin
Verdant12321-Oct-04 10:38
Verdant12321-Oct-04 10:38 
GeneralIE Toolbar Pin
Member 132814121-Oct-04 4:27
Member 132814121-Oct-04 4:27 
GeneralChanging the Form icon Pin
Tony D. Abel21-Oct-04 2:01
Tony D. Abel21-Oct-04 2:01 
Generalasynchronous udp Pin
tommy_tanaka21-Oct-04 0:40
tommy_tanaka21-Oct-04 0:40 
GeneralVb.Net &amp; File Pin
Meysam.Khayatan20-Oct-04 21:21
Meysam.Khayatan20-Oct-04 21:21 
GeneralSetting installer properties from the command line Pin
Saed Nashef20-Oct-04 19:26
Saed Nashef20-Oct-04 19:26 
GeneralMake external parameters !!! Pin
Meysam.Khayatan19-Oct-04 10:43
Meysam.Khayatan19-Oct-04 10:43 
GeneralRe: Make external parameters !!! Pin
benjymous20-Oct-04 3:13
benjymous20-Oct-04 3:13 
GeneralMsgbox buttons'text Pin
Meysam.Khayatan19-Oct-04 10:41
Meysam.Khayatan19-Oct-04 10:41 
GeneralAsp.Net and SqlServer data Pin
Meysam.Khayatan19-Oct-04 10:40
Meysam.Khayatan19-Oct-04 10:40 
GeneralDetails about nmake command Pin
ankitdass18-Oct-04 1:13
ankitdass18-Oct-04 1:13 
Questionwhat is VBScript.NET Pin
bassel_z15-Oct-04 12:24
bassel_z15-Oct-04 12:24 
GeneralMystified by ExpandableObjectConverter Pin
RobRichardson15-Oct-04 9:06
RobRichardson15-Oct-04 9:06 

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.