|
Hi,
Does any one know to pop up a GUI from a windows service? The windows service I am developing uses process to execute exes(another applications). Some of those exes may have user interface. Since the exe's are being executed from a windows service, the user interface of that is not displaying.
Thanks,
Jo.
|
|
|
|
|
If you look at the service in the control panel you should find an option that allows the service to interact with the desktop. It should be under the logon tab.
www.troschuetz.de
|
|
|
|
|
|
|
|
Font.GetHeight Method and Font.Height Property are being described in almost identical words in MSDN.
If I test both the font size = 11
The GetHeight return 14.66667 and
Height Property returns 15Font.
What is the difference between two values?
please guide
|
|
|
|
|
The difference is described in the documentation for Font.Height in MSDN.
GetHeight is returning a float and Height is an int. GetHeight is returning the exact height and Height is GetHeight rounded upwards.
|
|
|
|
|
thanks for the reply, but i actually had deleted this question when i realised the difference, i don't know how come it still remains there in the forum.
regards
|
|
|
|
|
I've noticed a strange bug in my application (C#.Net using the express 2005 beta)
I've currently got it set to open new child windows maximized, and I get the normal child minimize/restore/close/etc buttons appear on the parent's menu bar
However, if I restore the child window, it's a bit hit or miss as to whether the child window gets widgets in its title bar
See screenshot[^] - the King Tut image window doesn't have widgets, but the other two windows do.
I've found that sometimes resizing the child window a bit makes the widgets suddenly appear.
What am I doing wrong? (or is this a Whidbey bug?)
--
Help me! I'm turning into a grapefruit!
Phoenix Paint - back from DPaint's ashes!
|
|
|
|
|
I'm trying to make a component who's function can best be described as similar to the MainMenu component in VS.NET. The component should be able to add controls to the parent form at design time.
Via code in the component, I can create the new control and add it to the same container as the component, thus making it visible in the properties window of the form (via the combobox in the properties window), but I can't seem to figure out how to make the control visible on the form. How can this be done?
|
|
|
|
|
If your component is a UserControl then you should have no problem seeing it on the form when you drop it from the toolbox. It acts as any other .NET built-in component.
The component should be in a seperate project and should be a UserControl type.
|
|
|
|
|
The UserControl does not look the same as the MainMenu. As for the MainMenu the main component is the one that sits in the yellow field below the actual form. From that, several controls on the form are created, one for every MenuItem.
I want to make a component (inherit from System.ComponentModel.Component) and by using code in the component I want to create several controls on the actual form at design time. Just like the MainMenu or the toolbar of VS 2005. The reason for this is that I want to manage several controls from one location, the component.
|
|
|
|
|
The problem is: I want to use a for control sentence to control 16 lables,each time I want to change one lable's Text property.Suppose the 16 lables are lable1,lable2,lable3,...,lable16. What does the code should look like?
|
|
|
|
|
hi momor
that will be for (i=1;i<=16;i++)
{
myLabel.Text = "Label" + i + "/n";
}
that would help
|
|
|
|
|
Hi!Moustafa_,
Thank you very much!
But what I need is not to change one lable's Text property
for 16 times,but to change 16 lable's Text properties.I want to realize it with a for loop,and change one lable's Text property in each loop.In this case,what should my code look like?
Thank you again!
|
|
|
|
|
for(int i=0; i < this.Controls.Count; i++)
if(this.Controls[i].GetType() == typeof(System.Windows.Forms.Label))
MessageBox.Show (this.Controls[i].Name);
|
|
|
|
|
Hi!hatim_ali,
Thank you very much for your help!
I think your code give me much idear to work out my trouble.;)
|
|
|
|
|
Hi!hatim_ali,
The lable I want to get within each for loop is specified.That is,within the first loop I want to get lable1,within the second loop I want to get lable2,within the third loop I want to get lable3,...,within the 16th loop I want to get lable16.And there are more than 16 lables in my C# project,so if I use your code I don't know which lable I will get.I think maybe use a array or a
enum which contains the 16 specified lables,but I just do not know what the array or enum's type should be and what the code look like.
I need your help!;)
|
|
|
|
|
|
Hi
I have a C# application which makes use of an unmanaged C++ DLL.
Some of the DLL calls return pointers to dynamically allocated memory.
My question is this : can I release that memory with C# (and how) or do I have to release it in the context of the DLL - that is, call C++'s delete on the pointer) ?
I'd appreciate any kind of help with this.
thanks,
p.
|
|
|
|
|
Hello,
Do you know how to set invisible column.
For example, There is a list view class, this has the following 4 columns.
user, password, class, data
And, I made other column, named check. I would like to hide this.
If you have some ideas, please tell me.
cheers,
yu-yu
|
|
|
|
|
You can set the width of the column to 0. But be aware that if you allow the user to change the width of the columns it's possible to make your 'hidden' column visible.
|
|
|
|
|
Another approach: Keep that "column" out of the listbox/listview.
a) Data Collection with 5 columns
b) VISIBLE list with 4 columns
c) If changes occur in the visible list (events), update the data collection accordingly. If you need data from the 5th column, retrieve it directly from your "in-memory"-data-collection.
Cheerio
|
|
|
|
|
Hello,
Thank you for your advice.
Now, I will try them.
cheers,
yu-yu
|
|
|
|
|
I have to use the SetupDiGetDeviceRegistryProperty API, some of its parameters are pointers,such as void*,int* and byte*.but C# compiler said that void* is pointer may only be used in an unsafe context.
what should I do?
|
|
|
|