|
How to open the form like pop-up alertation of some softwares (but the form must open(appears) from down to up )!!
|
|
|
|
|
what about doing your project for you?!!!!!!!!!!!!!!!!!!!!
|
|
|
|
|
I am doing a very big project.
If can help ,Please do a favor and help me instant of ......
Thanks for help!!
So what should i do now?
|
|
|
|
|
Create the instance of the form you want to show and then use ShowDialog method to display it. In that form, handle the paint event and change the location of the form by same amount till it gets to the needed position. I am not sure how smooth the movements will be but I hope it would depend on the amount by which you move the form.
"No matter how many fish in the sea; it will be so empty without me." - From song "Without me" by Eminem
|
|
|
|
|
Thanks !
I finsihed it:
private void Form1_Load(object sender, EventArgs e)
{
Point p = new Point(Screen.PrimaryScreen.WorkingArea.Width - this.Width, Screen.PrimaryScreen.WorkingArea.Height - this.Height + x);
this.Location = p;
timer1.Enabled = true;
timer1.Interval = 1;
}
int x = 388;
private void timer1_Tick(object sender, EventArgs e)
{
if (x == 0)
{
timer1.Enabled = false;
this.Close();
}
else
{
Point p = new Point(Screen.PrimaryScreen.WorkingArea.Width - this.Width, Screen.PrimaryScreen.WorkingArea.Height - this.Height + x);
this.Location = p;
x--;
}
}
|
|
|
|
|
Hi all,
Let's say I have a class called myClass, the following code is fine:
myClass myInstance = new myClass();
if (myInstance == null)
However, the following code will not compile:
myClass myInstance;
if (myInstance == null)
The above will give a compile error (Use of unassigned local variable 'myInstance')
My question is, can I make a class nullable so that the above code will compile and work?
|
|
|
|
|
Dewald wrote: myClass myInstance;if (myInstance == null) //some code here that I do want to execute if the variable has not been instantiated
change it to:
myClass myInstance = null;
if (myInstance == null)
|
|
|
|
|
Ha! Such a simple solution. Thanks, that's exactly what I wanted and I feel rather silly not to have known it.
|
|
|
|
|
Dewald wrote: Such a simple solution
well, answers and questions are always simple and easy... its the combination of those which is deadly
cheers!!
|
|
|
|
|
The Nullable stuff applies to value types; reference types are always nullable, as a reference can be null, you don't need anything new for this.
Your compiler error message told you "use of unassigned local variable", which is correct as "myInstance" in your second snippet did not have a value assigned, not even null. (in C# class members have a default value, local members don't).
myClass myInstance=null;
...
if (myInstance == null) ...
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that. [The QA section does it automatically now, I hope we soon get it on regular forums as well]
|
|
|
|
|
|
|
You're welcome.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that. [The QA section does it automatically now, I hope we soon get it on regular forums as well]
|
|
|
|
|
Hi, I need to strip out text from a big file and my condition is:
I need to strip out text from below
<pre>
<div class="a">apple</div>
<p>&nbsp;&nbsp;</p>
<p>red delicious</p>
<div class="b">banana</div>
<p>&nbsp;&nbsp;</p>
<p>riped banana</p>
<div class="c">chives</div>
<p>&nbsp;&nbsp;</p>
<p>fresh green chives</p>
</pre>
to below
'apple', 'red delicious'
'banana', 'riped banana'
'chives', 'fresh green chives'
so that i can enter each of them to database. I would really appreciate if you could please provide me a regex that could do this. thanks for your help!!!
modified on Tuesday, January 26, 2010 11:43 PM
|
|
|
|
|
you can edit (i.e. modify) an earlier message if you decide you need to fix an error, improve formatting, or add information.
Now please go and delete your other messages before someone attempts to read and answer them.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that. [The QA section does it automatically now, I hope we soon get it on regular forums as well]
|
|
|
|
|
At the very least, you could use Linq-to-XML to do this. Don't use Regex to parse HTML.
The class you're going to want to look at is XElement .
.45 ACP - because shooting twice is just silly ----- "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." - J. Jystad, 2001
|
|
|
|
|
Hello, this is one off process and the html is stored in a csv file. I crawl a site, store each web page in csv. the url is something like www.mysite.com.au/product/product.asp?id={0} now i am storing all html for each product page in one csv. now i want to delete all the text except from the one that i wanted. could you please help how can i acheive this with regex?
|
|
|
|
|
|
but its not a valid html or xml file. its a csv file and there is lots of work to get the html or xml validation to work. any other idea or suggestions?
|
|
|
|
|
It doesn't have to be a xml/html file. It just needs to be a properly formatted XML string. Trust me - regex is not the answer.
.45 ACP - because shooting twice is just silly ----- "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." - J. Jystad, 2001
|
|
|
|
|
formatting takes ages. my element doesnt have a id. why would you come to the conclusion regex is not an answer? when i know all the text is going to be in same format?
|
|
|
|
|
I've been playing with this library (.NET 3.5 SP1 version) and trying a few snippets from various blog posts. I've also asked in the MSDN Rx forum.
This works fine
var observable = Observable.Empty<int>()
.StartWith(1)
.StartWith(2)
.StartWith(3);
observable.Subscribe(Console.WriteLine);
These produce no output
var enumerable = Enumerable.Range(1, 10);
var observable = enumerable.ToObservable();
observable.Subscribe(Console.WriteLine);
var observable = Observable.Generate(
1,
value => value <= 10,
value => value,
value => value + 1);
observable.Subscribe(Console.WriteLine);
What am I missing?
Kevin
|
|
|
|
|
|
Hi,
I need my installation project to work in a specific way. there are some folders containing files. I don't always want to install all the folders. Also I don't want to build the setup everytime, so is there a way i can use ini file or xml file to customize my setup installation. I should be able to configure the folder names and only those specific configured folders should be installed.
Thanks.
|
|
|
|
|
Any time you want to exceed the capabilities of the built-in setup builder, you should consider using an external utility, such as Inno Setup.
.45 ACP - because shooting twice is just silly ----- "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." - J. Jystad, 2001
|
|
|
|