|
Have you done anyting according to this:
DialogResult result = loginForm.ShowDialog();
if(result == DialogResult.Ok)
{
}
else if(result == DialogResult.Cancel)
{
this.Close();
}
or else you might try in loginforms cancel button clicked event:
public void buttonCancel_OnClicked(object sender, EventArgs e)
{
(this.Parent as Form).Close();
this.Close();
}
-Larantz
|
|
|
|
|
hi Avadhesh,
So what do you want??
vtkiet05
|
|
|
|
|
Hi
I want the reason and solution to fix it.
Regards
Avadhesh
|
|
|
|
|
I think what he means is to please elaborate on your problem... It's not quite clear what you are asking.
-----
*** Never give me an answer having anything to do with Visual Studio. I don't have this because I have two computers, one being my dad's mac, which is connected to the internet, the other being my pc, which is, sadly, not connected to the internet. The setup for the Visual C# program I think is called a "bootstrap" program, and it needs to connect to the internet to install the program. THEREFORE I cannot install this program onto my pc.***
|
|
|
|
|
i want an asp.net starter kit to build a company web portal.a web portal that contains Links,discussion forum, admin module, employee information, newsletter, announcement, picture gallery,user blogs,articles, roles and permission.
|
|
|
|
|
Does google not work where you live ? Or are you not talking about the web dev starter kit from Microsoft ? I can't imagine what else you'd want, tho.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Dear Experts,
I have a file contains the content:
<a class="asubmenu" href="index.php?act=area_link&act2=article_detail&category_id=1&pro_id=3&category_sub_id=57&article_id=16823">
<a href="index.php?act=area_link&act2=article_detail&category_id=1&pro_id=3&category_sub_id=57&article_id=16823" class="asubmenu">
<a class="desclink" href="index.php?act=area_link&act2=article_detail&category_id=1&pro_id=3&category_sub_id=57&article_id=16823">
I want to get : href="index.php?act=area_link&act2=article_detail&category_id=1&pro_id=3&category_sub_id=57&article_id=16823"
How can i help me?
Thank in advance
vtkiet05
|
|
|
|
|
It depends. Do you want to JUST search for that string ? You don't need regex for that, obviously. What bits are open to differ ? When you say 'get', what bits, if any, do you want to group ?
www.expresso.com is an awesome tool for writing regex
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Thank for your reply.
I scanned the site and i know that that site contained those hyper links
I have a exp:
string exp = "<a href\\s*=\\s*(?:\"(?<1>[^\"]*)\"|(?<1>\\S+))";
this exp works fine and result is "<a href="index.php?act=area_link&act2=article_detail&category_id=1&pro_id=3&category_sub_id=57&article_id=16823"
but i want only result is "index.php?act=area_link&act2=article_detail&category_id=1&pro_id=3&category_sub_id=57&article_id=16823"
can you help me fix the above exp??
Thank in advance
vtkiet05
|
|
|
|
|
Hi Christian,
I fixed:
Change the string exp = "<a href\\s*=\\s*(?:\"(?<1>[^\"]*)\"|(?<1>\\S+))" to
string exp = "<a href\\s*=(\\s*(?:\"(?<1>[^\"]*)\"|(?<1>\\S+)))";
and the result is "index.php?act=area_link&act2=article_detail&category_id=1&pro_id=3&category_sub_id=57&article_id=16823"
Source code:
string exp = "<a href\\s*=(\\s*(?:\"(?<1>[^\"]*)\"|(?<1>\\S+)))";
// Create an instance of StreamReader to read from a file.
// The using statement also closes the StreamReader.
string line = "";
using (StreamReader sr = new StreamReader("temp.txt"))
{
line = sr.ReadToEnd();
sr.Close();
}
Regex regx = new Regex(exp, RegexOptions.IgnoreCase | RegexOptions.Compiled);
Match m = regx.Match(line);
while (m.Success)
{
string t = m.Groups[1].Value;
m = m.NextMatch();
}
(-,-)
vtkiet05
|
|
|
|
|
Is there a way to change the appearance of a form? For example, when you view iTunes in Windows, the form is gray.
-----
*** Never give me an answer having anything to do with Visual Studio. I don't have this because I have two computers, one being my dad's mac, which is connected to the internet, the other being my pc, which is, sadly, not connected to the internet. The setup for the Visual C# program I think is called a "bootstrap" program, and it needs to connect to the internet to install the program. THEREFORE I cannot install this program onto my pc.***
|
|
|
|
|
you change the color by setting it in the designer. There are many other properties you can set there. I recommend buying a book on Winforms.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Signature... v v v
-----
*** Never give me an answer having anything to do with Visual Studio. I don't have this because I have two computers, one being my dad's mac, which is connected to the internet, the other being my pc, which is, sadly, not connected to the internet. The setup for the Visual C# program I think is called a "bootstrap" program, and it needs to connect to the internet to install the program. THEREFORE I cannot install this program onto my pc.***
|
|
|
|
|
OK - you and I have covered at length before the various ways you can get the VS2005 C# Express Edition, however - all the designer does is expose properties on the form, you can set those properties in code yourself, if you need to.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Ever thought about using another IDE, like SharpDevelop, for example?
I'm pretty sure, SharpDevelop can be installed without an active internet connection and does have designer support.
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
yeah, but I kind of like typing the code in by myself.
-----
*** Never give me an answer having anything to do with Visual Studio. I don't have this because I have two computers, one being my dad's mac, which is connected to the internet, the other being my pc, which is, sadly, not connected to the internet. The setup for the Visual C# program I think is called a "bootstrap" program, and it needs to connect to the internet to install the program. THEREFORE I cannot install this program onto my pc.***
|
|
|
|
|
There's a word for this: Masochism.
Sure, you can build .NET applications using Notepad and csc.exe, but why not use the possibilities the platform gives you?
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
OK, I finally got VS to install on my computer.
If I had a sig, it would probably go here.
|
|
|
|
|
What does [STAThread] mean? I've seen it in examples, and I was wondering what it was.
-----
*** Never give me an answer having anything to do with Visual Studio. I don't have this because I have two computers, one being my dad's mac, which is connected to the internet, the other being my pc, which is, sadly, not connected to the internet. The setup for the Visual C# program I think is called a "bootstrap" program, and it needs to connect to the internet to install the program. THEREFORE I cannot install this program onto my pc.***
|
|
|
|
|
Windows has a notion of "Appartments"; STA stands for Single Threaded Appartment,
MTA for Multi Threaded Appartment.
It is a complex matter. IIRC in general MTA will allow for more concurrency between threads
(and more concurrency problems), whereas STA enforces several things to happen
sequentially, such as several threads accessing the same COM object.
Either read up on "Appartment model", or wait for it to become really relevant to you,
then study it in detail...
|
|
|
|
|
This is kind of a tough problem... I'm trying to make a function that will give me the point (in x, y format) on a circle at x degrees. I was thinking somewhere along the lines of...
public Point GetPointOnCircle(int circleX, int circleY, int circleWidth, int circleHeight, int degrees) {
return new Point(x, y);
}
I've tried to make it on my own, but it's just not working for me... Does anyone have any ideas?
-----
*** Never give me an answer having anything to do with Visual Studio. I don't have this because I have two computers, one being my dad's mac, which is connected to the internet, the other being my pc, which is, sadly, not connected to the internet. The setup for the Visual C# program I think is called a "bootstrap" program, and it needs to connect to the internet to install the program. THEREFORE I cannot install this program onto my pc.***
|
|
|
|
|
The way to do this is trig. If you know the centre point, then you can build right angle triangles from there and use trig to determine both the x and y point of the triangle for a given angle, use the radius as the length of the hypotenuse. In this way, you can plot your points by stepping around in a circle.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
It's not tough at all if you've done some algebra in high-school.
What you want is to convert polar coordinates to rectangular coordinates.
Skipping all the explanations, the coordinates of the point will be:
x = r * cos(u)
y = r * sin(u)
,where r is the radius of the circle and u is the angle measured beginning from "3 o'clock" and going counterclockwise.
|
|
|
|
|
One small additional hint: the angle has to be in radians ( 0 - 2*π ), not degrees.
I think this must be said because max12345 seems not to be familiar with elementary trigonometry at all.
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
I am attempting to write an image (System.Drawing.Image) to a MemoryStream using the supplied Image.Save(Stream, Format) command. I am doing this to add the image as an attachment to an email to be sent later. However the save command appears to be having no effect as the stream is empty after the command is executed. If someone could help me or tell me a better way to do this it would be greatly appreciated.
This is the code:
MemoryStream stream = new MemoryStream();
picture.Save(stream, picture.RawFormat);
int x;
while ((x = stream.ReadByte()) != -1)
Console.Write(x); //nothing get written
//Attachment attachment =
// new Attachment(stream, "Picture.jpg", "image/jpeg");
|
|
|
|