Click here to Skip to main content
15,907,183 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionMoving buttons Pin
matjame28-Oct-07 20:51
matjame28-Oct-07 20:51 
AnswerRe: Moving buttons Pin
Tom Deketelaere28-Oct-07 21:41
professionalTom Deketelaere28-Oct-07 21:41 
GeneralRe: Moving buttons Pin
matjame28-Oct-07 21:43
matjame28-Oct-07 21:43 
GeneralRe: Moving buttons Pin
Christian Graus29-Oct-07 0:14
protectorChristian Graus29-Oct-07 0:14 
GeneralRe: Moving buttons Pin
Paul Conrad29-Oct-07 17:17
professionalPaul Conrad29-Oct-07 17:17 
QuestionNavigation of Internet connection Pin
ankur010128-Oct-07 19:39
ankur010128-Oct-07 19:39 
AnswerRe: Navigation of Internet connection Pin
Dave Kreskowiak29-Oct-07 4:37
mveDave Kreskowiak29-Oct-07 4:37 
Questionimage editor Pin
Aamir Mustafa28-Oct-07 18:16
Aamir Mustafa28-Oct-07 18:16 
I am working on a project called Image Editor.
Now I am in beginning stage
It has three forms
1. Image Editor (MDI Form1, ismdi container=true)
2. Image (Form2) 3.Resolution (Form3)
I have added a Menu bar and there is File Menu on it.
File Menu has five submenus as following
1. New (opens a new window)
2. Open (open the image)
3. Save (saves the image)
4. Close (closes the active window)
5. Exit (exits the main application)
I want to do some changes in it, these are follows
1. When I click on new there should be dialogue appear (Resolution Form)
In it I can set height and width of form and then I click on OK,new window should open according to these setting. And the caption of new form (image form) should change as Image1,image2 and so on.
2. When I click on open it should load the image into the form (Image Form) what resolution image has.
It should load the form in active window(i.e. image1).If there is no open window already then it should load the image in new window(i.e. Image1).If there is new window already(i.e. image1,image2) but non of them is active then it should also open a new window and load the image in it.(i.e. Image1,image2)
3. When I click on close menu, it should close the active window .for example image1 window.
Also I have added a Panel on the Image Form and set it dock property to fill.
And I have added a Picture Box and I have loaded a Picture through property box.
Now my code can scroll and pan an image on the form.
My Code till now as follow
VB.Net 2005
Public Class ImageForm
Private m_PanStartPoint As New Point



Private Sub ImageForm_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
'Panel Settings

Panel1.AutoScroll = True

'Picture Box Settings

pb1.SizeMode = PictureBoxSizeMode.AutoSize
End Sub

Private Sub pb1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles pb1.MouseDown
'Capture the initial point

m_PanStartPoint = New Point(e.X, e.Y)
End Sub

Private Sub pb1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles pb1.MouseMove
'Verify Left Button is pressed while the mouse is moving

If e.Button = Windows.Forms.MouseButtons.Left Then

'Here we get the change in coordinates.

Dim DeltaX As Integer = (m_PanStartPoint.X - e.X)

Dim DeltaY As Integer = (m_PanStartPoint.Y - e.Y)

'Then we set the new autoscroll position.

'ALWAYS pass positive integers to the panels autoScrollPosition method

Panel1.AutoScrollPosition = New Drawing.Point((DeltaX - Panel1.AutoScrollPosition.X), (DeltaY - Panel1.AutoScrollPosition.Y))

End If
End Sub
End Class
Help me in designing my project as I want
Code is according to vb.net2005
Thanks





Aamir Mustafa

AnswerRe: image editor Pin
Dave Kreskowiak29-Oct-07 4:33
mveDave Kreskowiak29-Oct-07 4:33 
QuestionHow to Create a Reverse Index by VB.NET? Pin
Asianhawk28-Oct-07 16:18
Asianhawk28-Oct-07 16:18 
AnswerRe: How to Create a Reverse Index by VB.NET? Pin
Dave Kreskowiak28-Oct-07 16:52
mveDave Kreskowiak28-Oct-07 16:52 
QuestionDatagrid Column Width Pin
ejaz_pk28-Oct-07 15:44
ejaz_pk28-Oct-07 15:44 
AnswerRe: Datagrid Column Width Pin
Dave Kreskowiak28-Oct-07 16:41
mveDave Kreskowiak28-Oct-07 16:41 
AnswerRe: Datagrid Column Width Pin
Salman Sheikh28-Oct-07 18:35
Salman Sheikh28-Oct-07 18:35 
QuestionTutorial beginner on Web Services using VB.NET 2003 Pin
kendo1728-Oct-07 13:49
kendo1728-Oct-07 13:49 
AnswerRe: Tutorial beginner on Web Services using VB.NET 2003 Pin
Paul Conrad28-Oct-07 14:17
professionalPaul Conrad28-Oct-07 14:17 
GeneralRe: Tutorial beginner on Web Services using VB.NET 2003 Pin
kendo1728-Oct-07 14:26
kendo1728-Oct-07 14:26 
GeneralRe: Tutorial beginner on Web Services using VB.NET 2003 Pin
Dave Kreskowiak28-Oct-07 16:38
mveDave Kreskowiak28-Oct-07 16:38 
QuestionSQL to Excel data downloader Pin
selvarajaguru28-Oct-07 7:18
selvarajaguru28-Oct-07 7:18 
AnswerRe: SQL to Excel data downloader Pin
selvarajaguru28-Oct-07 8:01
selvarajaguru28-Oct-07 8:01 
GeneralRe: SQL to Excel data downloader Pin
Paul Conrad28-Oct-07 9:23
professionalPaul Conrad28-Oct-07 9:23 
QuestionClient/Server Pin
Bismark Appah28-Oct-07 3:48
Bismark Appah28-Oct-07 3:48 
AnswerRe: Client/Server Pin
nishkarsh_k28-Oct-07 6:32
nishkarsh_k28-Oct-07 6:32 
GeneralRe: Client/Server Pin
Bismark Appah1-Nov-07 10:38
Bismark Appah1-Nov-07 10:38 
GeneralRe: Client/Server Pin
nishkarsh_k2-Nov-07 6:36
nishkarsh_k2-Nov-07 6:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.