|
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
|
|
|
|
|
The only way I can think of doing this, is by creating a local variable on your child forms, which exposes your parent form in the child. i.e. Private ParentForm as frmParent . You can pass this info through the constructor of your child form, and in the constructor set this variable like this
Public Sub New(ByVal Parent As frmParent)
' This call is required by the Windows Form Designer.
InitializeComponent()
myParent = Parent
' Add any initialization after the InitializeComponent() call.
End Sub
Then in your FormLoad event you can set the menustripitems.visible on the parent to false. like this
myParent.MenuStrip1.Items(0).Visible = False
myParent.MenuStrip1.Items(1).Visible = False
Not forgetting to set visible to true in your FromClosing Event.
Hope this helps
|
|
|
|
|
Hello every body...
Kindly give some helpful links to study the working of crystal reports 11. i am a beginner and no idea how it works. If someone in here can shed me a light will be great..
Thanks in advance
|
|
|
|
|
<a href="http://www.thinkydink.com/crystal.html">http://www.thinkydink.com/crystal.html</a>[<a href="http://www.thinkydink.com/crystal.html" target="_blank" title="New Window">^</a>]
If You Get your answer then please Rating me...
Thanks..
"Are You Ready"
DX-ARMY
|
|
|
|
|
Well you got rated all right (I did not bother) learn to check your links and preview your posts, then check the quality and edit them if necessary! Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Might I humbly suggest that you have made a grave mistake in selecting CR as your reporting platform. If you have any choice in the matter I would suggest you do some research on the product and more importantly their support. It is abysmal.
Dev Express and Reporting Services have a better reputation and there are a few others that will be a better option than CR.Never underestimate the power of human stupidity
RAH
|
|
|
|
|
i wan to upload image to a folder.can u give me an idea...thanks
|
|
|
|
|
Look into File.Copy method.
|
|
|
|
|
Noone can tell you anything useful unless you speicify what type of server the folder is on.
|
|
|
|