|
hello,
i want to do some Internet Explorer programming in .net using c#
but i am not able to have the componet that i should add.
can someone guide me on this.
ASIM
Asim
|
|
|
|
|
|
Hi all !
Doing double buffer with GDI+ and Windows Form is very easy: just set ControlStyle.DoubleBuffer (AllPaintingInWmPaint, etc.) to true.
Well, my question is do we need to use a background bitmap for drawing and simply do a Graphics.DrawImage() in OnPaint() even if we enable ControlStyle.DoubleBuffer ?
Does this way improve graphics performance ?
Thanks.
--
Julian.
|
|
|
|
|
aeros wrote:
my question is do we need to use a background bitmap for drawing and simply do a Graphics.DrawImage() in OnPaint() even if we enable ControlStyle.DoubleBuffer ?
If you enable the DoubleBuffer style bits then the framework will take care of the background buffer for you, so you just draw on the Graphics object returned by the Paint event, and once you are done drawing (ie all registered handlers for the Paint event have exited) the framework will take what was drawn on the Graphics object and move it to the screen.
James
"I despise the city and much prefer being where a traffic jam means a line-up at McDonald's"
Me when telling a friend why I wouldn't want to live with him
|
|
|
|
|
Unfortunately, the DoubleBuffer style breaks the Transparency style.
|
|
|
|
|
how can i handle the column resize event of a Grid control in C# ??
|
|
|
|
|
Hello all,
I don't want my listview item to be checked when I double-click on it. I tried to catch double-click event, but it does not help me at all. The double-click event always occurs after the item checked event does.
I met another problem with listview. I used e.NewValue=e.CurrentValue in my function OnItemCheck(object sender, System.Windows.Forms.ItemCheckEventArgs e) that handles the item checked event. But e.NewValue=e.CurrentValue code does not work.
Please someone talks to me what wrong with my listview? How can I do in this issue?
Thanks for your help.
|
|
|
|
|
the item click event does occur before the double click ( because you've already clicked it the first time ,before releasing the mouse for the second click ), i think that you would have to determine if the user was clicking on the checkedbox area or over the actual label , then handle it that way. you can obviously do this :listView1.SelectedItems[0].Checked=false; but the user will see the checkbox flicker to checked then back to unchecked.
<font color="blue">Private void</font> ExpectingTwins(<font color="blue">string</font> twins)
{
<font color="blue">switch</font>(twins)
{
<font color="blue">Case</font> ("twins on the way"):
MessageBox.Show("for mr and mrs dynamic","twins on the way");
<font color="blue">break</font>;
}
}
|
|
|
|
|
Hi,
I'm creating a C# windows app, using the RichTextBox control. I need to Hide ID information next to text. According the RTF standard, I can do this using:
{\v Hidden Text}
When I set the RTFtext property of the control to "ABC{\v hidden}DEF", sure enough, it displays "ABCDEF" as required. The problem arises when I read the RTFText property again, which now contains "ABCDEF" - it's thrown the hidden text away!!!
Does anyone know how I can extend the control to include hidden text support?
Any help would be very much appreciated!
Thanks
Mojo
|
|
|
|
|
here's a simple test i did and the richtextbox retained the hidden text without any problems :
VB:
<font color="blue">Private</font> void button1_Click(<font color="blue">Object</font> sender, System.EventArgs e)
{
textBox3.Text=(richTextBox1.SelectedRtf);
}
<font color="blue">Private</font> void button2_Click(<font color="blue">Object</font> sender, System.EventArgs e)
{
<font color="blue">Try</font>
{
richTextBox1.SelectedRtf=textBox3.Text;
}
<font color="blue">Catch</font>
{
System.Exception r=new System.Exception();
MessageBox.Show(r.Message.ToString());
}
}
this was the rtf to start with :
<br />
{\rtf1\ansi\ansicpg1252\deff0\deflang2057{\fonttbl{\f0\fnil\fcharset0 Microsoft Sans Serif;}}<br />
\uc1\pard\f0\fs17 test}
and then i added this :
\v hidden more testing
directly after the normal text.
i then updated the richtext in to the box , replacing the original text.
then later i checked that line of rtf and i got this :
<br />
{\rtf1\ansi\ansicpg1252\deff0\deflang2057{\fonttbl{\f0\fnil\fcharset0 Microsoft Sans Serif;}}<br />
\uc1\pard\f0\fs17 test\v hidden more testing}
so it retained the hidden text fine as you can see at the end of the rtf.
hope this helps
<font color="blue">Private void</font> ExpectingTwins(<font color="blue">string</font> twins)
{
<font color="blue">switch</font>(twins)
{
<font color="blue">Case</font> ("twins on the way"):
MessageBox.Show("for mr and mrs dynamic","twins on the way");
<font color="blue">break</font>;
}
}
|
|
|
|
|
It's the stangest thing! It works with selectedRTF, but not RTF. Thanks, I would have probably never have tried that.
For anyone else doing this - don't forget a space after the "\v".
|
|
|
|
|
I'm working on a program that is a shell for a command-line DOS program. All it does is go through a list of files and for each one it calls a dos program using a System.Diagnostics.Process, waits for it to finish, moves to the next file, etc. Things run smoothly for small numbers of files, but if I use a big list of files, the whole thing locks up for about a minute (task manager says it's "not responding") and then it finally finishes up and gets back to drawing the window and such. I'd see how this could happen if it was just one big call to the dos program, but it's a lot of little calls, with time in-between. What can I do to smooth this out?
|
|
|
|
|
You should maybe spawn a worker thread to do the call outs and stick a Progress dialog up on the screen with a message pump to keep your UI messages processsed properly while it's doing it!
-----------------------------------------------------------------------
Shaun Austin: .NET Specialist. Spreading the word of .NET to the world... well the UK... well my tiny corner of it!!
|
|
|
|
|
Hehe, thanks I was thinking about that. Only thing I don't understand - what's a message pump? I've only written multithreaded apps in C for command-line, so I'm not sure how they work for windowed apps. In fact, I'm not sure how to correctly design windowed apps in general...
|
|
|
|
|
;PAnyone knows How to disable the WebBrower Control's Scroll Bar in the Right side ?
Neo
|
|
|
|
|
hello
i am again on today,
take my question, i have a fixed length file which has basically some ship to records. in those records i have got japanese characters also. Since it is a fixed length file, i wanted to extract data by specifying width. The problem is some japanese characters occupies more than one byte, in those scenarios if i use substring function i am not extracting correct information.
say suppose you need to extract 32 bytes of data from a string. if i do char by char opperation i will end up extracting information from other fields.
my question is how do i read a string byte by byte in C#.
please help me
thanks
Cheers,
Venkatraman Kalyanam
Chennai - India
"Being Excellent is not a skill, it is an attitude"
Reality is an illusion caused by caffeine deficiency(one Microsoft Research scholor)
|
|
|
|
|
Venkatraman,
You could use System.IO.Stream to access the file byte by byte you could then user myStream.ReadByte() which returns an unsigned byte cast to an Int32 or -1 if the end of the stream!
HTH
Shaun
-----------------------------------------------------------------------
Shaun Austin: .NET Specialist. Spreading the word of .NET to the world... well the UK... well my tiny corner of it!!
|
|
|
|
|
I would like to know how to extract bytes from a string.
Cheers,
Venkatraman Kalyanam
Chennai - India
"Being Excellent is not a skill, it is an attitude"
Reality is an illusion caused by caffeine deficiency(one Microsoft Research scholor)
|
|
|
|
|
Hi, friends! I met a hard question ! How can I do a Find and Replace function ? thx!
|
|
|
|
|
JeffSayHi wrote:
How can I do a Find and Replace function
Ctrl - H
or
String.Replace()
or
RegEx.Replace()
in order of difficulty to use
<a TITLE="See my user info" href=http:
|
|
|
|
|
In the directory C:\Program Files\Microsoft Visual Studio .NET\Common7\Graphics\videos Microsoft put sample avi files. I think so people can use them in there applications.
I've search the web, but I can't find any C# example how to display search.avi on a form.
Does any one know how this can be done?
Thanks,
Patrick
|
|
|
|
|
Not entirely sure. I know that MFC had a class called CAnimateCtrl which used the ActiveMovie control. This is still available in the COM tab of the component toolbox add/remove dialog so I'm sure you can use Interop to use that.
Worth a try!
HTH
Shaun
-----------------------------------------------------------------------
Shaun Austin: .NET Specialist. Spreading the word of .NET to the world... well the UK... well my tiny corner of it!!
|
|
|
|
|
Shaun,
It works with this control.
It's not exactly what I want. The search.avi needs to play in a loop and be transparent.
Thanks, I'll keep looking.
Patrick
|
|
|
|
|
I have an assembly that is loaded by a .exe. The assembly is interested of knowing where is the application's exe is located on disc, in order to find its configuration file.
I would like to do this so the application can monitor the switches section to enable and disable tracing without restarting the application.
|
|
|
|
|
This will probably give you the current assembly and not the .exe, but this is what I use from within an .exe to find its location.
string path = System.IO.Path.GetDirectoryName( <br />
System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase);<br />
path = path.Remove(0,6);
Perhaps changing GetExecutingAssembly() to GetCallingAssembly() would get you the results you need.
>>>-----> MikeO
|
|
|
|