|
Without doubt, the picturebox is the most abused and misused control in winforms. You'd lower your overhead if you just draw the images on the form yourself, which may help with your problem.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
But I also need to handle mouse events on each box. Should I write it myself? Or is there any other suitable control?
As in the example I'd like to have only one-colored rectangles
|
|
|
|
|
Yes, the mouse events are easy, if you draw them from a collection of objects, and iterate over that collecton backwards to see what the mouse is over, you should find it easy enough to handle mouse events and direct them to the correct object.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I have posted before about this question and now I'm offering money for a solution
I have been using the dotNet Framework to create an UPnP Control Point application, this application makes use of the Microsoft UPNPLib.
The problem I have is when I "Invoke an Action", because the UPnP device that I am invoking the action on is building up a big response that could take a while to be recieved by my application the action keeps timing out (at around 36 seconds) can someone tell me how to extend the timeout period?
If I receive a satisfactory solution I will transfer 30GBP via PayPal to a specified account.
Freedom is the right to say that 2+2=5 if this is so everything else will follow.
|
|
|
|
|
Here people provide solutions totally free but if you are offering them money then i think no will give response to your query
1 from me
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Desperate times, Desperate measures. But thank you for pointing out that people provide solutions for free.
Freedom is the right to say that 2+2=5 if this is so everything else will follow.
|
|
|
|
|
Any way if you are developing the web aaplication then in web.cofig
lthttpRuntime executionTimeout="180"gt
check more details for httpRuntime
-- modified at 8:13 Thursday 6th September, 2007
-- modified at 8:13 Thursday 6th September, 2007
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Its not a web application but thank you for the response
Freedom is the right to say that 2+2=5 if this is so everything else will follow.
|
|
|
|
|
I haven't used UPnPLib, but it the solution to your problem may lie in changing the value of the SubDefaultTimeout key in HKLM\COMM\UPnP . See this[^] MSDN link.
If this solves your problem, please consider donating 30GBP to a charity of your choice.
/ravi
|
|
|
|
|
This is for Microsoft Windows CE .NET 4.2.
Freedom is the right to say that 2+2=5 if this is so everything else will follow.
|
|
|
|
|
|
That's original.
Freedom is the right to say that 2+2=5 if this is so everything else will follow.
|
|
|
|
|
MicealG wrote: Freedom is the right to say that 2+2=5
You know what this pretty much sums you up. You do indeed have the right to say anything you want... the problem is saying some things just makes you look stupid.
Now go search for a way to set the timeout property for the microsoft UPNP library. If its possible, which id guess it is, then the answer will be out there somewhere.
|
|
|
|
|
I have spent days looking for the answer but I haven't been able to find one, it's not like I decided to come on the forum and offer money in exchange for an answer.
I'll make you a better offer, since you seem like a wise guy I will give you 100GBP if you find the answer and you have my guarantee of that!
Freedom is the right to say that 2+2=5 if this is so everything else will follow.
|
|
|
|
|
No, no you have this the wrong way round. The way consultancy works is that you pay me and then i give you the answer. After all what guarantee do I have that if I posted the answer here that you would pay me? What if the answer is that there is no answer (ie. its not possible) - would you still pay me?
So, i'll do the work for £100 with pleasure (it'll only take me 10-15 minutes to confirm or deny the existance of a timeout property) and thats a better hourly rate than mine by a few times.
So let me know if you want to employ my company (I am a consultant in SE England). I don't accept paypal and I do charge VAT so I'll invoice you for the work and get started just as soon as the cheque/bank transfer clears.
|
|
|
|
|
Just as I thought a "Forum Tough Guy" who can talk the talk but yet he's a paraplegic.
Just one question though, what exactly is your problem? And if you can't help then why are you bothering me?
Lol.
Freedom is the right to say that 2+2=5 if this is so everything else will follow.
|
|
|
|
|
MicealG wrote: Just as I thought a "Forum Tough Guy" who can talk the talk but yet he's a paraplegic.
Ive been developing sofware for around 8 years commercially and maybe 2 years as a hobbyist before that. Im far from knowing everything, but I do know how to search for solutions - its what I do on a daily basis. Its part of this job.
MicealG wrote: Just one question though, what exactly is your problem?
My problem is you. Specifically you have <50 posts at CP and you come here and dictate how you think we should conduct ourselves. You also insult us by saying that our freely given help and advice is not good enough for you - you want a level of service above everyone else.
Your behviour is akin to a child not getting their own way. You can be assured that none of your questions will be ever be answered by me.
|
|
|
|
|
I didn't ask for your life story or even a slight insight into it, lol, but now that you have I must admit it does sound pretty depressing, you have my sympathy.
I'm sure your probably the "big cheese" when it comes to posting and congratulations on that I'm sure your mother is very proud.
Freedom is the right to say that 2+2=5 if this is so everything else will follow.
|
|
|
|
|
The votes speak for themselves kiddo.
|
|
|
|
|
Hi,
I've built a web service with an ASPX page as a test harness. My web service has a method which gets a DateTime object from an external application and displays it correctly.
I have a console application which makes a call to the same web service. When it calls the same web method as the test harness, the DateTime object is one hour out.
Can anyone suggest what the problem might be? Is it something to do with summer time?
Thanks 
|
|
|
|
|
Just a quick question...Have been trying to figure this out for the past 30 minutes but with no luck. Figured I'll just post in here for help.
How exactly do you get the contents of the item selected in the Drop Down List? Here's the code:
lblResult.Text = ddlBackgroundColor.SelectedItem.Text;
However I am getting a blank lblResult everytime. I am just baffled where did I miss. Grrr....
Anyway advice is greatly appreciated. Thank you.
|
|
|
|
|
Where are you populating the Drop downlist ?
the items are static one or dynamically you are adding ?
try to debug the application
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Hi, thanks for the reply.
I am not sure what does populating mean, but all I did was open a form, dragged the Drop Down List, Button, and Label to the form.
I added a few items to the DDL, via the "items" properties. They were all hard coded beforehand, so I would assume they are static.
I am just trying to get the label to show what was chosen by the click of the button.
Thanks
|
|
|
|
|
ok try to debug(F5) your application by putting debug point where you have written the code ...... and see dropdown list contains all the values
Assuming that you know how to debug and the code that you have written is in button click event
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Hello,
I'm new to C#, so please bear with me if the question is obvious and/or stupid.
I have a C# (.NET Framework 2.0) application that needs to call functions in an unmanaged C/C++ DLL. The name of the DLL is unknown at compile time (so I can't use the DllImportAttribute directly). The solution I adopted uses the native LoadLibrary/GetProcAddress combination, as seen in the code snippet below.
using System;
using System.Runtime.InteropServices;
namespace Simple
{
class DLLPlugin
{
[DllImport("kernel32", EntryPoint = "LoadLibrary")]
private static extern IntPtr LoadLibrary(string lpLibFileName);
[DllImport("kernel32", EntryPoint = "GetProcAddress", SetLastError = true)]
private static extern IntPtr GetProcAddress(IntPtr hModule, string lpProcName);
[DllImport("kernel32", EntryPoint = "FreeLibrary", SetLastError = true)]
private static extern bool FreeLibrary(IntPtr hModule);
public delegate void VoidVoidDelegate();
private VoidVoidDelegate RunDelegate;
private IntPtr moduleRef;
public DLLPlugin(string dllName)
{
moduleRef = LoadLibrary(dllName);
IntPtr pfn = GetProcAddress(moduleRef, "Run");
RunDelegate = (VoidVoidDelegate)
Marshal.GetDelegateForFunctionPointer(pfn, typeof(VoidVoidDelegate));
}
~DLLPlugin()
{
FreeLibrary(moduleRef);
}
public void Run()
{
RunDelegate();
}
}
}
In the code you'll see that I declared a delegate,
public delegate void VoidVoidDelegate();
private VoidVoidDelegate RunDelegate;
and then used it in the constructor to store the function I'm going to call in the DLL. In order to do that, I had to use the delegate type twice: once as a parameter for GetDelegateForFunctionPointer and then again to cast the return value.
Now, this example calls a function named Run that receives no arguments and returns nothing (void), as specified by the delegate signature.
Now, my problem is that I don't know this signature at compile time. Maybe the first time it runs, the Run function will receive two strings and return a bool. Or maybe it will receive a string, two bools, an int and return a double. Or maybe something else.
What I need is to supply the return and argument types, and then create at runtime the right kind of delegate to use. I would then use this delegate created at runtime to supply the correct signature to the GetDelegateForFunctionPointer method and to correctly cast the return value. Not to mention to call my function in the DLL, of course.
If someone has any suggestions, I'd greatly appreciate the help. Code examples as well to illustrate, since I'm not at all familiar with using Reflection.Emit (I'm assuming it's going to go that way?).
|
|
|
|