Click here to Skip to main content
16,018,234 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Generalcontrol on word save message prompt Pin
Anonymous20-Jun-05 21:44
Anonymous20-Jun-05 21:44 
GeneralWord application Instance closing in VB Pin
Anonymous20-Jun-05 20:12
Anonymous20-Jun-05 20:12 
GeneralRe: Word application Instance closing in VB Pin
jonathan1521-Jun-05 4:10
jonathan1521-Jun-05 4:10 
Generalcalling back a previous form.. Pin
icowa20-Jun-05 17:42
icowa20-Jun-05 17:42 
GeneralRe: calling back a previous form.. Pin
icowa20-Jun-05 17:44
icowa20-Jun-05 17:44 
GeneralRe: calling back a previous form.. Pin
Christian Graus20-Jun-05 17:54
protectorChristian Graus20-Jun-05 17:54 
GeneralRe: calling back a previous form.. Pin
icowa20-Jun-05 17:59
icowa20-Jun-05 17:59 
GeneralRe: calling back a previous form.. Pin
Christian Graus20-Jun-05 18:04
protectorChristian Graus20-Jun-05 18:04 
Like I said, back out from *where* ? Did you hide Form1 ? Did you close it ? Oh - do Form1 and Form2 both define the Accept and Close behaviours for buttons ? If so, a 'feature' ( I regard it as a bug ) in .NET is that if you click abutton for Form2, and Form1 defines a button to return the same DialogResult that the button you clicked has, .NET will push Form1's button, too. So turn those properties to 'None' and always set the DialogResult yourself.

However, the Show method makes a modeless dialog, doesn't it ? So you must have code further down that hides Form1. If you want to hide Form1, you're better using ShowDialog to create a modal dialog, and then you have the entry point to reshow Form1, just after ShowDialog is called.

It might be best if you showed us the entire function where Form2 is created, so we know what's going on.


Christian Graus - Microsoft MVP - C++
GeneralRe: calling back a previous form.. Pin
Anonymous20-Jun-05 18:35
Anonymous20-Jun-05 18:35 
GeneralRe: calling back a previous form.. Pin
Anonymous20-Jun-05 18:37
Anonymous20-Jun-05 18:37 
GeneralRe: calling back a previous form.. Pin
Christian Graus20-Jun-05 18:39
protectorChristian Graus20-Jun-05 18:39 
GeneralRe: calling back a previous form.. Pin
icowa20-Jun-05 18:48
icowa20-Jun-05 18:48 
GeneralRe: calling back a previous form.. Pin
Christian Graus20-Jun-05 18:53
protectorChristian Graus20-Jun-05 18:53 
GeneralRe: calling back a previous form.. Pin
Dave Kreskowiak21-Jun-05 2:36
mveDave Kreskowiak21-Jun-05 2:36 
GeneralRe: calling back a previous form.. Pin
lespaul3620-Jun-05 18:53
lespaul3620-Jun-05 18:53 
GeneralRe: calling back a previous form.. Pin
Christian Graus20-Jun-05 19:00
protectorChristian Graus20-Jun-05 19:00 
GeneralRe: calling back a previous form.. Pin
icowa20-Jun-05 19:14
icowa20-Jun-05 19:14 
GeneralRe: calling back a previous form.. Pin
icowa20-Jun-05 19:18
icowa20-Jun-05 19:18 
GeneralRe: calling back a previous form.. Pin
Christian Graus20-Jun-05 19:18
protectorChristian Graus20-Jun-05 19:18 
GeneralRe: calling back a previous form.. Pin
icowa20-Jun-05 19:21
icowa20-Jun-05 19:21 
GeneralRe: calling back a previous form.. Pin
Christian Graus20-Jun-05 19:23
protectorChristian Graus20-Jun-05 19:23 
GeneralRe: calling back a previous form.. Pin
icowa20-Jun-05 19:24
icowa20-Jun-05 19:24 
GeneralRe: calling back a previous form.. Pin
lespaul3621-Jun-05 11:24
lespaul3621-Jun-05 11:24 
GeneralColumn Color Change Pin
lespaul3620-Jun-05 9:31
lespaul3620-Jun-05 9:31 
GeneralRe: Column Color Change Pin
lespaul361-Aug-05 11:38
lespaul361-Aug-05 11:38 

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.