|
I see, ! You meant Visual Studio .NET 2003 full version, right ? But I dont have that version. I am using C# Express 2005, which is free and it doesnt come up community edition of Dotfuscator.
Anyway, Thanks for the information.
|
|
|
|
|
Hi,
how can i switch between 2 window forms? In my Form1 i have a button and if i press
it should open Form2 and close the Form1 i can open the Form2 but if i try to close the first form
it wouldn't work
probably a stupid question but i'd love to know how it works
i think i have to use some MDI functions...
|
|
|
|
|
Show me the fragment of your code and i'll help you...
|
|
|
|
|
but i don't really have the code...
i know i can make a new form with:
Form frmname = new Form();
and show it with frmname.Show();
but thats not the form i want to load...
i made a new "Windows Form" with "Add New Item" so you can see a Form2.cs in the solution explorer... and i want to switch from Form1 to Form2 if it's possible. 
|
|
|
|
|
Given your really good description (it wouldn't work) I can only guess what is happening. I think that Form1 is your startup form. If you close it the whole application will close.
There are several possibilities:
1. Hidden startup form
- Make a hidden Form which is your startup Form (that one mentioned in the Main method).
- In it's constructor/Load-event open up Form1
- Now you can safely close Form1 without terminating the application
2. Don't switch teh Form - just its contents
- If the two Forms have matching size than you could create two user controls instead and add/remove them from the startup form.
|
|
|
|
|
Well, u can hide the form1. set Form1.visible = false
---
Eat Bytes Everyday
Zakaria Bin Abdur Rouf
zakaria7@gmail.com
|
|
|
|
|
Hello all,
I am using C# 2.0, in my winApp. I am getting the HTML Data. I need this in string format. I don't want to use browser control.
how to achieve this. anybody any sounds
plz help me
regards
GV Ramana
|
|
|
|
|
How are you receiving the HTML data? If it's a stream, you can convert that to a string using some of the encoder classes in System.Text namespace.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Is Jesus the Jewish Messiah?
The apostle Paul, modernly speaking: Epistles of Paul
Judah Himango
|
|
|
|
|
thx for reply
my application is mail reading appliclation, so mails will come
in the form of html.
this html i want to convert to normal data(string)
how to do this
regards
GV Ramana
|
|
|
|
|
The question is, how is the HTML data formatted? What type is the HTML data, in your .NET code? If it's binary, you'll need to convert it from byte[] to string using System.Text.Decoder and its derivatives.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Is Jesus the Jewish Messiah?
The apostle Paul, modernly speaking: Epistles of Paul
Judah Himango
|
|
|
|
|
Your problem is you are interpting the "normal data" to mean "string" which if it is in the form of Html *is not* string at all. After all, this page is all Html and it has far more stuff than just "string". So what is it that you are really after? If you just want to do raw text processing you might want to look at WebRequest /WebResponse instead.
|
|
|
|
|
|
Hi,
StringParser is very good.
but there is no constant html data. html data will comes differently.
how to convet this.
regards
GV Ramana
|
|
|
|
|
I don't understand the sentence "there is no constant html data. html data will comes differently". But if you want an HTML-free version of a string that contains HTML, do this:
string strWithHtml = "...";
string strWithoutHtml = StringParser.removeHtml (strWithHtml);
/ravi
My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com
|
|
|
|
|
sounds good.
ravi, really ur parser is very good.
plz send me links of other articles by you.
regards
GV Ramana
|
|
|
|
|
Hi,
I'm trying to insert a watermark witha a Word Add-in. I'm using a variant
of Paul Stubbs code that i found from a Google. The method I'm using is as
follows:
private void addWatermark(Word.Document doc, string WatermarkText)
{
doc.Application.ActiveWindow.View.Type = Word.WdViewType.wdPrintView;
doc.Sections[1].Range.Select();
doc.ActiveWindow.ActivePane.View.SeekView =
Word.WdSeekView.wdSeekCurrentPageHeader;
Word.Selection Selection = doc.Application.Selection;
Word.Shape wmShape;
//Create the watermark shape
Object missing = Type.Missing;
wmShape = Selection.HeaderFooter.Shapes.AddTextEffect(
Microsoft.Office.Core.MsoPresetTextEffect.msoTextEffect1,
WatermarkText, "Times New Roman", 1,
Microsoft.Office.Core.MsoTriState.msoFalse,
Microsoft.Office.Core.MsoTriState.msoFalse,
0, 0, ref missing);
//Set all of the attributes of the watermark
wmShape.Select(ref missing);
wmShape.Name = "PowerPlusWaterMarkObject1";
wmShape.TextEffect.NormalizedHeight =
Microsoft.Office.Core.MsoTriState.msoFalse;
wmShape.Line.Visible = Microsoft.Office.Core.MsoTriState.msoFalse;
wmShape.Fill.Visible = Microsoft.Office.Core.MsoTriState.msoTrue;
wmShape.Fill.Solid();
wmShape.Fill.ForeColor.RGB = (int)Word.WdColor.wdColorGray25;
wmShape.Fill.Transparency = 0.5f;
wmShape.Rotation = 315.0f;
wmShape.LockAspectRatio = Microsoft.Office.Core.MsoTriState.msoTrue;
wmShape.Height = doc.Application.InchesToPoints(2.82f);
wmShape.Width = doc.Application.InchesToPoints(5.64f);
/*
wmShape.WrapFormat.AllowOverlap = -1; //true
wmShape.WrapFormat.Side = Word.WdWrapSideType.wdWrapBoth;
wmShape.WrapFormat.Type = Word.WdWrapType.wdWrapNone; //3#
*/
wmShape.RelativeHorizontalPosition =
Word.WdRelativeHorizontalPosition.wdRelativeHorizontalPositionMargin;
wmShape.RelativeVerticalPosition =
Word.WdRelativeVerticalPosition.wdRelativeVerticalPositionMargin;
wmShape.Left = (float)Word.WdShapePosition.wdShapeCenter;
wmShape.Top = (float)Word.WdShapePosition.wdShapeCenter;
//set focus back to document
doc.Application.ActiveWindow.ActivePane.View.SeekView =
Word.WdSeekView.wdSeekMainDocument;
} // end addWatermark
The problem i have is that I get an exception at line:
wmShape.WrapFormat.AllowOverlap = -1;
this excpetion indicated that the method or property is not available
because the drawing operation cannot be applied to the current selection?????
Any help greatly appreciated!!! Thnx, tc
|
|
|
|
|
I'm getting very often but not always some kind of error dialog when I quit my app in C# that uses some COM objects. Unfortunately I can't tell what it is because when it pops up the application closes in like 10th of a seccond and I can't see what's the dialog about. This is release build. Debug doesn't report anything in debugger on exit ever. I understand it's very vague but I still need help and hope someone here can help me. How to catch the error?
Thanks a lot for help in advance!
|
|
|
|
|
Hi!
Have you tried catching a ThreadException in your main thread?
Could be worth a try...
Regards,
mav
--
Black holes are the places where god divided by 0...
|
|
|
|
|
Yeah. But exception seems to pop up after main - when GC is collecting - i'm thinking - and there's no way to trap that.
|
|
|
|
|
It is possible to set a break point at the bottom of your main on Closing for the main form. Or if worse comes to worse, create a temporary button that behaves like "Quit" with your break point there.
|
|
|
|
|
But exception seems to pop up after main in - when GC is collecting - i'm thinking - and there's no way to trap that.
|
|
|
|
|
Try catching the exception raised by Application.Run() in a try catch block or handle the Application.ThreadException event.
Graham
|
|
|
|
|
I too periodically see an error dialog flash when I quit my application. It seems to have started after I overrode WndProc to perform some custom drawing in a List View control, and doesn't seem to occur with any consistency. My gut says the window handle is being disposed while some of the painting routines are using it, but in all honestly I don't know enough and shouldn't even speculate.
If you find a way to "capture" what the error dialog says, let me know.
Regards,
Chris
-- modified at 23:42 Monday 24th April, 2006
|
|
|
|
|
I think, that you've forgot to dispose some GDI+ objects. For example, Graphics
Best regards, Alexey.
|
|
|
|
|
I think, that you've forgot to dispose some COM objects. Try to set them null value.
To see this error, try to set Thread.Sleep(time); after Application.Run(...) with time in milliseconds.
Best regards, Alexey.
|
|
|
|