|
I want to use IHtmlPainter,IElementBehavior,IElementBehaviorFactory with C# to draw grid in web browser like visual studio .net IDE's Web Form Designer.
guangxu qin
|
|
|
|
|
Hi all -
I have a problem I hope one of you can help me with.
I have created an addin to VS.NET - the addin worked perfectly fine during the time I developed it. Today I finalized the installer and began final testing - then suddenly I couldn't execute any of my commands. I get the error: "Command "Namespace.Class.Name" is not available."
I have tried whatever I could think of but nothing works. Any of you have any idea of what could be the problem?
I have come across something about the commands or the addin should be registered in the registry - but I lack more info about that.
Thanks in advance -
----
Edit:
5 min. after I posted this thread I found the problem.
Somehow I must have deleted the last part of this line:
public class Connect : Object, Extensibility.IDTExtensibility2, IDTCommandTarget
So it read:
public class Connect : Object, Extensibility.IDTExtensibility2
I know - stupid me. Sorry to have bothered you all with this post.
|
|
|
|
|
thanx for your tips but i still cannot move the shape from one position to another.i want to ask i have a lot of rectangle in the form how can i know which rectangle i have select to move and can i remain the size of the rectangle when i move and can i see the effect of the move when i move the rectangle.thank you for help me answer the question.
|
|
|
|
|
I'm trying my best to decipher your question, forgive me if I've understood it wrong
By the sounds of it, what you need to do is create a custom control that inherits from System.Windows.Forms.Control, create an OnPaint override to draw your rectangle image, and override the MouseDown, MouseUp and MouseMove events to implement drag-and-drop style moving on your Form surface.
|
|
|
|
|
how can i delete a specific amount of bytes (say 10) from a certian area of a open file (in this case location 0)...or if that cant be done..how can i open a file from a special point (say 10 bytes ahead of the start) FileStream.Read(bytelength,offset,totallengthtoread) ??
thanks alot
Jesse M
The Code Project Is Your Friend...
|
|
|
|
|
The only way to delete bytes from a file would be to copy it to another file, skipping the bytes you don't want. For what you want to do, try this:
FileStream fs = File.OpenRead(filename);<br />
fs.Seek(10, SeekOrigin.Begin);<br />
|
|
|
|
|
thanks alot for the help furty =)....still lookin for a way to embedd the salt bytes.....i can do it with the above code snip. thanks alot for all the help furty.......
Jesse M.
The Code Project Is Your Friend...
|
|
|
|
|
How do I get a trackbar to jump to the position at which I click? Instead of having the trackbar slide towards the mouse pointer...
|
|
|
|
|
There is no in-built methods to do this - the default behavior when clicked is the move the pointer +/- the LargeChange value.
The only way to achieve the behavior you're looking for would be to create a inherited TrackBar control, and override the MouseDown event. In your override you'll want to calculate the mouse position in relation to the TrackBar client rectangle, then use this to set the Value property based on the Minimum and Maximum property values.
|
|
|
|
|
can i knw wat class i need to have and what is the code to draw an arrow?thank you.
|
|
|
|
|
AFAIK there is no base class to draw an arrow. The System.Windows.Forms.ControlPaint class can draw a right-facing MenuGlyph but that's it. You'll have to paint it yourself.
|
|
|
|
|
You mean something like this?
private void Form1_Paint(object sender,
System.Windows.Forms.PaintEventArgs e)
{
Pen p = new Pen(Color.Blue,1);
p.EndCap=LineCap.ArrowAnchor;
e.Graphics.DrawLine(p,20,20,100,100);
}
Cheers,
Simon
"The day I swan around in expensive suits is the day I hope someone puts a bullet in my head.", Chris Carter.
animation mechanics in SVG (latest pic 1) (latest pic 2)
|
|
|
|
|
thats like... cheating :P :P
//Roger
|
|
|
|
|
hmm, but how do you change the size of the arrow - it seems to be proportional to the line width.
ta
"When the only tool you have is a hammer, a sore thumb you will have."
|
|
|
|
|
There is a custom cap, maybe that will help you out.
Otherwise, it'll be pretty easy to derive from Line and automatically draw an arrow (of your choice) at the end of it.
Cheers,
Simon
"The day I swan around in expensive suits is the day I hope someone puts a bullet in my head.", Chris Carter.
animation mechanics in SVG (latest pic 1) (latest pic 2)
|
|
|
|
|
Hello
well i m having problems updating my tables. please have a look at the piece of code i m using
dataSet11.Tables["BPS"].Rows[index][1] = Int32.Parse(tBBPSVal.Text);//db field is int
dataSet11.Tables["BPS"].Rows[index][2] = Int32.Parse(tBInc.Text);//db field is int
sqlDataAdapter1.Update(dataSet11, "BPS");
MessageBox.Show("Record has been updated");
sqlDataAdapter1.Fill(dataSet11, "BPS");
i call this code behind update button but it doesnot work. wen i get the values of dataset they r changed but database remains same and does not reflect any change.
please help
Regards
|
|
|
|
|
Try to check what is in datatable after modifing the fields - before update and after update - including original and current values. You can use
dataset.WriteXml(filename,XmlWriteMode.DiffGram)
method. If Your dataset is too big - use
dataset.GetChanges()
method before WriteXml().
See help.
Hi,
AW
|
|
|
|
|
I have an MDI app which has a few different children forms.
When they load i can see the controls all being drawn it looks unprofessional. Is there a way to display the form after all it's controls are loaded? Any info on this would be awesome... Thanks very much!
|
|
|
|
|
I was wondering if a person wanted to display something similar to a wizard setup form with a next button that showed a different set of controls on the form depending on how many times the next button was pressed how would it be done.
I am using panels right now and flipping back and forth but I am intersted in just doing it with multiple forms. I find panels messy to develope with.
Thanks,
Steve
|
|
|
|
|
|
There are several ways to go about it. One is to use panels like you are now, as you noted it is clumsy to work with. Another way is to base your wizard on the TabControl, then you can create each of your steps as a tab on the control.
Yet another way (and the way *plug plug* my wizard framework[^] uses) is based on User Controls, where each step is a separate User Control. I have a specialized form that handles all of the work of switching in and out, you just need to handle a few events to tell it how it should work.
James
"It is self repeating, of unknown pattern"
Data - Star Trek: The Next Generation
|
|
|
|
|
|
Hi.
im am a newbie with c#. i had created an object in one form (e.g. Form1) and i need its values from Form2. i also need the possibility to change my object's values from Form2.
how do i do that ???
Thank ....
Bob.![OMG | :OMG:](https://codeproject.global.ssl.fastly.net/script/Forums/Images/smiley_OMG.gif)
|
|
|
|
|
That would depend entirely on exactly what you are trying to do. If the Object is a Control you have added to the form and you know the objects name. You can access the Controls properties and methods via
for(int i = 0; i == this.ParentForm.Controls.Count-1;i += 1){
if(this.ParentForm.Controls[i].Name == "ControlName"){
}
}
However, if you need to access varibles only, you should create a static class similar to this.
using System;
namespace staticTest
{
public class Setting{
public static String[] test = new String[10];
public static int[] testInt = new int[10];
static Setting(){
}
}
}
|
|
|
|
|