|
-
Sep 27th, 2003, 06:42 AM
#1
Thread Starter
Addicted Member
start program automatically after login??
2 Questions >>
1.how can we start a program exactly after user login ( putit in the start up or something ) ???
2. get screens width?!
thnkx
-
Sep 27th, 2003, 01:56 PM
#2
Sleep mode
A1 : Put your app in this key :HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run (that's on XP, I believe it's the same on W2K too)
Q2 : Do you mean moniter width ?
-
Sep 27th, 2003, 02:07 PM
#3
Thread Starter
Addicted Member
yes the monitors width ( reselution ), how can i get it?
and how can i add the program the registery during installation?!
Last edited by persianboy; Sep 27th, 2003 at 02:32 PM.
-
Sep 27th, 2003, 02:37 PM
#4
Sleep mode
1-I've not done that but I assume it's in the registry section of the deployment proj . I think in the fullpath of the new key reg , you have to add the above path . not sure though .
2-Try this :http://www.pscode.com/vb/scripts/Sho...txtCodeId=1346
-
Sep 27th, 2003, 02:40 PM
#5
Sleep mode
What happened to the posts , did you change questions order !!
The monitor ? huh , I don't know then , just do a search
-
Sep 27th, 2003, 02:43 PM
#6
Thread Starter
Addicted Member
the screen width is what i need! i've started searching, i thought its going to be just a line of code
-
Sep 27th, 2003, 02:46 PM
#7
Sleep mode
No , Since you are getting info off the hardware and it's not that easy . API of course will do it hopefully with no problems .It's in the above link
-
Sep 27th, 2003, 02:49 PM
#8
Thread Starter
Addicted Member
thanks dude, i'll take a look at it as soon as i get home
-
Sep 27th, 2003, 03:39 PM
#9
Frenzied Member
For the screen width try this
VB Code:
Dim y As String = System.Windows.Forms.SystemInformation.WorkingArea.Height
Dim x As String = System.Windows.Forms.SystemInformation.WorkingArea.Width
-
Sep 28th, 2003, 02:44 AM
#10
Thread Starter
Addicted Member
System.Windows.Forms.SystemInformation was a wonderful class, lot of system info can be used, no api need
-
Sep 28th, 2003, 09:14 AM
#11
I wonder how many charact
VB Code:
Debug.Writeline(Screen.PrimaryScreen.Bounds.ToString)
or
VB Code:
If Screen.PrimaryScreen.Bounds.X > 1024 Then 'do something
Additionally, here's a little snippet straight off MSDN that retrieves a wealth of info.
VB Code:
Dim Index As Integer
Dim UpperBound As Integer
' Gets an array of all the screens connected to the system.
Dim Screens() As System.Windows.Forms.Screen = _
System.Windows.Forms.Screen.AllScreens
UpperBound = Screens.GetUpperBound(0)
For Index = 0 To UpperBound
' For each screen, add the screen properties to a list box.
Debug.WriteLine("Device Name: " + Screens(Index).DeviceName)
Debug.WriteLine("Bounds: " + Screens(Index).Bounds.ToString())
Debug.WriteLine("Type: " + Screens(Index).GetType().ToString())
Debug.WriteLine("Working Area: " + Screens(Index).WorkingArea.ToString())
Debug.WriteLine("Primary Screen: " + Screens(Index).Primary.ToString())
Next
Last edited by nemaroller; Sep 28th, 2003 at 09:22 AM.
-
Sep 28th, 2003, 01:33 PM
#12
-
Sep 28th, 2003, 01:43 PM
#13
Thread Starter
Addicted Member
< < < Tested > > >
MsgBox(System.Windows.Forms.SystemInformation.WorkingArea.Height)
Dim screen() As Screen = System.Windows.Forms.Screen.AllScreens
MsgBox(screen(0).WorkingArea.Height)
both showing the same result
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|