|
how can i make the system restart after installing?c# installer can do this?thanks.
|
|
|
|
|
You can't make an installer force a reboot directly from visual studio project, you need to modify the installer that gets created.
A tool called [annoyingly] Orca is useful, it lets you modify the installer:
http://support.microsoft.com/kb/827020[^]
You'll need to do this every time you re-build the installer package
|
|
|
|
|
keefb,thank you very much!
|
|
|
|
|
Hi guys.
How can I create a RightToLeft ListView like this[^] instead of this one[^] ?
I've changed its RightToLeft property to Yes , but it isn't the one that I need ?
Could you please guide me ?
Thanks
|
|
|
|
|
Have a look at this[^].
Regards
Nuri Ismail
|
|
|
|
|
Hi forum!!!
I have the next question...
i have in my proyect in c#, a form with a picturebox (with a image loaded), and I need to create over my image a floating object which I can to move over my image. this floating object is like the objects in power point (put a rectangle, circle, some shapes) to change its properties with the mouse (width, heigth,...)
How I can do it?
|
|
|
|
|
You can draw on picturebox control using the Graphics object. Here is an example code fragment:
Graphics gr = pictureBox1.CreateGraphics();
Rectangle rect = new Rectangle();
rect.X = pictureBox1.ClientRectangle.X + pictureBox1.ClientRectangle.Width / 4;
rect.Y = pictureBox1.ClientRectangle.Y + pictureBox1.ClientRectangle.Height / 4;
rect.Width = pictureBox1.ClientRectangle.Width / 2;
rect.Height = pictureBox1.ClientRectangle.Height / 2;
gr.DrawRectangle(new Pen(Color.Red), rect);
.....
You can use the MouseDown , MouseMove and MouseUp events for the picture box, to make the object floating or to change its width and height with the mouse.
Regards
Nuri Ismail
|
|
|
|
|
Hello Nuri Ismail
Thanks for your answer, but how can I do to make transparent this control, like the powerpoint objects.
In power point there are a lot of objects with diferents shapes.
how can i create this objects to uses it in my form, and access to them to modify its properties???
Thanks.
|
|
|
|
|
you can use the event 'mousemove' 'mouseover' to catch it .
in mousemove event , you can get a parameter(e).
e.x is width, e.y is height
modified 27-May-14 5:28am.
|
|
|
|
|
Hi, you can first creat a div, then let it move like this:
function Movediv() {
var div = document.getElementById(g_DivName);
var xx = new Array();
var speed = 1; //distance
var speed2 = 20; //interval time, 10ms
xx.push(0);
//xx.push((document.documentElement || document.body).offsetWidth - div.offsetWidth - 20);
xx.push((window.innerWidth || document.body.clientWidth) - div.offsetWidth - 30);
var x = parseInt(div.style.left.replace(/^(\d+).*?$/, "$1"));
div.style.left = x + speed * g_MoveDirection + "px";
if (x <= xx[0]) { g_nMoveDirection = 1; }
else if (x >= xx[1]) { g_MoveDirection = -1; }
//setTimeout("Movediv()", speed2);
}
modified 27-May-14 5:28am.
|
|
|
|
|
Hi friends,
I tried to draw graphics on a transparent form by using the Transparency key.
"this.BackColor = Color.Blue; this.TransparencyKey = BackColor;".
The problem is, it is working fine with Vista. But when I am using the same code to draw on XP, it is not working. I am using visual studio 2008, so is there a compatability problem?
|
|
|
|
|
Hmm.. I never used tranparency key before. But in XP, I use property Opacity for transparency. Set it from 0% to 100%.
|
|
|
|
|
Yeah, I tried the solution first by setting the opacity, but when I am setting the opacity to the from, the drawings (graphics) are also becoming opaque, thats why I used the Transparency key.
|
|
|
|
|
you want to set the form's background color to transparent.
1) so you can set the form to Irregular Form.
2) or you can set the form's background color to transparent
modified 27-May-14 5:28am.
|
|
|
|
|
Hello,
i want to make a very variable user interface for my applications, i would need to have the ability like in wpf to put graphics and contorls into my forms and arrange them without boundaries. In most GUI-toolkits you can only put your Controls into tables or other panels, but i want to arrange them freely.
Is there a GUI Toolkit for it? Is there one with Mono-Compatibility? Or is there a way to put Images over Images in Winforms too (2 transculent PNGs).
Another Problem is, that WinForms looks in Mono really Win95-like. Is there a control-kit which doesn't looks like that?
Many thanks
|
|
|
|
|
You could use Silverlight: it's WPF-Like and compatible with MONO through Moonlight.
You can see how run a Moonlight desktop application here.
|
|
|
|
|
Well i love WPF and Silverlight, but the problem is, that under mono i have no WPF, only like you've said Moonlight. But i really need complete File System Access and Reflection and so on, and that isn't possible with Silverlight/moonlight
|
|
|
|
|
Yes, that's true.
Mono has a page on available GUI toolkits, maybe one of them has what you need.
|
|
|
|
|
I've tested a few of them, but all of them aren't really easy to use and of course not really for beautiful applications.
I think i'll create a own GUI Framework based on WinForms/GDI. For example a button, which get's it's style from a PNG-image. So i haven't the Win95 GUI in Linux and Mac OS X.
|
|
|
|
|
in winForm or WebForm?
do you want to set form boundaries freely?
(WinForm)
if you want to set form , you can use
GraphicsPath path .....
this.Region = new Region(path);
to set form's boundaries.
(WebForm)
you can use 'Css' to solve it.
modified 27-May-14 5:27am.
|
|
|
|
|
I want to have a richtextbox control with maximum line limit. More briefly a FIFO functionality in a richtextbox control. After a maximum number of line, the first line will be removed and so on. How would I achieve this? any idea?
Thanks in advance.
|
|
|
|
|
Count the number of lines before adding a new one. If you're beyond the maximum of entries allowed, ditch the last line
|
|
|
|
|
There is an event to catch it. When the text changes, the event will be handled.
Then you check the lines of the richtextbox.
modified 27-May-14 5:28am.
|
|
|
|
|
this is the constructor
public set(int[] intSet)
{
this.boolSet = new bool[101];
for (int i = 0; i < intSet.Length; )
{
if (!(intSet[i] < 0 && intSet[i] > 100))
{
boolSet[intSet[i]] = true;
i++;
}
else
{
Console.WriteLine("This doesn't work");
}
}
}
I noticed that i is always equal to zero
Also..
public override string ToString()
{
Console.Write("this is the array: ");
int i = 0;
while( i < boolSet.Length)
{
if (boolSet[i])
{
Console.Write(" " + (i+1));
}
i++;
}
Console.WriteLine("");
return base.ToString();
}
This makes the boolean entry into a string to be printed, I have a random numbers coming through, there is always a 1 appearing in the array, if I take out the + 1 it will just be zero...
any help would be appreciated.
And yes, I know List would be good but this is an assignment and they want us to use array and to overwrite the ToString.
I am at a loss.
|
|
|
|
|
Hi,
I didn't get your question? What is your concrete problem?
Regards
Sebastian
|
|
|
|