|
Thing is - you look at the original post on this thread. Nothing is obvious, anymore. Like I said, when I saw it was you, it was obvious to me. I didn't notice, and not knowing who posted, it was not obvious to me.
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 )
|
|
|
|
|
|
;);P
|
|
|
|
|
how i connect to database in VC# as when i make connection from server explorer it display there but i cudnt able to drag that onto the designer
|
|
|
|
|
|
Hello i'm beginner in c# with GDI+
can anyone tell me how i can drag drop rectangle that i draw with DrawRectangle.
please i need help
thanks
|
|
|
|
|
If you're new to C# in general, you may be biting off more than you can chew.
you want to drag and drop a rectangle, the typical way to do this is to handle mouse events to track mouse position and button status, and keep calling Invalidate() in your mouse move after updating the co-ordinates that your OnPaint will use to draw the rectangle. When you finish dragging, you need to store the location, so your onpaint continues to draw it.
Did you also expect to 'pick' a rectangle to drag by clicking on it ? To do that, you work out the co-ordinates of your mouse down and iterate through your list of rectangles, to find out which one the mouse is in.
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 )
|
|
|
|
|
Can i give some mouse event to this rectangle?
|
|
|
|
|
No, the rectangle is not a control. In WPF, you can. But, if you're drawing a rect yourself, it's not a control, it can't get an event.
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 )
|
|
|
|
|
hmmm ok i see, can you give some example code that can dragdrop some rectangle over the panel ( windows form component)
[ sorry if my english bad, or not polite, i am indonesian, can't speak english better ]
thanks
|
|
|
|
|
You've not given any offense, not at all.
It's a fair bit of code, I can't just whip it up for you. The core thing to understand, is to get your rectangles drawing in a paint event, and to have the ability to change the location of one ( or create a new one ), based on mouse events. I'd start with a List<Rectangle> and a Paint event that draws the rectangles. Then I'd write the code to get mouse events, and draw a rect. Then I'd write the bit that finds a rect based on a click, and moves it.
Feel free to ask questions any step of the way, but I'm afraid I am unable to jsut write all that for you. If you ask specific questions as you go, I'll be more than happy to help any way I can
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 )
|
|
|
|
|
my problem is that when i open a site there is CAPTCHA i have 2 retrieve it buut it ha no reference number only reference site and when u enter that reference site and click it always changes . so i want a code that when i send the URL the captcha along with it should also be obtained.iam working in BOT technology
|
|
|
|
|
Your first problem is that you didn't offer a subject that tells people what you're looking for.
ravilikesaboli wrote: iam working in BOT technology
What is that ?
The whole point of captcha is to stop people from connecting automatically. Why do you need to ?
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 )
|
|
|
|
|
So you want your bot (computer) to pass a "completely automated public Turing test to tell computers and humans apart"?
See any issue with this?
|
|
|
|
|
I am new to C# and need some help with FileStream and BufferedStream . I am building a XML editor using SharpDevelop, the editor will be used to encrypt and decrypt files (custom zip files which are XML, and pictures). Only one person should have access to these files at a time and we want to make sure that everything is cleaned up after someone opens the file. Right now I am sure a FileStream to do all of this, I decrypt the file to a folder using SharpZipLib the files are then loaded into the XML editor, once the person closes the file it then takes that folder encrypts all the files and delete the temp folder I was using.
Would the BufferedStream be better?
|
|
|
|
|
Hey all,
I got a window that is 25px in height, and want it to dock to the screen bottom (so the height is 25px, and the width is 100%), it's because I'm making a RSS newsticker, and want it to slide at the bottom of the screen.
Thanks.
Best Regards,
Elias Sørensen
|
|
|
|
|
is this a windows form ??
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
Yes, it's a windows form with no border style.
|
|
|
|
|
try this on form load:
this.Location = New Point(0, Screen.PrimaryScreen.Bounds.Height - thid.Height);
this.Width = Screen.PrimaryScreen.Bounds.Width;
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
I've tried this:
private void Form1_Load(object sender, EventArgs e)
{
this.Location = New Point(0, Screen.PrimaryScreen.Bounds.Height - thid.Height);
this.Width = Screen.PrimaryScreen.Bounds.Width;
}
But I get an error ; expected.
Sorry if I've done it wrong, only made c# in 2 days 
|
|
|
|
|
Hello,
I think you only made "fat finger" errors!
New -> new
thid.Height -> this.Height
this.Location = new Point(0, Screen.PrimaryScreen.Bounds.Height - this.Height);
this.Width = Screen.PrimaryScreen.Bounds.Width;
All the best,
Martin
|
|
|
|
|
Thanks! It is working! BUT! I could't find the window.. Because it was placed behind the process bar (it was only because I got aero, that i could see it). Do you know how to fix that?
|
|
|
|
|
The problem is in the "Y" axis location.
Remember Y = "down the screen".
this.Location = new Point(0, Screen.PrimaryScreen.Bounds.Height - this.Height);
sets a location specified as x,y points.
try:
this.Location = new Point(0, Screen.PrimaryScreen.Bounds.Height - (this.Height / 2) );
You should see your line in the middle of the screen. Adjust the second parameter
to be where you want it.
|
|
|
|
|
It didn't work perfect, but i tried to use:
this.Location = new Point(0, Screen.PrimaryScreen.Bounds.Height - (this.Height + 30));
And that works perfect.
But! If i make the processbar bigger, it follows, but if i make it smaller, it is the same place as before, do you understand?
|
|
|
|
|
Try this:
this.Location = new Point(0, Screen.PrimaryScreen.WorkingArea.Height - this.Height);
|
|
|
|