Skip to main content

Project is running but exe is failed to run

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [Windows Mobile] >> Windows Mobile 5 >> Project is running but exe is failed to run Page: [1] 2   next >   >>
Login
Message << Older Topic   Newer Topic >>
Project is running but exe is failed to run - 5/20/2008 5:40:17 AM   
Sritanu

 

Posts: 20
Score: 0
Joined: 5/17/2008
Status: offline
I am a Software Developer working on VS2008(VB.NET) and SQL Server2005.I am new comers on PDA(WM 5.0).When I run my program it works fine.But when I run it from Debug\Release\PDA.exe.Then I got this error "Top-Level cannot be added".What can I do for it.I have a parent form and four child form.I am a Software Developer working on VS2008(VB.NET) and SQL Server2005.I am new comers on PDA(WM 5.0).When I run my program it works fine.But when I run it from Debug\Release\PDA.exe.Then I got this error "Top-Level cannot be added".What can I do for it.I have a parent form and four child form.
Post #: 1
RE: Project is running but exe is failed to run - 5/20/2008 3:20:09 PM   
petevick


Posts: 3386
Score: 0
Joined: 4/26/2002
From: Bolton - UK
Status: offline
How do you mean
quote:

"But when I run it from Debug\Release\PDA.exe"


Running it on the desktop?



_____________________________

Pete Vickers - Microsoft MVP - Device Application Development
www.gui-innovations.com

Please do not email me with questions. Posting your questions in the forums will get a quicker response - Thanks.

(in reply to Sritanu)
Post #: 2
RE: Project is running but exe is failed to run - 5/21/2008 3:20:06 AM   
Sritanu

 

Posts: 20
Score: 0
Joined: 5/17/2008
Status: offline
When I run my project in VS2008,it works fine.But after build my project I go to my destination folder i.e bin\release and click on exe file.Then I got this error message "Top-Level control cannot be added".What can I do for this?How to run my project into another machine where VS is not installed.Please help me.

(in reply to petevick)
Post #: 3
RE: Project is running but exe is failed to run - 5/21/2008 3:39:14 AM   
Sritanu

 

Posts: 20
Score: 0
Joined: 5/17/2008
Status: offline
Yes,I want to run it to desktop.Pls help me

(in reply to petevick)
Post #: 4
RE: Project is running but exe is failed to run - 5/21/2008 6:12:07 AM   
petevick


Posts: 3386
Score: 0
Joined: 4/26/2002
From: Bolton - UK
Status: offline
If you are using any CF specific API's, then it will not run on the desktop.

The message appears to be hinting that you are trying to add something like a form to a panel

Pete

_____________________________

Pete Vickers - Microsoft MVP - Device Application Development
www.gui-innovations.com

Please do not email me with questions. Posting your questions in the forums will get a quicker response - Thanks.

(in reply to Sritanu)
Post #: 5
RE: Project is running but exe is failed to run - 5/22/2008 2:31:46 AM   
Sritanu

 

Posts: 20
Score: 0
Joined: 5/17/2008
Status: offline
How can I run this exe into pocket pc device.When I copied this exe and support file to original PocketPC device.Then this message also appeared.How can I run into this.Pls help me.

(in reply to petevick)
Post #: 6
RE: Project is running but exe is failed to run - 5/22/2008 4:07:31 AM   
petevick


Posts: 3386
Score: 0
Joined: 4/26/2002
From: Bolton - UK
Status: offline
Try stepping through the code, and see where the error happens, or put a 'Try Catch' in your form_load

_____________________________

Pete Vickers - Microsoft MVP - Device Application Development
www.gui-innovations.com

Please do not email me with questions. Posting your questions in the forums will get a quicker response - Thanks.

(in reply to Sritanu)
Post #: 7
RE: Project is running but exe is failed to run - 5/22/2008 7:08:57 AM   
Sritanu

 

Posts: 20
Score: 0
Joined: 5/17/2008
Status: offline
I used your idea and got the error line but still I have the problem.I used a module where generaly declare this line :
.parent=frmmdimain
frmmdimain is my main form.I used CF 2.0 SP2.

(in reply to petevick)
Post #: 8
RE: Project is running but exe is failed to run - 5/22/2008 7:55:24 AM   
petevick


Posts: 3386
Score: 0
Joined: 4/26/2002
From: Bolton - UK
Status: offline
you need to show more code than that - what is .parent???


_____________________________

Pete Vickers - Microsoft MVP - Device Application Development
www.gui-innovations.com

Please do not email me with questions. Posting your questions in the forums will get a quicker response - Thanks.

(in reply to Sritanu)
Post #: 9
RE: Project is running but exe is failed to run - 5/22/2008 8:00:36 AM   
Sritanu

 

Posts: 20
Score: 0
Joined: 5/17/2008
Status: offline

Public
Sub SetFormSize(ByRef frm As Form, ByVal mdiTopRows As Integer, ByVal mdiBottomRows As Integer)
 

With frm
.Parent = frmMdiMain
.Top = frmMdiMain.Top + frmMdiMain.FGtop.Height
.Left = frmMdiMain.Left
.Width = frmMdiMain.Width
.Height = frmMdiMain.Height - (frmMdiMain.FGtop.Height + frmMdiMain.fgBottom.Height)
End With
End Sub
 
I call it in every form and set
me.parent=frmMdiMain

(in reply to petevick)
Post #: 10
RE: Project is running but exe is failed to run - 5/22/2008 8:09:04 AM   
petevick


Posts: 3386
Score: 0
Joined: 4/26/2002
From: Bolton - UK
Status: offline
That would appear to be your problem then.

You certainly can't have MDI forms in CF.

Declare a main form, and open it. Then do a showdialog() on the other forms, or a show() to show them

Pete

_____________________________

Pete Vickers - Microsoft MVP - Device Application Development
www.gui-innovations.com

Please do not email me with questions. Posting your questions in the forums will get a quicker response - Thanks.

(in reply to Sritanu)
Post #: 11
RE: Project is running but exe is failed to run - 5/22/2008 8:14:52 AM   
Sritanu

 

Posts: 20
Score: 0
Joined: 5/17/2008
Status: offline
Yes,I don't have any MDI form.I have a main form & declare it parent.The four child form I used me.close() and form.show() method.I try to declare MDI parent but it cannot appear in VS2008 WM 5.0 application.Please give me the solution.

(in reply to petevick)
Post #: 12
RE: Project is running but exe is failed to run - 5/22/2008 9:11:10 AM   
petevick


Posts: 3386
Score: 0
Joined: 4/26/2002
From: Bolton - UK
Status: offline
I gave you the solution.

Have a main form as your startup.

Then do
dim frmChildx as new frmChild1
frmChildx.showdialog()
frmChildx.dispose

or
dim frmChildx as new frmChild1
frmChildx.show()

and then dispose when you have finished with it.

.Net CF doesn't support mdi forms

_____________________________

Pete Vickers - Microsoft MVP - Device Application Development
www.gui-innovations.com

Please do not email me with questions. Posting your questions in the forums will get a quicker response - Thanks.

(in reply to Sritanu)
Post #: 13
RE: Project is running but exe is failed to run - 5/22/2008 9:29:23 AM   
Sritanu

 

Posts: 20
Score: 0
Joined: 5/17/2008
Status: offline
I have already used that code.But the frmconfig(the first child form) is opened but it behind the main form.I want the frmconfig form is opened under main form. frmMdiMain(Main form) and it has two grid that fgtop and fgbottom.These are appeared in every time when the child forms are open or closed.

(in reply to petevick)
Post #: 14
RE: Project is running but exe is failed to run - 5/22/2008 11:27:24 AM   
petevick


Posts: 3386
Score: 0
Joined: 4/26/2002
From: Bolton - UK
Status: offline
sorry - i don't understand.

What do you mean 'I want the frmconfig form opened under the main form'?



_____________________________

Pete Vickers - Microsoft MVP - Device Application Development
www.gui-innovations.com

Please do not email me with questions. Posting your questions in the forums will get a quicker response - Thanks.

(in reply to Sritanu)
Post #: 15
RE: Project is running but exe is failed to run - 5/23/2008 3:26:26 AM   
Sritanu

 

Posts: 20
Score: 0
Joined: 5/17/2008
Status: offline
frmConfig is configuration file where I set the server name and database name.First open frmMdiMain in this form the frmConfig form is also open.I want to view the two grid of frmMdiMain form and the frmConfig form where the text box is given to set server name & database name.

(in reply to petevick)
Post #: 16
RE: Project is running but exe is failed to run - 5/23/2008 9:27:54 AM   
petevick


Posts: 3386
Score: 0
Joined: 4/26/2002
From: Bolton - UK
Status: offline
Sorry - don't see your problem.

Start a new project, and then add a new form - that should give you form1 and form2

On form1 put a button with a caption of 'Show', on form2 put a button with a caption of 'Close'

Code behind the button on form1 is
Dim frm1 as new form1
frm1.showdialog()
frm1.dispose

Code behind button on form2

me.close


When you run the project, and click on the button, form2 should show. When you click on 'close' on form 2, you should see form1.




_____________________________

Pete Vickers - Microsoft MVP - Device Application Development
www.gui-innovations.com

Please do not email me with questions. Posting your questions in the forums will get a quicker response - Thanks.

(in reply to Sritanu)
Post #: 17
RE: Project is running but exe is failed to run - 5/24/2008 1:32:38 AM   
Sritanu

 

Posts: 20
Score: 0
Joined: 5/17/2008
Status: offline
In PDA program Can't I declare a form as a parent of another?

(in reply to petevick)
Post #: 18
RE: Project is running but exe is failed to run - 5/24/2008 1:55:02 AM   
petevick


Posts: 3386
Score: 0
Joined: 4/26/2002
From: Bolton - UK
Status: offline
As I said right at the beginning, the concept of MDI forms does not exist in the CF, so no you can't

_____________________________

Pete Vickers - Microsoft MVP - Device Application Development
www.gui-innovations.com

Please do not email me with questions. Posting your questions in the forums will get a quicker response - Thanks.

(in reply to Sritanu)
Post #: 19
RE: Project is running but exe is failed to run - 5/24/2008 2:42:47 AM   
Sritanu

 

Posts: 20
Score: 0
Joined: 5/17/2008
Status: offline
But under virtual pc it is running in my machine with the parent concept.

(in reply to petevick)
Post #: 20
Page:   [1] 2   next >   >>
All Forums >> [Windows Mobile] >> Windows Mobile 5 >> Project is running but exe is failed to run Page: [1] 2   next >   >>
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.5.5 Unicode

0.031