|
Hi I am using Visual Studio 2005.
I want to layout my Form automatically when I restore or maximize form window. The controls on the form like groupbox containing many other controls should adjust according to size of form.
Question:
1. How I can implement this? What is best way?
2. Should I do it using code. That is by changing locations of controls?
I used Anchor property but it doesn't worked for me.
Please tell.
Thanks
|
|
|
|
|
The Anchor and Dock properties are how it's done. otherwise, you need to write a ton of code in the form resized event to do it manually.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Depends on what you want to do. If you want your controls to change size based on the size and resolution of the screen then there used to be a number of articles around but they were all a kludge. I believe WPF may be the too; for this sort of thing.
What I usually do is have 2 classes of form, fixedtoolwindow and sizeabletoolwindow. Fixed is for any dialog without a datalist, it does not make sense for the user to change from my setup. Sizeable is for any form with a list control. I use a combination of panels, docking and anchor to achieve a form where the list control is docked to fill and therefore expans when the use changes the form layout.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Put the controls in the TableLayoutPanel cells. Set the column and row dimensions for the TableLayoutPanel in "%" (You can also give absolute values wherever suitable). Anchor the TableLayoutPanel to all the sides of the form. And all the controls to all four sides of the cell they are in. This will give resizing effect to the controls when the form is resized.
Hope this helps.
|
|
|
|
|
I have a c# .net 2.0 application that I created. What I need to know is how do I create a true
".exe" embedable code. I have a gizmo that I want to program. I must confess that I am beyond
my realm with this but thats how we learn. I understand how the .net framework works and how it
passes the assemblys to the "JIT" and the JIT the converts it to true machine code that the processer executes. do other platforms like borland create true ".exe's"? Or do I need to learn
Assembly language? I hope not as I am getting good with C# It is pretty straight forward. Maybe there is a compiler that will do what I need.
Thanks in advance.
Regards
Rick Osburn
p.s.
I am famillar with windows ce but I dont want to mess with the licensing fees just want to burn
it into a Eprom.
|
|
|
|
|
The only way to write a .NET app is using MSIL, or to buy an expensive compiler that goes to native code. Your other option is to learn C++.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hai Friends
I want to hide a application process in the task manager from the process list.
It only for the security purpose, the user could not be uninstalled or end the process from the process list and also remove from the Control Panel once it installed.
thank you
Vasanth.A
|
|
|
|
|
If you install the service/application in "SYSTEM" Mode, it can only be killed from administrator. If your user doesn't have any admin right, then your user cannot kill the process.
|
|
|
|
|
I installed the process in the Administrator System ie it is one of the server but it is not a main server. The main server track all the action of that particular system.
so if it is possible to uninstall or kill my application in that client then how i track him.so i want to hide my process in that installation system.
The main thing is he cannot kill my process even he is admin of that particular area.
thanks
Vasanth.A
|
|
|
|
|
|
... and you'll get no help from me writing one.
And trying to do it in C# is just dumb.
|
|
|
|
|
What possible legitimate reason could you have for wanting to do this? Nobody is about to publish something on a public forum that will allow you to write a virus. Even if you don't want to write one, simply making this information available here would allow others to do it.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
There is no way to hide the app from Task Manager. Your only hope is to prevent the user from running Task Manager, which is easily done in Group policy.
But, if the user is an admin on the machine, he can still use command line tools to find and kill the app.
|
|
|
|
|
Hi,
How is it possible to start a powershell script on a remote machine using process.startinfo with username, password and domain details.
something like:
System.Diagnostics.Process process = new System.Diagnostics.Process();
process.StartInfo.FileName = "powershell";
process.StartInfo.Arguments = Servername;
process.StartInfo.Domain = Environment.UserDomainName;
process.StartInfo.UserName = txtUsername.Text.Trim();
Thanks
|
|
|
|
|
arkiboys wrote: How is it possible to start a powershell script on a remote machine using process.startinfo with username, password and domain details.
I believe you've been told every time you've asked this that this isn't really possible because it represents a major security flaw.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
|
Hi,
I'm writing an application to run in background to fully control multiple mouse click/movement. (Raw input)
For example, If I click a button, nothing should happens unless i tell it to (i.e. it won't give focus to some other application when i click the left button without my permission, even if I'm outside of my application boundary or when at the invisible/transparent part of the application, or my application is running in background).
I'm currently clueless where I should start, please give me some direction.
Thanks.
|
|
|
|
|
Thats a nasty set of requirements, I suggest you post some reasonable explanation why you need to TAKE OVER your users machine.
There are also Kiosk type applications[^] that may beet your needs
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Im taking my own machine... Basically, I need to allow multiple mouse, but since windows wouldnt allow this normally, so Im thinking of writing an application (fully transparent) which be able to track the mouse movement/block input so that I can draw another fake pointer to act as second mouse... Not sure if this make much sense??
|
|
|
|
|
|
Hi,
I am using Microsoft Indexing services in C#
everything doing well but i have no idea
How to Used wild card Character to extract/Find Content of Documents.
for example Like operator usage in Contents column.
This is Simple Query to used like operator in FileName.
SELECT * FROM WEBINFO Where filename like '%pdf'
But I want to used like operator in contents search column.
SELECT * FROM WEBINFO Where Contents like 'abc%'
abc
abcd.
abcxyz.
abcddd.
|
|
|
|
|
You may be able to cheat and use:
<s>SELECT * FROM WEBINFO Where REVERSE(filename) like '%pdf'</s>
Fixed that
SELECT * FROM WEBINFO Where REVERSE(filename) like 'fdp%'
Last modified: 2hrs 11mins after originally posted --
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I have mutiple files in a catalog.
i want to find files content/keyword but Using Like Operator/Wildcard.
|
|
|
|
|
I had a BHO.
When a web page is opened on IE, I try to replace the HTMLElement's text using
foreach (IHTMLElement HtmlElemen in (IHTMLElementCollection)document.body.all)
{
try
{
HtmlElemen.GetType().GetProperty("innerText").SetValue(HtmlElemen, "NewText", null);
}
catch(Exception e)
{
System.Windows.Forms.MessageBox.Show("Message:" + e.Message );
}
}
In some PC's the html element's text is replaced successfully with "Newtext",
but in some PC's it is not replacing.
And an exception message is obtained "Object reference not set to an instance of an object. "
How to fix this exception?
foreach (IHTMLElement HtmlElemen in (IHTMLElementCollection)document.body.all)
{
try
{
Type type =HtmlElemen.GetType();
if(type !=null)
{
type.GetProperty("innerText").SetValue(HtmlElemen, "NewText", null);
}
// same way check Innertext also has not null reference then set value to taht.
}
catch(Exception e)
{
System.Windows.Forms.MessageBox.Show("Message:" + e.Message );
}
}
If I try this code , a message(exception ) is obtained.
Message:Exception has been thrown by the target of an invocation.
I think, I was missing some assembly, what is it to get executed.
May anyone help?
|
|
|
|
|
Hi,
I don't think this is a problem with a missing assembly. As you already mentioned you should check wether the innerText-Property is set or not.
Do this by:
if(null != type) {
if(null != type.GetProperty("innerText")) {
...
}
}
That should fix the problem.
Regards
Sebastian
|
|
|
|