|
thanks for reply my dear friend but little while ago i was asking about trapping mouse event, which i am able to handle now. but what i want now is on mouse over i want to show HAND cursor. As explained i have background image and on that i am having one more small image of a card (e.g Heart one), and i want whenever user take mouse over this card the cursor should get changed to HAND. I know that every control is having a property of cursor but this is an image (HeartOne.jpg) which is drawn over another image (BG.jpg)
|
|
|
|
|
If you are drawing the card image, then you know where it is on your form. You know its location and you know its size, therefore you can construct a rectangle from that information.
What you need to do is to keep a record of the rectangles for all the cards on your form. I'll leave you to research on how to do that.
Then when the mouse cursor moves you will have to go through all those rectangles to see if they hold the mouse position within their boundaries.
Look at the MSDN documentation for Rectangle to find a suitable method for that.
Your form is a control, therefore it has a Cursor property, you already know about that, so need no help on it.
Look away now! RANT coming up!
In the first post in this thread you stated that you had asked before but were not getting answers. In your previous post you were asking about detecting when the mouse was over an image. Rewording the question does not make an entirely different post! Stick to the rules. Remember that there are time differences, you are getting responses from all round the world. While you are working, others are asleep. If your problem is so damned urgent then get your credit card out and visit rent-a-coder, otherwise learn patience. I, and others, had responded to your first post, this thread should have been a continuation of that first post. Learn the rules of the forums, and keep to them, otherwise people will just ignore you.
Rant over.
For what it's worth I think that you are going about this in the wrong way. Ask yourself these questions, "What happens when the user clicks on one of the 'cards'? How do you as the programmer know what 'card' it is? Is it a Heart or Spade, is it a ten or an Ace?"
However you should at least complete the part you are doing, before changing your design, because you will learn many useful techniques. Also bear in mind that what you are doing is essentially a 'drawing' program. it's just that you are drawing cards whilst they draw circles, squares etc. So before you ask any more questions about this, Google for 'sketch program c#' or 'drawing program c#' and anything else like that that springs to mind, take a look at that code, it should give you many ideas on how to do your application.
Good luck!
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hi Thanks for your reply and suggestions. I ll certainly see to it. Now I am able to do as per the position of images by using MouseMove function.
|
|
|
|
|
I created a console application called "InputDLL" and added reference to
it in my second application called "Tester"
InputDLL application has one class called "Class1".
Here instead of hardcoding the name of the class, is there any way
I can get the name of the class programatically?
Following is my code:
---------------------
using InputDLL;
namespace Tester
{
class Program
{
static void Main(string[] args)
{
Type type = typeof(InputDLL.Class1);
foreach (MethodInfo methodInfo in type.GetMethods())
{
Console.WriteLine("{0}", methodInfo.Name);
}
}
}
}
Thanks,
NetQuestions
|
|
|
|
|
Assebmly myAssembly = System.Reflection.Assembly.GetExecutingAssembly();
string typeNames = string.Empty;
foreach (Type type in myAssembly.GetTypes())
{
if (type != null) typeNames += (type.FullName);
}
Enjoy
I are troll
|
|
|
|
|
|
thanks for u reply
but I am going to do that project.
I am always waiting for ur help,
would u plz tell me the coding for checks
for ex:-
initially i've to place 4 checks one after another,with a single bt different value in all.
when we reach the 4 check, a form appears
n now we have to fill that form wid the data from the excelsheet
Plz help me out of this
I'll be very thankful to u
|
|
|
|
|
Hi i got 1 image box and 1 textbox. Is there any way i can get the image tele with my textbox?
For example, my textbox is "ken" then the image will display ken picture.
|
|
|
|
|
USE SELECT QUERY LIKE:
Select Image FRom Tabel Where Image_name= '" & TEXTBOX.TEXT & "'
BEST REGARD
ANUBHAVA DIMRI
mailto: anubhava.prodata@gmail.com
|
|
|
|
|
any other better suggestion? because i use this coding
SDSChoices.SelectParameters["Image"].DefaultValue = txtVote.Text;
Image1.ImageUrl = Image;
it wont display the picture out
|
|
|
|
|
Do't try to change your way. Find it now why your code not working properly.
Best Regard
Anubhava Dimri
mailto: anubhava.prodata@gmail.com
|
|
|
|
|
Hi,
I am trying to embed html files in application. Initially,
1. I used to directly embed HTML file, I could load it using assembly manifest. But the problem with this was images were not getting loaded.
2. To deal with other problem i converted my html file and saved it as .mht format. But now it is not getting loaded.
3. Third way would be to extract the file from assembly and store it at a temp location and show in my webbrowser control.
Is there a better way to do this? Please help thanks.
Note: I am using Visual Studio Express 2008.
Thanks,
Karmendra
|
|
|
|
|
Hi Guys,
Is it possible to allocate an image in a Windows Form as a link to another form or WebSite? If yes, then how?
Your help will be appreciated,
Rajdeep.NET
|
|
|
|
|
You can use PictureBox.Click event and Process.Start(), if that's what you asked
|
|
|
|
|
Hi
I used the following code to close the running processes.When i click on the stop button i want to stop all those files that are opened.<pre>
currpro = Process.GetCurrentProcess();
foreach (Process proce in currpro)
{
proce.CloseMainWindow();
}It says,
Error 1 foreach statement cannot operate on variables of type 'System.Diagnostics.Process' because 'System.Diagnostics.Process' does not contain a public definition for 'GetEnumerator'
|
|
|
|
|
System.Diagnostics.Process.GetCurrentProcess() IS USED FOR GETTING CURRENT PROCESS. AND
Process.kill() IS USED FOR KILLING PROCESS.
mailto: anubhava.prodata@gmail.com
|
|
|
|
|
MSDN on Process.GetCurrentProcess() says: Gets a new Process component and associates it with the currently active process. I can see no plural form anywhere, so why use foreach ?
|
|
|
|
|
I wish to create quite a number of TextBox controls in a form.
Is there anyway I can create a array of TextBox controls, so the controls can be updated by calling the array control with index.
for example I can update all the TextBox Text by the following code:
int i=0;<br />
foreach(TextBox txtBox in txtBoxes)<br />
{<br />
i++;<br />
txtBox.Text = "Control " + i;<br />
}
where txtBoxes is a array of all the TextBox controls in the form.
*12Code
|
|
|
|
|
follow the steps.
TextBox[] textBoxes=new TextBox[]{txt1,txt2,txt3,txt4};
foreach(TextBox t in textBoxes)
t.Text=string.Empty;
where txt1,txt2,.. is the name of TextBoxes in Form.
|
|
|
|
|
Hi
I how to create banner maker application using c#.net with windows aplication.The sample site like www.bannersnack.com.Having one option craeting own banner maker component.If somebody know plz suggest me.Thanks in advance.
With Regards
Ch.Gayatri
|
|
|
|
|
That's like walking into a gathering of masons, pointing to a house, and then asking whether one of the masons can explain how you build it, using concrete slabs. I doubt that this approach will have a high rate of success.
Now, if you'd simply pick up a brick, and start the actual motion - the masons here would take interest since you're doing what they love to be doing. Come back from time to time, and show off your progress and hard work, you'll find that lots of masons here will gladly help you out if you get stuck
I are troll
|
|
|
|
|
Thanks 4 ur beautiful comment.
I definitely do that one.Plz if you wont help, don't discourage us.I am new in this field.I too want to learn.
with Regards
Ch.Gayatri
|
|
|
|
|
You asked a very imprecise question. You also gave the impression that you wanted someone else to do your work for you. No one is going to do that for you.
Eddy, quite rightly, suggested that you think about the problem like a series of bricks which if put together properly will give you a house. You need to think of what parts you might need to make a banner app. If you are too thick to do that, then give up now, take up a different hobby/career, knitting for example, where you can buy ready made patterns. No thought required, at all.
Wait a minute, that gives me an idea, have you learned how to Google yet? Yes, then bloody well use it! 'Banner application c#' should do the trick.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hi,
I am working on tab form i need to do focus on first text box of tab page i already post this issue but i didn't get result please tell me what i should do.
On form load first tab page will display and first text box must be focus like courser must be blink their.
Thanks
|
|
|
|
|
write following to your form load and tabControl selectedIndexChange Event.
void setFocus(byte selectedIndex)<br />
{<br />
switch (selectedIndex)<br />
{<br />
case 0:<br />
txt1.Focus();<br />
break;<br />
case 1:<br />
cmb1.Focus();<br />
break;<br />
}<br />
}<br />
void TabControl1SelectedIndexChanged(object sender, EventArgs e)<br />
{<br />
setFocus((byte)tabControl1.SelectedIndex);<br />
}<br />
void Frm_Form7Load(object sender, EventArgs e)<br />
{<br />
setFocus((byte)tabControl1.SelectedIndex); <br />
}
set the control TabIndex to 0 and you can also set the TabControl TabStop to false.
|
|
|
|