|
A NullReferenceException always occurs because you've tried to dereference a null reference. For example, if you try to manipulate a null string.
The debugger will show you where the problem occurred. Then check all the variables used by that line of code. When you find the one that's null, that's where your problem is.
DoEvents: Generating unexpected recursion since 1991
|
|
|
|
|
hi Mike..
I don't think that is the problem.. When I am in debug mode no problem occurs...when i am running with F5 then a message box appears with 'NullReferenceException'...So I am unable to get the exact line number of problem.
sandesh khare
sandesh
|
|
|
|
|
Seems like one of the variables being used in the event handler does not have any value assigned to it. The reason it's not occurring in debug mode is that it gets the required time to get the value and therefore no exception is thrown.
You can also check for the variables and their values at the time when the exception occurs which can give you a hint for the cause of the exception.
~Dave
Dave Traister
Software Engineer
ComponentOne LLC
www.ComponentOne.com
|
|
|
|
|
Check all objects that your passing to the event, where you got the NullReferenceException .
Windows mobile development, pocket pc development , C#.net compact framework, Desktop application , web service
|
|
|
|
|
Hello Sir
I am windows mobile developer, i have question regarding "Optimization steps " in windows mobile development , Whether to use different panel on same form is efficient or different panel on same form. Other suggestion on optimization steps also welcome ....
Thanks in advance
Abhijeet suryawanshi: confused:
|
|
|
|
|
Do you have ans to this
Windows mobile development, pocket pc development , C#.net compact framework, Desktop application , web service
|
|
|
|
|
|
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.
|
|
|
|
|
Hello,
I have to build an application with VC++5 on win CE platform. The application needs one after the other input, display some & confirmation. Application also needs that by clicking up or down arrow, it should move to previous or backwards screen & let the user edit if required. I have worked on Mobile applications, but this platforma is new for me.
My concerns regarding the matter :
1) How should I bring one after another dialogs; making so mnay dialogs will make the application heavy. What technique should be used to make the application small and fulfill the requirements. I believe & hope their must be some way to achieve this in a simple manner.
2) How to track the up, down, Ok, Cancel, Left , Right buttons/keys? Their must be something like VK_...., I ma not sure and don't know.
I think, that the screens need to go up or down, so, they must be saved in maybe an array. A Common dialog box can be made up and things can be worked or not? Please help me out to solve this confusion and make work easy but light too. Any help is appreciated. Thanks in advance.
Thanks
Terry
|
|
|
|
|
question 2
I am not sure if its going to be the same in VC++, however in Visual Studio 2005, in C#
it creates the code to track all those buttons, here is a copy of some of it out of one my appliations
private void R1TimeSummaryViewDialog_KeyDown(object sender, KeyEventArgs e)
{
if ((e.KeyCode == System.Windows.Forms.Keys.Up))
{
this.AutoScrollPosition = new System.Drawing.Point(0, ((0 - this.AutoScrollPosition.Y)
- 16));
e.Handled = true;
}
if ((e.KeyCode == System.Windows.Forms.Keys.Down))
{
this.AutoScrollPosition = new System.Drawing.Point(0, ((0 - this.AutoScrollPosition.Y)
+ 16));
e.Handled = true;
}
if ((e.KeyCode == System.Windows.Forms.Keys.Up))
{
}
if ((e.KeyCode == System.Windows.Forms.Keys.Down))
{
}
if ((e.KeyCode == System.Windows.Forms.Keys.Left))
{
}
if ((e.KeyCode == System.Windows.Forms.Keys.Right))
{
}
if ((e.KeyCode == System.Windows.Forms.Keys.Enter))
{
}
}
Hope this helps.
Computer Programmer Web/Mobile .NET
|
|
|
|
|
HI Guys,
I've been programming on desktops but i'm moving to the mobile side of things. things are quite different here. pls can anyone give me sites (apart from codeproject of course)that can tutor and offer help in mobile development.
Thanx Y'All.
He who goes for revenge must first dig two graves.
-Confucius.
|
|
|
|
|
HI
I am also going to initiate development in Mobile applications and using VS2008 and Windows PocketPc running Windows CE i have got some links and wanna share with you.
[^]
I have lost others but soon i'll send those to you i have some ebooks too i'll send to you later as currently that were at my home.
I have a problem too:-
I want to make PDA's Connected to Application Server Without GPRS how can i achieve this?
Thanks.
Regards
Bilal Haider.
|
|
|
|
|
Thanks a lot Bilal, but i think u forgot to put d links up. I can't find any links.
He who goes for revenge must first dig two graves.
|
|
|
|
|
I am a Software Developer,working on VS2008 and SQL Server2005.I am new comers in PDA.When I run my project from program,it's works fine.But when I run from bin\debug\pda.exe then an error message shows that Top-level control cannot be added.Please help me.
|
|
|
|
|
Seems you have not set the MDIParent of the child form to the main form.
Childform.mdiparent=this;
~Dave
Dave Traister
Software Engineer
ComponentOne LLC
www.ComponentOne.com
|
|
|
|
|
Thanks to you for reply me.frmMdiMain is my main form.I write in every child form that,Me.Parent=frmMdiMain.I use your code but mdiparent doesn't come.I used VB.NET.
|
|
|
|
|
Hello, I need to connect to a remote MySQL DB that lives into a remote host-server.
I am developing a pda application Windows Mobile. I am working with Visual Studio 2005 and C# as language.
Any code-example? can anybody help me?
Thanks
|
|
|
|
|
Can you write your connection string here.
|
|
|
|
|
I already get to connect it to remote database. I am using the free MySQL 5.1... connector. But it is too slow (about 7 seconds to connect from DB). Anybody knows any connector of pay?
Regards
|
|
|
|
|
See you can use RDA(Remote data access)or replication for this purpose , choose one of them depending on the size of data you want get on device ..., up to 10 mb on device by using RDA is very efficient...
Windows mobile development, pocket pc development , C#.net compact framework, Desktop application , web service
|
|
|
|
|
Can anyone tell me how to bulid a one click installer, that will install, my 3 cab files (SQL stuff, and deploy my application to the PDA? So that we do not have to do it manualy.
Thanks!
Computer Programmer Web/Mobile .NET
|
|
|
|
|
|
using System;<br />
using System.Collections.Generic;<br />
using System.ComponentModel;<br />
using System.Configuration.Install;<br />
using Microsoft.Win32;<br />
using System.Reflection;<br />
using System.IO;<br />
using System.Diagnostics;<br />
using System.Windows.Forms;<br />
<br />
namespace WindowsControlLibrary1<br />
{<br />
[RunInstaller(true)]<br />
public partial class CustomInstaller : Installer<br />
{<br />
public CustomInstaller()<br />
{<br />
InitializeComponent();<br />
}<br />
<br />
protected override void OnAfterInstall(System.Collections.IDictionary savedState)<br />
{<br />
string programName = "\"" + CeAppMgrExe + "\"";<br />
string programArg = "\"" + IniFilePath + "\"";<br />
<br />
MessageBox.Show(programName + " " + programArg);<br />
Process.Start(programName, programArg);<br />
base.OnAfterInstall(savedState);<br />
}<br />
<br />
const string _ceAppMgRegistryPath = @"software\Microsoft\Windows\CurrentVersion\App Paths\CEAppMgr.exe";<br />
const string _iniFileName = "PDARAM.ini";<br />
const string _filePrefix = @"file:\";<br />
string CeAppMgrExe<br />
{<br />
get<br />
{<br />
RegistryKey subKey = null;<br />
string exePath = null;<br />
try<br />
{<br />
subKey = Registry.LocalMachine.OpenSubKey(_ceAppMgRegistryPath);<br />
exePath = (string) subKey.GetValue("");<br />
}<br />
finally<br />
{<br />
if (subKey != null)<br />
subKey.Close();<br />
}<br />
return exePath;<br />
<br />
}<br />
}<br />
string IniFilePath<br />
{<br />
get<br />
{<br />
<br />
string installFolder = Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetName().CodeBase);<br />
string iniFilePath = Path.Combine(installFolder, _iniFileName);<br />
if (iniFilePath.StartsWith(_filePrefix))<br />
{<br />
<br />
int index = _filePrefix.Length;<br />
iniFilePath = iniFilePath.Substring(index);<br />
<br />
}<br />
return iniFilePath;<br />
<br />
}<br />
}<br />
}<br />
}
Can anyonehelp me? I am buliding the Desktop installer, and it starts the install proccess, but tells me there is an error in my setup file?
This is my INI file
[CEAppManager]<br />
Version = 1.0<br />
Componet = DeviceApplication1<br />
<br />
[DeviceApplication1]<br />
Description = PDA RAM Data Collection Application<br />
CabFiles = SmartDeviceCab1.CAB<br />
Computer Programmer Web/Mobile .NET
|
|
|
|
|
Hi all,
I'm find some problem to bind a simple String Array (NamesWpt()) with a Datagrid (DataGrid1).
The only result I obtained with this simple code line:
DataGrid1.DataSource = NamesWpt
is to populate the DataGrid with length of strings contained in Array (NamesWpt()). And the name column is been named "Length".
How to see contained Names?
Is it possible to bind a multi-column DataGrid with a multi dimensional array?
Thanks
Marco
|
|
|
|
|
You would need to create an ArrayList, add any number of classes having n number of properties you want to the ArrayList and bind it to DataGrid.
To bind an Arraylist to a DataGrid, refer the link below:
http://www.c-sharpcorner.com/UploadFile/mahesh/ArrayListBinding10212005102338AM/ArrayListBinding.aspx
~Dave
Dave Traister
Software Engineer
ComponentOne LLC
www.ComponentOne.com
|
|
|
|