|
thanks Ravi Bhavnani
Can you say me how to use it ?
thanks .
|
|
|
|
|
You'll need to select an appropriate menu and follow the directions at that page.
/ravi
|
|
|
|
|
I need to stretch a character width horizontally in rich text box - Visual c# - framework 2.0.
Thanks in Advance
Charles Pratheepan
|
|
|
|
|
Do you mean that you have some random text and that you have to adjust the fontsize to make the text fit the width of a rich textbox?
-Larantz-
|
|
|
|
|
Yes .... I want to increase the font width alone.
|
|
|
|
|
Uhm. Not sure if that's possible. Setting width alone would end up in unreadable characters.
You would have to set the full font size for it to give any meaning I believe.
You can solve that through a recursive method or other form of loop where you use Graphics MeasureString method with a userdefined font and the width of your textbox. For each iteration, if width of the size returned by MeasureString is still larger then your textboxs width, reduce fontsize by 0.5 for instance.
-Larantz-
|
|
|
|
|
There is a way to achive the same in Framework 3.0 ....
Some stretch property is available for fonts...
Is there any equivalent method or property available in framework 2.0?
|
|
|
|
|
Hello,
If I have a string: xxxxxxImg3.xxx, where x can be anything, and number changes.
How can I specify it using Regex expression?
Thanks.
|
|
|
|
|
Which part of the string do you want to get?
This will filter the Img{digit} part:
Img\d+\.
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
I want to get the Img# part, and I wanted to group the number part, so later I can get a handle on it. I tried to use: (?<imagenumber>[1-9]*), but that did not work.
Thank you.
|
|
|
|
|
Img(?<number>\d*)\.
(* allows 0 to infinite digits, + requires at least one digit)
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
|
I am trying to get a splash screen to fade out using
Splash.Opacity = .50 But the error list tells me that "An object reference is required for the nonstatic field, method, or property 'System.Windows.Forms.Form.Opacity.get'" At the top of my program i have written
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Text;
using System.Threading;
using System.Windows.Forms;
and my references are: System, System.Data, System.Deployment, System.Drawing, System.Windows.Forms, and System.Xml.
What reference am i missing or how else should i assign the opacity?
Thanks in advance.
|
|
|
|
|
Not that kind of reference.
You need a reference to an instance of an object.
Apparently you are calling it from a static method, perhaps from Main.
try something like:
<br />
Form myForm = new MyForm ( ... ) ;<br />
<br />
myForm.Opacity = .50 ;<br />
|
|
|
|
|
Ok. I tried what you said, and it says it isn't a problem anymore, but it doesn't fade at all. I first declared "Splash SplashScreen = new Splash();" then under Form1 i put
InitializeComponent();
Form Splash = new Splash () ;
int SpOpac = 0;
Splash.ShowDialog();
while (SpOpac < 100)
{
Thread.Sleep(100);
SpOpac = SpOpac + 1;
Splash.Opacity = SpOpac;
}
Splash.Close();
I must still be doing something wrong. But what?
Thanks for the help.
|
|
|
|
|
The UI thread is too busy (stuck in your while loop) to redraw your splash screen. Instead of using a while loop to change the opacity, add a Timer component to your splash form. You can do this in the Visual Studio Forms designer. Set its Interval property to an appropriate time, maybe 100 (milliseconds). Then setup the timer.Tick event handler. EAch time timer.Tick fires, increase the opacity by a little bit until it gets to 1.
p.s. Opacity is a double, not an int. 0 is completely transparent, 1 is fully opaque. So halfway transparent would be 0.5.
p.p.s. optionally, you can try adding a Splash.Update() call right after setting it's opacity. It probably isn't the best way to do it though.
|
|
|
|
|
Doesn't Opacity have to decrease? And try putting it in the Load handler rather than the constructor?
|
|
|
|
|
|
You may want to consider using AnimateWindow() [^] for a smooth fade in/out effect without having to resort to a loop.
/ravi
|
|
|
|
|
Hi
i`am building a new project and i want to use an interface like the one in Microsoft Student 2006..
any ideas where i shoud start from or where i can find usefull information..
thanx
|
|
|
|
|
Perhaps if you post a screenshot of what you're trying to imitate, we'd be more open to helping you. I've never heard of Microsoft Student, so I don't know what you're trying to accomplish.
|
|
|
|
|
I have found myself yanked from the Unix systems programming world (C and assembler) to the Microsoft Windows server Administration. I now have a MS windows system on my desktop with Visual Studio 2005. I'd like to start investigating systems programming with C# (if it is possible). Unfortunately there seems to be about a bizillion books and articles available compared to the handful for Unix. Someone suggested this website and here I am. For starters I thought well "Why not do something simple like fiddle around with IIS 6.0 settings on a test system." I don't want to start a favorite author war - but I'd like suggestions if you don't mind.
Greg (shoe) Schuweiler
Systems Curmudgeon
Friendly fire isn't.
|
|
|
|
|
You'll be wanting to use WMI, google for it and you'll get plenty of examples/docs.
Try here
|
|
|
|
|
I have a custom object using the DataObjectAttribute so I can bind it to controls the GridView. Now, everything works fine, but I would like the schema to be loaded in the designer so I can pick which columns to show or not at design time. I assume this is some sort of XML I need to put together, but obviously I am phrasing my searches wrong because google is coming up empty. Does anyone have a link to an article that explains how to do this?
|
|
|
|
|
Does anyone know of a random number generator which is very fast and changes the random number at least 10 times per second? It doesn't have to be cryptographically secure, I just need one that runs very fast.
Thanks.
|
|
|
|