|
As Far As I Know
you didn't mention multiple DLL files
once your EXE finds one somewhere, that DLL will look for whatever it needs
in its folder, not your EXE's folder.
yes the easiest approach is to have all your DLLs in your EXE folder.
you're welcome.
|
|
|
|
|
I have a list that holds many controls(e.g) Panels and a function that knows how to print a print form the list for a given index. I want to print 2 panels per page how can i build this algorithm.
|
|
|
|
|
I'd use the panels method that copies the control to a bitmap ( DrawToBitmap ? ), then write a print method that arranges those bitmaps as required.
Christian Graus
Please read this if you don't understand the answer I've given you. If you're still stuck, ask me for more information.
|
|
|
|
|
Sweet Zombie Jesus is this a hard problem to solve.
I'm making an IDE for a scripting language I made up and I want to borrow some of Visual Studio's manuerisms when it come to editing the properties of an object in a propertygrid.
I have a type called ScriptEvent. I want to completely emulate the behavior you see when you try and edit an event in VS. (Opens a document, scrolls to position, etc...)
If there is already a decent way. Please point me in that direction.
If there isn't a clean way, then how do I make a property in a propertygrid talk to a non-modal dialog to get a value....
|
|
|
|
|
Not sure if this helps, but have you looked at using the Visual Studio Shell[^]?
Life, family, faith: Give me a visit.
From my latest post: "A lot of Christians struggle, perhaps at a subconscious level, about the phrase "God of Israel". After all, Israel's God is the God of Judaism, is He not? And the God of Christianity is not the God of Judaism, right?"
Judah Himango
|
|
|
|
|
I've made a few editors in the shell before, but this is going to be part of a larger unique editor.
|
|
|
|
|
Ok. Well, your question is a rather large one. Are you having trouble with a particular part? Or you don't know where to get started?
Life, family, faith: Give me a visit.
From my latest post: "A lot of Christians struggle, perhaps at a subconscious level, about the phrase "God of Israel". After all, Israel's God is the God of Judaism, is He not? And the God of Christianity is not the God of Judaism, right?"
Judah Himango
|
|
|
|
|
I'm not really sure were the best place to start is. I've gone down a few rabbit holes so far...
|
|
|
|
|
Have your ScriptEvent type keep a reference to where the event handler is: the document path and the line number. When the property is modified, open that document in your editor and scroll down to the line number.
Life, family, faith: Give me a visit.
From my latest post: "A lot of Christians struggle, perhaps at a subconscious level, about the phrase "God of Israel". After all, Israel's God is the God of Judaism, is He not? And the God of Christianity is not the God of Judaism, right?"
Judah Himango
|
|
|
|
|
Ok I have found that this is not possible but I wanted to know if anyone knew a way around this problem.
I have an abstract item class called AbstractMyItem, from this class I implement several items, one for example is MyBox. So the code for the box is:
public abstract class AbstractMyItem{}
public class MyBox: AbstractMyItem{}
For each item I want there to be a provider that performs some basic functionality for example:
public interface IMyItemProvider{
public AbstractMyItem [] LoadItems();
}
So for each I create a provider from the interface:
public class MyBoxProvider : IMyItemProvider {
public AbstractMyItem [] LoadItems();
}
However this creates a lot of casting as I have to cast the AbstractMyItem class to the MyBox class. It makes more sense to use generics like this:
public interface IMyItemProvider<T> where T : AbstractMyItem{
public T[] LoadItems();
}
public class MyBoxProvider : IMyItemProvider<MyBox>{
public MyBox[] LoadItems();
}
However as I said before I need to create a list of these providers. So in theory the obvious solution is:
List<IMyItemProvider<AbstractMyItem>> providers = new List<IMyItemProvider<AbstractMyItem>>();
providers.Add((IMyItemProvider<AbstractMyItem> ) MyBoxProvider);
However this will not work. You can't cast the concrete class to a the interfaced generic type. This does not work:
IMyItemProvider<AbstractMyItem> instance = (IMyItemProvider<AbstractMyItem> ) MyBoxProvider;
So the question. Anyone know of a good way to get around this problem? To be able to use generics with a list and assign my concrete classes to it?
It would be nice to say (I know this not real code).
List<IMyItemProvider<inherits AbstractMyItem>> providers = new List<IMyItemProvider<inherits AbstractMyItem>>();
providers.Add((IMyItemProvider<AbstractMyItem> ) MyBoxProvider);
|
|
|
|
|
What you want to do is not possible as of C# 3. You may want to read Eric Lippert's series of articles on adding covariance and contravariance to a hypothetical version of C#[^].
In the meantime, here are some work arounds:
-Use a non-generic list.
-Make IMyItemProvider implement a non-generic interface, call it IProvidesItemsBase , then make your list be of type List<IProvidesItemsBase> . This will work, of course when you call LoadItems, you'd get back an array of AbstractMyItem s.
Life, family, faith: Give me a visit.
From my latest post: "A lot of Christians struggle, perhaps at a subconscious level, about the phrase "God of Israel". After all, Israel's God is the God of Judaism, is He not? And the God of Christianity is not the God of Judaism, right?"
Judah Himango
|
|
|
|
|
Using C#, I need to deserialize an xml stream in input on a socket. The problem is that I don't know class type on which the stream xml is based. More specifically I have more than one class on which the xml stream could be based. How can I know the class type that I should use among those that I have available?
|
|
|
|
|
davegali wrote: The problem is that I don't know class type on which the stream xml is based.
Then you are screwed.
|
|
|
|
|
is there any way to run the dropped file to explorer ?
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
What dropped file? What explorer?! Oh my God where's my shoe!!
So, what are you trying to do?
My current favourite word is: I'm starting to run out of fav. words!
-SK Genius
Game Programming articles start - here[ ^]-
|
|
|
|
|
oh are you newbie, you dont know what is drag drop ? oh please, do not pretend like this, i just want to drag a file from my app and drop to somewhere else in explorer, now that drop file should run as it copied or moved, but how ??
Process.Start("????");
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
I'm nor sure you can get windows explorer to run a file, if you do a FileDrop into windows explorer I'm pretty sure it will just move the file. If you want to execute the file afterwards you'd have to find out where you dropped it, unless by run you actually mean you just want explorer to copy/move the file.
Either way, you can do a FileDrop from your app to windows explorer like so:
void TreeView1ItemDrag(object sender, ItemDragEventArgs e)
{
string[] stuff = new string[1];
stuff[0] = 'path to file';
.
DataObject data = new DataObject(DataFormats.FileDrop, stuff);
.
this.treeView1.DoDragDrop(data, DragDropEffects.Copy);
}
Of course if your using a listView or something else your obviously gonna need to change that a little. Multiple files at the same time would just require you to add more paths to the string array.
My current favourite word is: I'm starting to run out of fav. words!
-SK Genius
Game Programming articles start - here[ ^]-
|
|
|
|
|
yes yes i did that already, now i just want to run that dropped file, but dunno where to get its path
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
I don't think you can, explorer handles the drop event and your application sees nothing more of it. You could get the handle to an open explorer window and perhaps find what folder is open, but you wouldn't know which window(if there was more than one) or if the user had to rename a file or cancel the move/copy.
My current favourite word is: I'm starting to run out of fav. words!
-SK Genius
Game Programming articles start - here[ ^]-
|
|
|
|
|
yes, i'm trying to do this thing for around 2 days but nothing found that can help , is there anyway to know what window we release the mouse ?
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
are you asking about executing a program from Windows Explorer by dragging and dropping a target file onto it? If so then write your program to handle command line args. By default the paths of files dropped onto a program icon are passed to the Main function as parameters.
If that's not what you're asking about then you might want to clarify your question.
|
|
|
|
|
no thats not what i want
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
When the file drag is completed - the foreground window is changed. You could use GetForegroundWindow from user32.dll to find which window is currently active at the end of the drag operation. I'm not sure how you'd get the path from it though. If the 'Display the full path in the title bar' option is enabled on the system, then you could use GetWindowText from user32.dll to get the path (if it's the desktop the text is 'Program Manager').
Once you get the path you can then use Process.Start
Dave
|
|
|
|
|
thanks man for info, i will try it and reply soon
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Hi All,
Every time i try to execute a project i am coming up with the above error.
Can any one advice on the problem?
Thank you
regards
|
|
|
|