|
Thanks a lot.. now i got it
Regards
Azeem
|
|
|
|
|
Ahamed Azeem wrote: real time use of an interface
This is what I can think right away:
I am owner of an application. There are two distant and independent teams which are working on it. One on UI and other on rest of the layers. Now, as an owner, what I can do is provide both the teams with a interfaces so that they can work independently and be sure of what is the middle and DB layer is going to offer and what UI is supposed to consume.
There are plenty more uses of interfaces, one being dependency injection, which you might find through google.
|
|
|
|
|
Hi,
IMO you should buy and study a book on C# or change your career plans; those were very basic questions after all.
|
|
|
|
|
|
Dear Gentleman,
Is there any rule that basic question would not be answered..
I am very good fan of this forum.
Regards
Azeem
|
|
|
|
|
That's not the problem.
The problem is that you were interviewing for a C# job without knowing the most basic concepts of C# and OOP programming.
|
|
|
|
|
|
Ahamed Azeem wrote: for "Using"
Real time use of an interface - Late binding.
"Using" is often used to define a scope inside which an object will be garbage collected.
As suggested, you need to pick up a good C# book and read.
Me, I'm dishonest. And a dishonest man you can always trust to be dishonest. Honestly. It's the honest ones you want to watch out for...
|
|
|
|
|
|
how to create MDI form in c#.net with menus . can You Give me Example which helps me
|
|
|
|
|
See here[^].
Me, I'm dishonest. And a dishonest man you can always trust to be dishonest. Honestly. It's the honest ones you want to watch out for...
|
|
|
|
|
|
I am using the visio to design the UI, but I think that the effect is boring. Which tools are you using to design the software GUI?
|
|
|
|
|
yu-jian wrote: I am using the visio to design the UI, but I think that the effect is boring.
That depends on what you're trying to design. Visio is used to quickly draw a screen, but it's not meant as a tool to create flashy forms - it's meant to show you where the buttons come, where the textboxes come - not how they are going to look like.
There's designers who can argue about the colors, the animations and the gradients. As a programmer, I only need to know what button where. Visio does that, and I agree that it's boring.
If you're creating an example to convince your client, then take a look at Photoshop; or XAML I are Troll
|
|
|
|
|
Why not just use the Visual Studio designer? If you're using Windows Forms (I assume this is the case since you posted in this forum), then you'll show exactly what the interface will look like. If you need to send an image to someone or use it in a presentation, just take a screenshot of the interface.
Dybs
The shout of progress is not "Eureka!" it's "Strange... that's not what i expected". - peterchen
|
|
|
|
|
Hi I want to develop a small app where i can position some controls like button, textbox, label etc and when i run the form I must be able to move the controls ie drag and drop anywhere on the form
could u refer me few articles with simple explanation, I am a beginner , thanks
|
|
|
|
|
Add the event OnMouseDown of controls.
When OnMouseDown, get the current mouse position and set the new mouse position to the controls.
When OnMouseUp, donnot set the new mouse positon to the controls.
|
|
|
|
|
A few changes from Yu-Jian.
1. create two variables
a)bool allowDrag
b)Point lastPosition
2. on Mouse Down, set allowDrag to true and set lastPosition of Mouse
3. on Mouse Up, set allowDrag to false
4. on Mouse Move, if allowDrag is true, change the location of the button based on the new location and previous location.
|
|
|
|
|
Could u please provide the code, its confusing and i am new to windows programming
|
|
|
|
|
Only one button in the form.
<br />
using System;<br />
using System.Collections.Generic;<br />
using System.ComponentModel;<br />
using System.Data;<br />
using System.Drawing;<br />
using System.Linq;<br />
using System.Text;<br />
using System.Windows.Forms;<br />
<br />
namespace WindowsFormsApplication5<br />
{<br />
public partial class Form1 : Form<br />
{<br />
public Form1()<br />
{<br />
InitializeComponent();<br />
this.button1.MouseMove += new MouseEventHandler(Form1_MouseMove);<br />
}<br />
<br />
private void button1_MouseDown(object sender, MouseEventArgs e)<br />
{<br />
this._allowDrag = true;<br />
}<br />
<br />
private bool _allowDrag;<br />
<br />
private void Form1_MouseMove(object sender, MouseEventArgs e)<br />
{<br />
if (this._allowDrag)<br />
{<br />
this.button1.Location = new Point(e.X + this.button1.Location.X, e.Y + this.button1.Location.Y);<br />
}<br />
}<br />
<br />
private void button1_MouseUp(object sender, MouseEventArgs e)<br />
{<br />
if (this._allowDrag)<br />
this._allowDrag = false;<br />
}<br />
}<br />
}<br />
<br />
|
|
|
|
|
Thanks very much it worked
|
|
|
|
|
Instead of cluttering up your form code, take a look at my article on Create your Own Runtime Movable Windows Forms Controls[^]. This will make your button much easier to code with and you don't have to worry about wiring up your events for every normal button you drop on the form. You also don't have to worry about if you're dropping the button on the form or in a panel or in any other container control.
|
|
|
|
|
I wonder why someone univoted you for the example code.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I developing a system monitoring
I need to log all execute command,stack trace,i/o
what i mean is, i need to get an application script code that running externally from this project
did anybody know how to code this thing
|
|
|
|
|
Not easy at all and you can't write it in managed code. This requires you to write, what is essentially, a debugger. It also requires you have a thorough knowledge of Windows internals and how processes really work.
No, I don't have any references for this stuff.
|
|
|
|
|
Is there a way to get Winforms apps to render like they do on Windows XP in Server 2008? I'm suprised to see they still render like they do on Win2003.
The difficult option of converting the apps to WPF is not a viable option."For fifty bucks I'd put my face in their soup and blow." - George Costanza
CP article: SmartPager - a Flickr-style pager control with go-to-page popup layer.
|
|
|
|
|
Hello,
I think this might be very silly question, However Can anybody tell me
How to show the Child menu when only child is opened.
The Scenario is
If i opened the MDIParent then only menu on MDIParent is visible but as soon as i opened any child form the respective forms menu will be used instead of MDIParent menu.
On closing child once again MDIParent menu is visible.
Regards,
Datta
|
|
|
|