|
Hi,
I am having a strange problem when starting a process on a Windows Mobile based device.
RepsApp is the entry point for the application.
AppHandler is essentially a class that is used to maintain a bunch of global variables.
public class RepsApp
{
static void Main()
{
AppHandler.frmMain = new FormMain();
AppHandler.frmMain.ControlBox = true;
AppHandler.frmMain.MinimizeBox = false;
AppHandler.frmMain.FormBorderStyle = FormBorderStyle.FixedSingle;
Application.Run(AppHandler.frmMain);
if (AppHandler.GetUpdates)
{
int processID = Process.GetCurrentProcess().Id;
Process p = new Process();
p.StartInfo.FileName = Path.Combine(AppHandler.GetAppPath(), "AppUpdater.exe");
p.StartInfo.Arguments = string.Format("{0} {1}", processID, true);
p.Start();
}
Application.Exit();
}
}
In the MainForm class I simply set AppHandler.GetUpdates to True and close the form
public class FormMain : System.Windows.Forms.Form
{
private void menuItemGetUpdates_Click(object sender, EventArgs e)
{
AppHandler.GetUpdates = true;
this.Close();
}
}
When the MainForm closes :
if AppHandler.GetUpdates is True the main application stays in memory after it launchs the AppUpdater process.
if AppHandler.GetUpdates is False the main application closes as expected.
Is there any reason why calling Process.Start would prevent the main application from closing?
Thanks,
David
|
|
|
|
|
hi,
iam not sure if that could help..,
you set the current ProcessID from the running app at the arguemnts. don't know what your AppUpdater internal do with the ProcessID but maybe it supsends the thread on the processid so you "main" application could not close ?!?
greetz
|
|
|
|
|
hi sir,
i am work in c# then my problem public variable define in c#
|
|
|
|
|
A public variable is just a variable which is defined outside of a method and has the visibility specifier of public. Depending on how you look at it, a property could be a public variable in its most basic case (disregarding the generated get/set methods, no validation, etc).
modified on Friday, November 20, 2009 8:18 AM
|
|
|
|
|
0x3c0 wrote: A public variable is just a variable which is defined outside of a method.
So this is a public variable, is it:
private int i = 0;
Interesting. And there's me thinking that the keyword
public might be involved somewhere along the line.
|
|
|
|
|
I had a complete brainfreeze. I'm about to edit my post. Sorry for any confusion that I might have caused to any other readers of that post.
|
|
|
|
|
Are you talking about a global variable (as in VB6) that can be access from anywhere in the app. Then use a static class and a internal static variable.
static Global {
internal static MyString = "Hello";
}
And this variable can be accessed from anywhere in the app using:
string string1 = Global.MyString;
|
|
|
|
|
Hi all.
You can visit this link : http://www.vbforums.com/showthread.php?t=510375
Like that application, I try to show a PPT file within a form by using FindWindow() and SetParent() Function of "user32.dll" by C#. I can catch events such as: begin show, end show, next slide, next, previous, next build... by build functions to handle that events (for a object of Micorosoft.Office.Interop.PowerPoint.SlideShowWindow) . It works ok. But if slide has a VBA button (to run a marco or show animation ...) or has a video clip and you need to click on it to play, I can not catch onlick event for that object/shapes. I need to know what shape/object on slide is clicked when slide is showing. It seem as PPT do not support that event? Please help me.
Thank you so much for your help.
Regards.
|
|
|
|
|
Hi,
I wish to inquire that how i can install a windows component while deploying my application.
I wish to install the windows message queue component while deploying which is not there in default windows installation.
Any help!!!
|
|
|
|
|
AFAIK, you have to ask your users to do it.
|
|
|
|
|
there must be someway, any windows installer sdk???
|
|
|
|
|
I have never seen or heard of any installers for Windows components. Try in MSDN downloads.
|
|
|
|
|
There is a Windows Installer SDK but it won't help you in this case.
You'll have to use the SetupAPI in Win32 to install the required components. The users will also have to have their installation media for Windows and possibly reapply service packs/patches to the machine after you install the components.
No, I don't know the exact procedure or functions you need to call, and I don't have any examples. You're the first person to ask this in the 6 years I've been around here.
|
|
|
|
|
OH waooo!!!!
At least eventually i am the one who asked it, even perhaps it took 6 years.
So, the matter remains unhanded then, user has to himself, with a windows cd at hand install the MSMQ component.
|
|
|
|
|
After quite a bit of digging, you may want to research "sysocmgr". It may handle what you want, though you'll have to write custom .INF files to use it.
|
|
|
|
|
Really thanx bro for the hard digging, i am going to look into it.
|
|
|
|
|
autogeneratecolumns should be true.
dataset has already 5 columns in a table.
newly have to add imagebuttons edit,delete for every row in the gridview.
code using c#.net.
now newly two columns has to be added to gridview,each row edit and delete image buttons
have to be added
|
|
|
|
|
i am having employee table with empid as primary key.
i have gridview and sqldatasource object so i gave sqldatasource object id to gridview and retrieved employee table all columns.
now dynamically i want to add two imagebuttons(edit,delete) as two more columns for gridview using csharp code only and not by asp code
plz give me the code
|
|
|
|
|
i am fresher i am unable to do this task.
plzz help me.
i am having employee table and connected via sqldatasource object and retrieved data and placed in gridview.
now i need to add two imagebuttons(edit,delete) as two additional columns in gridview in every row by csharp code only not by asp code.
i am having 5 columns already in gridview and with empid as primary key in employee table
|
|
|
|
|
jyothisai15 wrote: i am fresher i am unable to do this task.
So you don't know how to use a search engine either? What is the point of giving you the code, you still wouldn't know how to do it, and somewhere down the line (hopefully) you would fail your exam. A big part of being a developer is to learn to research new topics, you can't rely on other people to do it for you.
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
I am a C# programming and I want to test the contenue of commands in HTTP and SMTP protocols, and be able of sending them manually, anybody know about a good tutorial of commands or one documented tool for do my learning.
Best regards
|
|
|
|
|
Anyone care to help me get going? Being new to configuration files I'm a bit lost. Searching didn't lead me far, didn't find a clear example. MSDN example was brutally long.
Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
config.Save();
What is needed to create a section, and put a key / value into that section?
Thanks for your help.
(Have already added reference, using, and config file)
|
|
|
|
|
Please go to Articles and look for Custom Configuration Sections in .Net 2.0 from Luis Angel R.C. is written in VB but it's translation is very easy, and very complete and clear , only has a problem for saving at the end.
Regards
|
|
|
|
|
|
Hi All,
Suppose I want to write a web program to find out which websites relevant to my search words, have the number one ranking in all search engines? In other words if I want to find all websites that appear at the top of the search result list that have to do with say "FootBall High Lights", what would I have to consider when writing a web program for such a purpose? I would like the program to go and search all search engines not just Google or Yahoo. Thank you in advance for your help.
|
|
|
|