|
Oh great... Another retard...
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Wow! That's a true nonsense profile.
You posted *this* after 7 months of lurking? May be you were trying to find out how to make a post for 7 months?
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
hi guys,
I want to run any C# made exe from another C# program.
For that i used this code:
System.Diagnostics.Process.Start(exe path);
It's working fine.
But when i am using same code in OnStart() method of Windows Services.
It will start the process into Task Manager Processes, but not showing in screen whatever GUI that exe has.
To show GUI also , what should i do?
Thanks....
|
|
|
|
|
As services run under on different desktop, the application is running but it's gui is displayed on different desktop, that's why you can't see it. If you want to see GUI you will have to run process ob behalf of the user that is logged in.
If you want to have GUI for your service, just create new winforms application. To communicate between GUI and service you can use IPC or .NET Remoting.
|
|
|
|
|
You need to manually set the 'Allow service to interact with Desktop' to on.
Did you think how this will work when the PC starts, and no-one is logged in?
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 beta 1 - coming soon ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|
|
leppie wrote: You need to manually set the 'Allow service to interact with Desktop' to on.
But it is no more supported in Vista.
|
|
|
|
|
Thanks .........It's working now.....
|
|
|
|
|
hi......leppie.....
Now it's working fine. But i want to set this property programmatically. Is it possible?
Thanks......
|
|
|
|
|
No you cant, as said, this is apparently not even possible on Vista.
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 beta 1 - coming soon ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|
|
|
Hi,
.net2 vs2005 xp
I have a datagridview whos SelectionMode property is set to FullColumnSelect
With focus in the grid the left and right keys move focus to the left and right columns...
Ive put a button on either side of the grid - i want the buttons to select the next or previous column in the grid (similar to the arrow keys) can anyone point me in the right direction on how to do this?
Thanks,
Chas
|
|
|
|
|
Got it working... right button:
if (DataGridView.CurrentCell.ColumnIndex != DataGridView.Columns.Count -1)
{
DataGridView.Rows[0].Cells[DataGridView.CurrentCell.ColumnIndex + 1].Selected = true;
}
Chas
|
|
|
|
|
if you need the code for that post me in my profile. your post is already in page 4, i will not find it.
- go to first row
- go to last row
- go to next row
- go to previous row
- go to x row
nelsonpaixao@yahoo.com.br
trying to help & get help
|
|
|
|
|
How can I check to see if the selected date in a DateTimePicker is a date which is future to the current date (now) please?
|
|
|
|
|
Compare it to DateTime.Today().
Bob
Ashfield Consultants Ltd
|
|
|
|
|
You can use DateTime.Now to retrieve current date and time. DateTimePicker has a Value property so you can compare these values.
|
|
|
|
|
if(dateTimePicker1.Value>DateTime.Now)
{
MessageBox.Show("Greater");
}
|
|
|
|
|
if( DateTime.Compare(DateTime.Now, dateTimePicker1.Value) <=0)
{
}
|
|
|
|
|
XP64
VS2008
Compiling app for .Net 3.5
I've written some code to put my app in the system try but it's not working.
In my form, I've added a notifyIcon, a contextMenu, and an icon, and connected them all together (I added the components through the IDE's UI instead of manually typing everything in). I also have the following event handlers in the form:
private void NormalizeForm()
{
if (this.WindowState == FormWindowState.Minimized)
{
this.Visible = true;
this.WindowState = FormWindowState.Normal;
}
this.Activate();
this.notifyIcon.Visible = false;
}
private void MainForm_Load(object sender, EventArgs e)
{
this.ShowInTaskbar = false;
this.Visible = false;
this.WindowState = FormWindowState.Minimized;
this.notifyIcon.Visible = true;
}
private void restoreToolStripMenuItem_Click(object sender, EventArgs e)
{
NormalizeForm();
}
private void exitToolStripMenuItem_Click(object sender, EventArgs e)
{
this.Close();
}
private void notifyIcon_DoubleClick(object sender, EventArgs e)
{
NormalizeForm();
}
Where you see this.Visible = ... , I also tried this.Show() and this.Hide() .
When the app starts, there is nothing in the task bar (as expected), the form isn't on the desktop (as expected), but the icon is NOT in the system tray either.
What am I missing?
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Sorry, I haven't got a good answer for you, but I have a guess.
Firstly, your code works fine for me. (XP[x86], VS2008,.net3.5).
My guess is that the systray is probably a 64 bit app. You can't mix 32 bit and 64 bit processes, so if your .net app is a 32 bit app, then it won't be able to communicate with the systray.
Try changing your build settings to directly target x64.
(By default, .net assemblies are language agnostic, meaning they run as x64 on 64bit systems and x86 on 32 bit systems. So possibly the systray is a 32 bit app, in which case, change your settings to directly target x86)
Does this solve anything?
Simon
|
|
|
|
|
No change.
I did get warnings about some of the .Net assemblies targeting a different processor...
BTW, I also tried running the app inside a XP-32 VM, and it didn't work there either.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
John Simmons / outlaw programmer wrote: I also tried running the app inside a XP-32 VM, and it didn't work there either.
It's obviously not that then.
This is what I did
1) Created new winforms project
2) opened form and pasted your code in
3) Added a notifyicon to the form.
4) Changed your code match the name of my notify icon member.
5) Used the ide to point the form_load event and the notifyicon_doubleclick event at the appropriate methods.
6) Selected icon (using IDE, not by code). It added it to the forms resources.
7) Run - works fine (Also works fine when run outside of VS)
I did originally miss out step 6, and it didn't work. But I doubt that is your problem - maybe double check though. Consider checking icon file format size/res etc (mine's 16x16 32bit 96 dpi)
Simon
|
|
|
|
|
Yep. I did all of that, too.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
1.Make sure that NotifyIcon's is set.
2.Check if similar application works on your system. E.g: Window Tabifier[^]
3. Instead of this.notifyIcon.Visible= true; try setting this from the designer.
|
|
|
|
|
Giorgi Dalakishvili wrote: 1.Make sure that NotifyIcon's is set.
What do you mean by making sure it's set? It's on the form, and there's no exception when the app starts, so I assume it's instantiated correctly. Remember, the notifyIcon control was added in the UI, so all of it's initialization is in Designer.cs.
Giorgi Dalakishvili wrote: Instead of this.notifyIcon.Visible= true; try setting this from the designer.
It's set to true in the designer (and that is the default setting).
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|