|
I thought someone would have come up with something Probably as easy as copying the wizards probably. Not that I ever use any!
Give them a chance! Do it for the kittens, dear God, the kittens!
As seen on MS File Transfer: Please enter an integer between 1 and 2.
|
|
|
|
|
Please, explain how do I use
<br />
ToolBox.ToolBoxTabs.Item(...).ToolBoxItems.Add(..., ... ,vsToolBoxItemFormat.vsToolBoxItemFormatDotNETComponent) <br />
method in order to add my components into ToolBox.
Thank you in advance,
Pavel
|
|
|
|
|
Sub ToolBoxAddExample()
' This adds a Text item to the first tab of the Toolbox.
' Define the variables and create an object reference to the IDE's
' ToolBox object.
Dim win As Window = DTE.Windows.Item(Constants.vsWindowKindToolbox)
Dim objToolbox As ToolBox = win.Object
Dim colTbxTabs As ToolBoxTabs
' Create an object reference to the ToolBoxTabs object.
colTbxTabs = objToolbox.ToolBoxTabs
' Add a new Text item to the first tab in the Toolbox.
colTbxTabs.Item(1).ToolBoxItems.Add("New Text Item", "Some text to add to the document.", vsToolBoxItemFormat.vsToolBoxItemFormatText)
End Sub
MSDN link[^]
if you start putting in too manay features, it no longer remains useful for beginners
quote in a CP article comment, shiraz baig
|
|
|
|
|
Aaaaaaaaaah! VB.NET in the C# forum! What has the world come to?!?!?! I never thought I'd live to see the day! Run for the hills! Goodbye cruel world....(Just kidding though, I realize that for anyone developing macros that we must use VB.NET )
Norm Almond: I seen some GUI's in my life but WTF is this mess
Leppie: I made an app for my sister and she wouldnt use it till it was colorful enough
Norm:good point leppie, from that statement I can only deduce that this GUI must be aimed at children
Leppie:My sister is 25
-Norm on the MailMagic GUI
|
|
|
|
|
can you give me an idea if there is a way to draw a line with net and then when I click on it to be able to change it?
I want to use the image classes in .NET.
|
|
|
|
|
I think the best method is to draw your cad data with OpenGL, because you can implement zooming, moving, ... very easy and use some click events on some objects, like lines, points and so on.
--
Nice greets, Daniel.
|
|
|
|
|
Maybe with a metafile?? the only problem would be hit testing for the elements...
-- LuisR
──────────────
Luis Alonso Ramos
Chihuahua, Mexico
www.luisalonsoramos.com
"Do not worry about your difficulties in mathematics, I assure you that mine are greater." -- Albert Einstein
|
|
|
|
|
Luis Alonso Ramos wrote:
the only problem would be hit testing for the elements...
OpenGL supports hit testing very good.
--
Nice greets, Daniel.
|
|
|
|
|
this line of code
IFormatter formatter = new BinaryFormatter();Stream stream = new FileStream("MyFile.bin", FileMode.Create, FileAccess.Write, FileShare.None);formatter.Serialize(stream, obj);stream.Close();
alwas write data at the end of file or not ?
i mean there are alot of Objects .
where it write in the file?
this line of code
object obj = formatter.Deserialize(stream);
alwas read data from the begining of file or not ?
i mean there are alot of Objects.
where it read from the file?
r00d0034@yahoo.com
|
|
|
|
|
I need to catch mouse events, even when the mouse is not over any of my forms or controls.
Ideally, I could selectively choose to either pass on the message to the window that should have gotten it, or trap it.
Anybody have an idea?
|
|
|
|
|
Fortunately, there is no C# way of doing this : mouse events are attached to controls.
if you start putting in too manay features, it no longer remains useful for beginners
quote in a CP article comment, shiraz baig
|
|
|
|
|
Can I do it using interop?
|
|
|
|
|
I don't if it works or not. Because I've never used this feature
Correct me if I am wrong
There is a property called Capture in Control Class. It can be
set to true if you wish to capture all mouse events, even outside
the control's borders.
The following text is copied from MSDN:
---
When a control has captured the mouse, it receives mouse input whether or not the cursor is within its borders. The mouse is typically only captured during drag operations.
Only the foreground window can capture the mouse. When a background window attempts to do so, the window receives messages only for mouse events that occur when the mouse cursor is within the visible portion of the window. Also, even if the foreground window has captured the mouse, the user can still click another window, bringing it to the foreground.
When the mouse is captured, shortcut keys do not work.
---
Hope this would help
|
|
|
|
|
just tested it.
It looks the scope is rather limited. Even you set it true,
you still can't capture mouse events outside its top parent
control...
|
|
|
|
|
Hmmm, that isn't very helpful in this situation, but good to know overall.
Anybody else?
|
|
|
|
|
there's useful project on "the evil other site"
http://www.codeguru.com/system/Lock.shtml
the secret is: you need to install a system-hook. the one capturing mouse-events needs to reside in a dll.
i once did that with C++ but i have no idea whether this works with C#...
:wq
|
|
|
|
|
my userControl derived control responds to the mouse wheel when the app starts, but as soon as the focus passes over to something else, the mouse wheel doesnt work, even after manually scrolling the bar, and clicking in the area of the control, to make sure it has focus, or is there something special needed to actually give it focus?
Email: theeclypse@hotmail.com URL: http://www.onyeyiri.co.uk "All programmers are playwrights and all computers are lousy actors."
|
|
|
|
|
Do you mean with or without the cursor positioned over the control?
If you mean with the cursor not over the control, thats just the way scrolling with a wheel works.
Take this browser window for instance; resize it so it only takes up half the screen, then place the cursor over the non-browser portion of the screen. If you move the mouse wheel the window will no longer scroll.
James
Sig code stolen from David Wulff
|
|
|
|
|
|
HOW to creat FileStream object that could write into a file ?
can you explain any of its constructor?
i need a little more help how to write data using FileStream into a file or read the object from a file to the FileStream object only then it is possible to serialize or Deserialize it?
i want to write a hastable object into a file that contain class objects,and class objects further contain hashtable and other class objects.
may i write that hashtable into a file and retrive again?
i study the api but could not understand what methods to use.
r00d0034@yahoo.com
|
|
|
|
|
[Serializable]
public class MyObject {
public int n1 = 0;
public int n2 = 0;
public String str = null;
}
MyObject obj = new MyObject();
obj.n1 = 1;
obj.n2 = 24;
obj.str = "Some String";
IFormatter formatter = new BinaryFormatter();
Stream stream = new FileStream("MyFile.bin", FileMode.Create, FileAccess.Write, FileShare.None);
formatter.Serialize(stream, obj);
stream.Close();
And of course, you've got a System.Collections.HashTable object to play with.
See here[^]
if you start putting in too manay features, it no longer remains useful for beginners
quote in a CP article comment, shiraz baig
|
|
|
|
|
thanks.
one more question.this line of code
formatter.Serialize(stream, obj);
alwas write data at the end of file or not ?
i mean there are alot of Objects .
where it write in the file?
this line of code
object obj = formatter.Deserialize(stream);
alwas read data from the begining of file or not ?
i mean there are alot of Objects.
where it read from the file?
r00d0034@yahoo.com
|
|
|
|
|
Most probably yes, each call to Serialize appends data at the end.
But in fact you need not care about it, that's internal implementation. You must only make sure that your own serialization/deserialization are dual, ie do exactly the same thing. For instance :
// serialize
formatter.Serialize(s, obj1);
formatter.Serialize(s, obj2);
formatter.Serialize(s, obj3);
// deserialize
formatter.Deserialize(s, obj1);
formatter.Deserialize(s, obj2);
formatter.Deserialize(s, obj3);
if you start putting in too manay features, it no longer remains useful for beginners
quote in a CP article comment, shiraz baig
|
|
|
|
|
I have MFC COM server with interface that has a method declared as
[id(1)] void TRYOUT(VARIANT* pv); in ODL and
void CI::TRYOUT(VARIANT FAR* pv) {...} in the implementation.
C# sees it as
void CI.TRYOUT (ref object pv);
So here what I do:
Object oRes= new Object();
oI.TRYOUT(ref oRes); // oI is referenced instance of CI
And I get exception - type mismatched.
What's wrong?
Please help!
|
|
|
|
|
It seems from what you say that the compilation went fine, and it failed at run-time, right?
From my personal experiments, I would avoid to use VARIANT* because the marshaler does not know how to marshall all variant subtypes.
You may need to add a [MarshalAs...] attribute to bind to a specific subtype, especially if you know that VARIANT* references a BSTR for instance.
if you start putting in too manay features, it no longer remains useful for beginners
quote in a CP article comment, shiraz baig
|
|
|
|