|
Christian Graus wrote:
Or will it just work and I'm worried about nothing
It may work,as the clr compiles it at run time ,so it will use that resources when the exe is executed ,AS I THINK
|
|
|
|
|
Yeah, it seems possible, the stuff I've had trouble with is COM based, which is a whole different thing.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
You didn't say.
|
|
|
|
|
No, I had trouble with COM *before*, which is what's made me wary. A COM dll that had a new version, but the same GUIDs ( I did NOT write it ), would not run even though I was calling old methods that were still in there.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Christian Graus wrote:
I think that the compiler binds to the DLL so that if I change it, I need to rebuild.
Hmmm. If you're talking about .NET assemblies, you can load/unload assemblies at runtime by setting up a separate AppDomain. I've never done it though, so I don't know how to go about the nitty gritty stuff.
Or are you talking about a classic DLL, like C or C++ generated, where you use DllImport in C#? (or, shiver, managed C++).
Marc
My website
Latest Articles:
Object Comparer
String Helpers
|
|
|
|
|
Marc Clifton wrote:
Hmmm. If you're talking about .NET assemblies, you can load/unload assemblies at runtime by setting up a separate AppDomain. I've never done it though, so I don't know how to go about the nitty gritty stuff.
Great - I'll look into it.
No, it's a C# dll, at least in my head it is. It seems the easiest way to go to me.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Unless you don't change the expected interface of the needed classes in the DLL you can just exchange it. I've done that quite some times with a customer who needed an urgent update and I just sent him one of the projects dlls.
|
|
|
|
|
I need to draw a rect of another Image source inside a Picturebox.Image.
Then i need to draw a second rect from another Image yet inside Picturebox.Image but when i try to do that the picturebox is empty and it draw the new one deleting the old one.
I need to do as this image:
http://www.bbcometa.com/images/img.jpg
Thanks to who can help me.
|
|
|
|
|
You cannot draw onto a picturebox, you need to create a third image from the first one, then you need to use Graphics.FromBitmap to draw part of the second image onto the third one.
Then place the third image into the picturebox.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
When you draw the second rectangle,the control refreshed itself and clear that one that was created by a graphics object,so you must save it before you draw the second one,or draw all in the in paint method.
|
|
|
|
|
Yeah, overall I think using a picturebox is a bad idea, unless someone just wants to show a picture and get some scaling code for free.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
What i have to use instead of picturebox if i want to show it in a form?
|
|
|
|
|
Just use any inherited Control and override OnPaint of it.
|
|
|
|
|
Where Photoshop or other graphic program draw the image got by all the levels?
It seems a PictureBox.
Anyway i've not idea what i have to do in the OnPaint function?
Could you be more detailed, if you can with a bit of code?
Thanks
|
|
|
|
|
In OnPaint method ,draw the background image ,that is not hard,and then raise a flag to draw the second or first rect :
private bool isFirst = true;
protected override void OnPaint(PaintEventArgs e)
{
e.Graphics.DrawImage(Image.FromFile("img.jpg"));
if (isFirst)
e.Graphics.DrawRectangle();
e.Graphics.DrawRectangle();
}
And you can call OnPaint by Calling Invalidate() ,or Refresh() .
|
|
|
|
|
Do you think is fastly to draw using OnPaint then draw through a Image?
|
|
|
|
|
OK - every paint program surely draws it's images directly onto the Window. This is the fastest way to do it, without a doubt. Handle the OnPaint method, and draw the image onto the Graphics object that is passed in. Your question makes no sense, OnPaint will be faster than a picture box, both require you to have an image you need to draw.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
HI there,
I'm in urgent need to find out the long awaited solution of one small but critical problem. I'm Trying to detect the event when a user any how locks the workstation. i.e. either by Ctrl+Alt+Del or by winkey+L. I need to check the time when user locks the workstation and also when he unlocks the same. Pls. reply ASAP. U can also mail solution to my email address. pathak.tapan@gmail.com
Thanx 4 all your help and consideration to my query.
|
|
|
|
|
How many times are you going to ask the same question in the same day? If you want an answer immediately, your best bet is to do your own research. I spent all of 2 minutes on MSDN finding the function you need to call to register for these notifications, WTSRegisterSessionNotification[^].
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hi, im trying to allow paging to my datagrid. this is my main function
private void Load() {
datagrid.datasource = Dataset
datagrid.DataBind();
}
AND i add this:
private void datagrid_PageIndexChanged(object source,
DataGridPageChangedEventArgs e)
{
datagrid.CurrentPageIndex = e.NewPageIndex;
Load();
}
BUT ITS NOT WORKING, WHAT AM I MISSING? SHOULD I ADD A HANDLER IN THE INITIALIZE COMPONENT?? THANKS FOR THE HELP
|
|
|
|
|
Your page index is not changing. Try this it should work.
private void Load()
{
if (!Page.IsPostBack) {
Datagrid1.datasource = Dataset;
Datagrid1.DataBind();
}
}
bool isEditing = false;
void DataGrid_Page(object sender, DataGridPageChangedEventArgs e) {
if (!isEditing) {
DataGrid1.EditItemIndex = -1;
DataGrid1.CurrentPageIndex = e.NewPageIndex;
load();
}
}
leo
Kathmandu, Nepal
|
|
|
|
|
I wish to make a button that is shaped prefrabaly to the image i have for the button. The image is a cresent shape and so isnt very easy to draw, ive looked at using paths and regiosn but i dont know anyway of driving one from the image has anyone any surgesions on the direction to take.
Aulternativly their is the posibility of using some direct X but i dont know how easy it would be to use or if it can do what i would like.
Any help would be ace thx
ME.
|
|
|
|
|
Hi,
I am definitely new to .NET and I have purchased Visual C# .NET some time ago. I was wondering if it is possible to build plugin applications, such as Cloudmark or Plaxo for Outlook entirely with Visual C# .NET, as opposed to building COM plugin with MFC and Visual Studio C++ 6.0.
Is there a loss of features doing so? Basically is everything that is possible with Visual Studio C++ 6.0 possible with .NET or are there some limitations.
I am trying to determine if I have to forget about trying to use C# for the purpose of a plugin app and use C++ as before or if it worth using C# and .NET. I would like to avoid trying .NET and realizing that I am better off doing it as before in mid course, but then again, that might be wishfull thinking.
Thanks in advance
YorgZero
|
|
|
|
|
|
Hi everyone,
Could u please help me to code one simple(may be for you) but critical
portion of my project!!. I need to know how do I trace, say detect when
a windows system is being locked?? I need to trap the time and date
when the system is being locked and also when it resumes from the
locked state. This is Urgent. Please reply ASAP.
Thanx a lot 4 taking pain to share this problem with me.
|
|
|
|