Click here to Skip to main content
16,005,206 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: acces serial port Pin
Jodd2-Dec-05 13:37
Jodd2-Dec-05 13:37 
GeneralRe: acces serial port Pin
Dave Kreskowiak2-Dec-05 13:55
mveDave Kreskowiak2-Dec-05 13:55 
GeneralRe: acces serial port Pin
Jodd2-Dec-05 15:02
Jodd2-Dec-05 15:02 
GeneralRe: acces serial port Pin
Fu Manchu3-Dec-05 14:21
Fu Manchu3-Dec-05 14:21 
Questionchange the caller form based on the result of the called form Pin
hui20062-Dec-05 7:52
hui20062-Dec-05 7:52 
AnswerRe: change the caller form based on the result of the called form Pin
Briga2-Dec-05 7:55
Briga2-Dec-05 7:55 
GeneralRe: change the caller form based on the result of the called form Pin
hui20066-Dec-05 0:58
hui20066-Dec-05 0:58 
GeneralRe: change the caller form based on the result of the called form Pin
Briga6-Dec-05 4:06
Briga6-Dec-05 4:06 
Well my code has an error or better it was missing the form2.showdialog (so that the next line is executed only after the form2 has been hidden/closed with the button).
So if you replace .show with .showdialog then it works.

Anyway if you want a more precise answer you should provide more precise informations. Which versione of FW are you using 1.x or 2? VS2003 or VS2005.

In VS2003 you can refer to the calling form only if it's public declared.

Module x
public fmain as new frmMain
end module

then in the form2 button click event handler:
fmain.textbox1.text = ....

In VS2005 in most cases you can state immediatly the form without instancing it. This means you can have a direct access to frmMain (considering the previous example) unless you're running an instance created by you (than you fallback in the former case).

Another way of doing it is by raising an event.

In form2 you'll have:

...
raisevevent OKClicked()

and in form1

private sub ClickOnForm2() handles frm2.OKClicked
me.textbox1.text = frm2.textbox1.text
end sub

or using parameters ...

public class frm2eventargs
inherits eventargs
public t as string
end class

on form2 before you raise the event...

dim e as new frm2eventargs
e.t = (text to pass)
raiseevent OKClicked(me,e)

and then on the mainform

private sub frm2OKClick(sender as object,e as frm2eventargs) handles frm2.OKClicked
me.textbox1.text = t
end sub

So as you can see lot of options depending on the approach you want and what you're using.



QuestionVB.Net Controls: TypeConverter Pin
vocaris2-Dec-05 5:18
vocaris2-Dec-05 5:18 
AnswerRe: VB.Net Controls: TypeConverter Pin
[Marc]2-Dec-05 6:21
[Marc]2-Dec-05 6:21 
GeneralThank you Pin
vocaris2-Dec-05 7:50
vocaris2-Dec-05 7:50 
GeneralRe: Thank you Pin
[Marc]2-Dec-05 10:06
[Marc]2-Dec-05 10:06 
QuestionCounting Records.......... Pin
daviiie2-Dec-05 5:14
daviiie2-Dec-05 5:14 
AnswerRe: Counting Records.......... Pin
vocaris2-Dec-05 5:21
vocaris2-Dec-05 5:21 
QuestionIs it possible to remove existing graphics from an image? Pin
Gulfraz Khan2-Dec-05 2:25
Gulfraz Khan2-Dec-05 2:25 
AnswerRe: Is it possible to remove existing graphics from an image? Pin
[Marc]2-Dec-05 4:08
[Marc]2-Dec-05 4:08 
AnswerRe: Is it possible to remove existing graphics from an image? Pin
Roy Heil6-Dec-05 11:22
professionalRoy Heil6-Dec-05 11:22 
GeneralRe: Is it possible to remove existing graphics from an image? Pin
Gulfraz Khan7-Dec-05 2:24
Gulfraz Khan7-Dec-05 2:24 
QuestionIPs Pin
ADY0071-Dec-05 23:44
ADY0071-Dec-05 23:44 
AnswerRe: IPs Pin
Gideon Engelberth7-Dec-05 6:04
Gideon Engelberth7-Dec-05 6:04 
QuestionMonitor CPU Pin
nitin_ion1-Dec-05 22:25
nitin_ion1-Dec-05 22:25 
AnswerRe: Monitor CPU Pin
[Marc]2-Dec-05 3:51
[Marc]2-Dec-05 3:51 
Questionhow can i receive the ip address from a remote client? Pin
yuvalda11-Dec-05 21:16
yuvalda11-Dec-05 21:16 
QuestionDetermine Printer Port Pin
thebread1-Dec-05 20:34
thebread1-Dec-05 20:34 
AnswerRe: Determine Printer Port Pin
Duncan Edwards Jones1-Dec-05 23:08
professionalDuncan Edwards Jones1-Dec-05 23:08 

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.