|
If I didn't know better, I'd swear the system was threading and it isn't keeping up with itself. If I set a breakpoint, and wait a few seconds between each step, it will work. My best indicator is that the form seems to refresh between each step (which is a pain because I have to minimize, then maximize VS in order to put VS back in the foreground to see the code to continue stepping). If I step too quickly, I will get the above error.
Machine: 2.4Ghz w/ 1G memory
|
|
|
|
|
Hi
I am new to C# and currently reading some books and very interested in buying C# 2005 but would like an advise on C# functionality before spending my money.
I am planning to make a C# application that displays HTML pages by clicking on a treeview component. HTML pages will supplied during programming. Questions:
1- What is the easiest way to display HTML document in a Windows Form
2- After building the application, will all html documents be visible in installation directory or will be compressed (just to make sure nobody edit them)
Regards, Adel.
|
|
|
|
|
Adelm wrote:
1- What is the easiest way to display HTML document in a Windows Form
Best way to display HTML in Windows Forms is to use Internet Explorer control. This control will be available in C# 2005 (like typical .Net control), but it is possible to use it in current version also (In Toolbox click on "Add/Rmove Items" and select "Microsoft Web Browser" on Com Components page).
You can navigate browser control to html page from html file, from url and also to resource of win32 dll file (something like res://C:\WINDOWS\system32\shdoclc.dll/navcancl.htm).
|
|
|
|
|
There's going to be a .Net control for the IE window in C# 2005? That's sweet. Using the Microsoft Web Browser is great and all, but sometimes it's a pain. I hope that the .Net control will be a little easier to work with. Is there anywhere where I can go to read up on it?
|
|
|
|
|
|
Thanks Tomas. I will try the beta version of C# on Microsoft web site and findout if this .net control is included.
|
|
|
|
|
hi there
i wrote a C# Application
in my pro i have some reports by Cr
in my PC every thing work fine and i can see all the reports
but when i am traying to see the reports in antother pc
its not working an i get exsptions
Crystal decion are not found something like that
maybe i need a jet engin ?
there is someone can help me ?
why i cant run the reports in antoher computers ?
i am working whit VS 2003 and the Crystal reports is bullit in .
lang C#
|
|
|
|
|
You need to visit the Crystal Reports website and register the version that came with your VS 2003. Then you need to read their install/use PDF. It tells you which files you need to include in your project and how to register the license to that project.
|
|
|
|
|
Someone wrote an article earlier this week on using PInvoke to execute x86 Op Codes from within a C# application.
For the life of me, I cannot find it. Can anyone point me in the direction to that article?
|
|
|
|
|
|
|
I have 2 treeviews in an application.While I am dragging a node from a treeview to a node in other treeview I want to get the name of these two nodes(one of is dragging node ,the other is dropped node)How can i get these nodes?
Thanks for your help...
|
|
|
|
|
Hi
I make a C# usercontrol.
in the load event of the control I want to do some work only if the control is in run time so i check for the DesignMode property:
if(DesignMode) return;
but the DesignMode is always false.
anyway to solve this ?
|
|
|
|
|
Can anyone help me to know how can I debug C# scripts? e.g. for VB/JAVA scripts we use 'Stop/debugger'(respectively) keyword & it starts debugger. Likewaise how can I start debugger from C# scripts?
Thanks from me.
|
|
|
|
|
This code should launch and attach a debugger:
System.Diagnostics.Debugger.Launch();
And then this code should signal a breakpoint to it:
System.Diagnostics.Debugger.Break();
|
|
|
|
|
Thanks for reply. this works but unfortunately does not solve my problem. When I select debugger for debugging, it launches my main program in debugger instead of script. I look fofrward to debug only script.
|
|
|
|
|
I don't really understand what you mean by script... runtime generated code? But anyways, if it's not part of the main application, I don't know of a way to debug it.
|
|
|
|
|
What might be the best way to check a string for an instance of a carriage return?
Would something like this work?
if ( s.IndexOf(Convert.ToChar(13)) > 0 )
{
//CR Found
}
Is there a better way?
|
|
|
|
|
Marginally faster (without Convert ) and correct (will also find CR at the beginning of the string):
if (s.IndexOf('\r') >= 0)
{
} mav
|
|
|
|
|
But it depends if the string was created on windows, unix or mac.
On windows you'll have \r\n
On unix, just \n
and mac just \r
so if you have unix string and search for \r you won't find new lines.
You can use Environment.NewLine to get the version of new line that your program is running on.
|
|
|
|
|
He was asking for Carriage Return, not newline character(s).
But otherwise, you're correct
|
|
|
|
|
How do you take info from a text box and send it to ones email address?
-Thanks
Wt.Hg
|
|
|
|
|
Quite easy. There's a class in the framework for this: System.Web.Mail.MailMessage .
You might want to look it up in the framework documentation.
Regards,
mav
|
|
|
|
|
I there any way that i could broadcast keyboard events?
(make it seem like a use clicked a key, when infact he didnt)
thx for the help
|
|
|
|
|
I found a way to move the mouse:
const int MOUSEEVENTF_LEFTDOWN = 0x02;
const int MOUSEEVENTF_LEFTUP = 0x04;
[DllImport("user32")] public static extern int SetCursorPos(int x, int y) ;
[DllImport("user32")] public static extern void mouse_event(int dwFlags, int dx, int dy, int cButtons, int dwExtraInfo);
private void button1_Click(object sender, System.EventArgs e) {
SetCursorPos(200,200);
mouse_event(MOUSEEVENTF_LEFTDOWN,0, 0, 0, 0);
mouse_event(MOUSEEVENTF_LEFTUP,0, 0, 0, 0);
}
can this be modified to broadcast keys?
|
|
|
|