|
I know your control, leppie! Thank you! I was overwhelmed I hoped there was something simpler.
I much time have you spent researching, planning and creating it?
Have you ever thought writing an article about it?
|
|
|
|
|
Cristoff wrote: much time have you spent researching, planning and creating it?
It had a few incarnations, so I am not really sure The project has been ongoing now for over 3 years
Cristoff wrote: Have you ever thought writing an article about it?
Dreamt about it, yes alot! Reality, it's so much info to transfer, I am not sure I will be able to ever explain it all to anyone
I have decided to start writing small parts for documentation and post it to my blog. Hopefully one day all the info I have prodived on the blog can be compiled and edited
What I suggest, start off with a string[] for the lines, do a simple DrawString for the text. Find out what metrics you need like line height, and familiarize yourself with that. Then move on to selecting text, you will need some form of MeasureString here. After that make the caret, if needed, some people simply PInvoke this functionality. Finally if editing is required, do that. And then only start messing with colors and such.
Hope this helps a bit, I used a similar path.
|
|
|
|
|
I'd love to see this too... let me know when you publicize it
|
|
|
|
|
Thank you for the tips. How would you use string[]? For example you'll reserve 1000 lines then when 999 are used you'll expand the array by another 1000 lines. We'll this be fast and good enough?
Colors I might not need but who knows What I need to know is exactly what line I'm editing.
|
|
|
|
|
hai guys,i have some problem while implementing msgbox with yes or no buttons using java scripts(or any other script languages.),the problem is,when i use script messagebox it comes into act when the click_event(button) get fired but
my need is:In button click_event i check for two condition, if both conditions are satisfied then the msgbox will show and ask user to enter their value ,that is yes or no.if yes then it should use some the query to update database,else it leave that(nothing should happen).
or is there any other choice to satisfy my need?anyone can help me? very urgent......pls
ayyp
-- modified at 3:51 Saturday 20th May, 2006
|
|
|
|
|
ayyp wrote: if yes then it should use some the query to update database
Your problem is that your message box is a jscript construct on the client, and your database is on the server. So, one way to do this would be to write a page which does your database operation then closes itself, and redirect to that page when the yes button is pressed, so you're running code on the server from the action that takes place on the client.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I'm sorry, I prefer not to respond to private emails, in general. I wouldn't use a jscript alert, I would use a popup window. In fact, your popup window could just handle a postback event when you click 'yes' without the need for another page. I expected you were creating a popup along the lines of this tutorial:
http://www.htmlcodetutorial.com/linking/linking_famsupp_70.html[^]
Then, if it's an aspx, you can set up your yes button to do your database action on postback.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
i have to use the compile class to compile a project but i cant find the way to use it for my purpose
|
|
|
|
|
You need to provide some more information:
What is your purpose and what is the project like you're trying to compile?
How far did you get and what exactly doesn't work?
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook
www.troschuetz.de
|
|
|
|
|
Hi,
I'm using reference types in c# instead of pointers...so in below code i'm sending the ptr which is a pointer but using ref key word now can any one tell me how to increament the pointer *(ptr+i) in c#?
int Largest(ref int ptr,int Icount)
{
int largest =0;
largest = *(ptr+0);
for(int i=0; i < Icount; i++)
{
if( *(ptr+i) >= largest)
{
largest = *(ptr + i);
}
}
return largest;
}
|
|
|
|
|
If you pass an int by ref, it's not really a pointer. You can increment the value, but you can't use it as a memory address, at least not easily.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi all,
I am using datagrid in my c# windows application.I want to Delete(update) record when I clicked on datagrid item row.
To modify particular record how can I get ID field value of selected gridrow.
Please help me......
Regards,
Nagraj
|
|
|
|
|
Q1) Is anyone know that how to make a DataGrid's row pointer (almost left row) to invisible ?
Q2) How to select a row after use dataview.sort ?
Example, If I select (Highlight) a second row, then I sort it, the row selected will change to fourth row. I would like keep highlight on fourth row.
Thank
|
|
|
|
|
hi,
I have created a dynamic gridview with bound columns.When i tried adding radio buttons to that dynamic grid,the radio button is getting added outside the grid.I want to add radio buttons dynamically inside that grid using template field to retrieve the row's values to another page.
I have tried to retrieve values using select link button.but,i want to use radio button instead of SELECT option.
thank u for any help.
rita
|
|
|
|
|
Hi Rita,
I think you must be adding the radio button to some controls collection. am i right? If yes then i think that, the problem may be that you are adding the radio button to controls collection of the form on which you have the grid view. This might be one of the possibilities. I am not sure about it because you havent given much details. So if you can specify some code you are using it would be more easy.
Just check for the correct controls collection ( i hope this solves your problem)
Anant Y. Kulkarni
|
|
|
|
|
hi,
thanks for considering.
I want to add radio buttons dynamically to a dynamic gridview which i have already created using bound columns.
I want to use the radio button to select the row's values in the grid & pass value to another page(i.e,to a login page).I was able to pass values using java script,but couldn't find a way to add radio button dynamically to the dynamic grid.I could get values using a SELECT button to select row's value.
thank u.
if (!IsPostBack)
{
CommandField field = new CommandField();
field.ShowSelectButton = true;
field.HeaderText = "Select";
GridView1.Columns.Add(field);
}
rita
-- modified at 2:14 Monday 22nd May, 2006
|
|
|
|
|
Hi i am wondering if someone can help me with this. I have a listView control that i am taking the first row and adding it to an string array with 3 elements. I am wanting to know how i can pass the array with the values to a class so i can use it in a method
Thanks alot for your help!
Don't be overcome by evil, but overcome evil with good
|
|
|
|
|
just pass it in like anything else
<br />
string[] files = System.IO.Directory.GetFiles(@"c:\");<br />
writeFileList(files);<br />
<br />
void writeFileList(string[] names)<br />
{<br />
foreach(string name in names)<br />
{<br />
System.Console.WriteLine(name);<br />
}<br />
}<br />
<br />
<br />
hth
Al
|
|
|
|
|
I am trying to retrieve the last modified date of an external webpage. I have found numerous ways to do this in vb, java, etc... but not in C#.
Heres some of them:
VB - http://www.freevbcode.com/ShowCode.asp?ID=362
ASP (so basically the same thing) - http://www.webdeveloper.com/forum/archive/index.php/t-3706.html
I've tried using HTTPWebRequest and HTTPWebResponse, since HTTPWebResposne has a LastModified property, but this is when the response was last modified, not the page. So I'm stuck... Any help would be awesome
--Peter
|
|
|
|
|
You can call Response.GetResponseHeader("Last-Modified") to get the time, but then you have to parse it -- and there's about 3 standard time formats in HTTP. Luckily I wrote a parser for a web server[^] a while ago, so here it is:
static DateTime ParseHttpTime(string str)
{
DateTime dt;
try
{
dt = DateTime.ParseExact(str, httpDateTimeFormats, System.Globalization.DateTimeFormatInfo.InvariantInfo,
System.Globalization.DateTimeStyles.AllowWhiteSpaces | System.Globalization.DateTimeStyles.AdjustToUniversal);
}
catch(FormatException)
{
dt = DateTime.Parse(str, CultureInfo.InvariantCulture);
}
return dt;
}
The method can throw an ArgumentNullException if the input is null and a FormatException if the input isn't formatted properly.
Keep in mind this happens a lot... most servers don't seem to return a Last-Modified value these days.
|
|
|
|
|
So if the server doesen't return a Last-Modified value, as you said most servers don't these days, then is it still possible to retrieve the Last-Modified date of a page via some other means? Or am i just out of luck?
--Peter
|
|
|
|
|
I can't think of any other ways...
|
|
|
|
|
For some reason, every day or two, Visual Studio 2005 changes one instance of the word 'Component' to 'UserControl' (or to 'Form') in my .csproj file. I'm not sure why this happens. If I accept the change, within a few days, it gets changed back by Visual Studio.
Does anybody understand what is causing this problem? I can't seem to figure it out why this is happening. It just switches back and forth between 'Component' and 'UserControl'. It's kind of annoying because source control keeps wanting me to check out/save the changes to the file.
Thanks in advance for your help,
Curtis
|
|
|
|
|
Sounds like a bug... my guess is that it's because in WPF, custom controls are called UserControls. I personally think the name Component makes more sense, but bleh.
I think the MSDN Feedback Center[^] is where you want to look.
|
|
|
|
|
Hello,
I will be working with large data sets (> 4Gb) of binary data and was wondering if anyone was aware a method of reading an XML that I am thinking of embedding in the binary with XmlTextReader().
Thanks in advance for any help and have a good weekend
|
|
|
|