1,105,288 Community Members

How To Pop up Form

Member Avatar
M.Waqas Aslam
Practically a Posting Shark
837 posts since Aug 2011
Reputation Points: 67 [?]
Q&As Helped to Solve: 137 [?]
Skill Endorsements: 4 [?]
Featured
 
0
 

Hello !
i m developing a application i want that my notification form will pop up just like messengers , anti virus , and other applications forms pop from right bottom of the screen what can i do for it ,
i m using this code for it

Me.Location = New Point(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height - Me.Height)

but its not working :(
Please guide me ,

Thanks in advance
Regards
M.Waqas Aslam

Member Avatar
phoenix911
Junior Poster
169 posts since May 2009
Reputation Points: 28 [?]
Q&As Helped to Solve: 21 [?]
Skill Endorsements: 0 [?]
 
-1
 

You are going to have to add a NotifyIcon to your form, and then set the BalloonTipText/Title and display it when needed

Dim NotifyIcon1 = New NotifyIcon()
NotifyIcon1.Visible = True 'You might want to do this on the form load event and hide it on form closing.
NotifyIcon1.Icon = New System.Drawing.Icon("path\to\ico\file.ico")
NotifyIcon1.BalloonTipText = "This is the Text for the balloon tip"
NotifyIcon1.BalloonTipTitle = "This is the Title for the balloon tip"
NotifyIcon1.ShowBalloonTip(x)'x being the amount of time the ballon tip is displayed

i did this in c#, and converted to vb, so might need some changes

Member Avatar
M.Waqas Aslam
Practically a Posting Shark
837 posts since Aug 2011
Reputation Points: 67 [?]
Q&As Helped to Solve: 137 [?]
Skill Endorsements: 4 [?]
Featured
 
0
 

i have a form ,having a button on it , i want that when i click on it , my form will show just like the messenger and antivirus and other applications show notifications , at right bottom of the screen , where we have time in taskbar , i dnt want to use the notification balloon .i want to show my form there.
hope this time my question is clear .

Regards
M.Waqas Aslam

Member Avatar
phoenix911
Junior Poster
169 posts since May 2009
Reputation Points: 28 [?]
Q&As Helped to Solve: 21 [?]
Skill Endorsements: 0 [?]
 
1
 

ahhh now I understand.

You are going to have to change the location of the form you want to display.

so on the form load maybe? you can set the position like

Me.Left = X
Me.Top = Y

there is Right and bottom, but you can set them.

O and in future, you might not want to down vote a post of the only guy trying to help you...

Member Avatar
M.Waqas Aslam
Practically a Posting Shark
837 posts since Aug 2011
Reputation Points: 67 [?]
Q&As Helped to Solve: 137 [?]
Skill Endorsements: 4 [?]
Featured
 
0
 

Phoenix911 !
thanks for helping me :) , and i already used this

me.location = new point (x,y)

it works fine but if i change the screen resolution then :( its not works for me , if someone has screen resolution 1024* 768 , and i set my form location 1280*960 , then it will not work

Member Avatar
M.Waqas Aslam
Practically a Posting Shark
837 posts since Aug 2011
Reputation Points: 67 [?]
Q&As Helped to Solve: 137 [?]
Skill Endorsements: 4 [?]
Featured
 
0
 

no one is here ? :(

Member Avatar
phoenix911
Junior Poster
169 posts since May 2009
Reputation Points: 28 [?]
Q&As Helped to Solve: 21 [?]
Skill Endorsements: 0 [?]
 
0
 

You can always check the screen resolution and then from there decided where to put it

Member Avatar
phoenix911
Junior Poster
169 posts since May 2009
Reputation Points: 28 [?]
Q&As Helped to Solve: 21 [?]
Skill Endorsements: 0 [?]
 
0
 
Me.Location = New Point(Screen.PrimaryScreen.[B]Bounds[/B].Width, Screen.PrimaryScreen.[B]Bounds[/B].Height - Me.Height)

try this?

however you are going to have to change the width...

adjust to the following code

Me.Location = New Point(Screen.PrimaryScreen.Bounds.Width - Me.Width, Screen.PrimaryScreen.Bounds.Height - Me.Height)

The latter code works 100% for me

Member Avatar
phoenix911
Junior Poster
169 posts since May 2009
Reputation Points: 28 [?]
Q&As Helped to Solve: 21 [?]
Skill Endorsements: 0 [?]
 
0
 

Nevermind,

You are going to have to set it

Me.Left = Screen.PrimaryScreen.WorkingArea.Width - Me.Width
Me.Top = Screen.PrimaryScreen.WorkingArea.Height - Me.Height;

You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: