|
I don't know what it is. There's something about the code you've left out. I can't duplicate the problem in a quick app I've written up.
|
|
|
|
|
I know I'v been trying to duplicate it in anothere app and can't do it neither.
Anyway since I'v found an alternitive that I like I'm not going to spend to much time on it.
Thanks for you time and help
(If I find out why this is happening I'll let you know)
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistakes.
|
|
|
|
|
How to find out the installed version of MS Power Point from registry? I am going to build an app in which i have to check out the installed version of the MS power point onthe client machine. How can I do this?
Regards, Qaiser Nadeem
|
|
|
|
|
You can check this key
HKEY_CURRENT_USER\Software\Microsoft\Office\x.x where x.x is the version.
AliAmjad(MCP)
|
|
|
|
|
I don know if this is the right place to ask this question. Anyway can anyone plz help me with the best of the above options...av bn into vb.net to vb2005 and asp.net and would like to get certified, but am confused as to which of the above certs. Any help
phatkin
|
|
|
|
|
They are all a waste of time. It's too easy to cheat to get them, so they mean nothing. If you feel that in your local job market they are respected, then ask the people you're talking to, which one they respect more.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
prubyholl wrote: vb2005 and asp.net and would like to get certified, but am confused as to which of the above certs.
If you are using VB.NET 2005 you should be looking at MCTS and MCPD certs.
Unlike Christian I do place value on certification. But ONLY if it is done properly where you actually learn stuff and can apply it. I will still test you at an interview so I will know if you learned it or just cheated on the exam (or were lucky)
Many companies will place value on certification as it means that they get extra points in the Microsoft Partner programme. So, in those cases it will make you more attractive to those companies.
|
|
|
|
|
i have soml xml files generated in my local msde during net failure, and when net is back i want to get the values from local msde to servers database, i really got stucked in this point, help me out
thanks in advance
Ramkumar S
|
|
|
|
|
So what are you doing that generates them XML files?? How does the MSDE fit into this??
|
|
|
|
|
i just want to take the values from xml file and insert it into the database table
thank you
ramkumar
|
|
|
|
|
Hi
I want to use this structure in AdjustTokenPrivileges(...)
typedef struct _TOKEN_PRIVILEGES {
DWORD PrivilegeCount;
LUID_AND_ATTRIBUTES Privileges[ANYSIZE_ARRAY];
} TOKEN_PRIVILEGES, *PTOKEN_PRIVILEGES;
How to declare it in .NET ?
|
|
|
|
|
I take it you're trying to call ExitWindows, or ExitWindowsEx??
Try this[^]...
|
|
|
|
|
Thank you for your reply
I have used this structure for years , but I just want to know how to declare it like C++
Now I'm using this approach
Public Class SePrivilege
Public Const SeCount As Integer = 35
Public Const SeCreateTokenPrivilege As String = "SeCreateTokenPrivilege"
Public Const SeAssignPrimaryTokenPrivilege As String = "SeAssignPrimaryTokenPrivilege"
Public Const SeLockMemoryPrivilege As String = "SeLockMemoryPrivilege"
Public Const SeIncreaseQuotaPrivilege As String = "SeIncreaseQuotaPrivilege"
Public Const SeUnsolicitedInputPrivilege As String = "SeUnsolicitedInputPrivilege"
Public Const SeMachineAccountPrivilege As String = "SeMachineAccountPrivilege"
Public Const SeTcbPrivilege As String = "SeTcbPrivilege"
Public Const SeSecurityPrivilege As String = "SeSecurityPrivilege"
Public Const SeTakeOwnershipPrivilege As String = "SeTakeOwnershipPrivilege"
Public Const SeLoadDriverPrivilege As String = "SeLoadDriverPrivilege"
Public Const SeSystemProfilePrivilege As String = "SeSystemProfilePrivilege"
Public Const SeSystemtimePrivilege As String = "SeSystemtimePrivilege"
Public Const SeProfileSingleProcessPrivilege As String = "SeProfileSingleProcessPrivilege"
Public Const SeIncreaseBasePriorityPrivilege As String = "SeIncreaseBasePriorityPrivilege"
Public Const SeCreatePagefilePrivilege As String = "SeCreatePagefilePrivilege"
Public Const SeCreatePermanentPrivilege As String = "SeCreatePermanentPrivilege"
Public Const SeBackupPrivilege As String = "SeBackupPrivilege"
Public Const SeRestorePrivilege As String = "SeRestorePrivilege"
Public Const SeShutdownPrivilege As String = "SeShutdownPrivilege"
Public Const SeDebugPrivilege As String = "SeDebugPrivilege"
Public Const SeAuditPrivilege As String = "SeAuditPrivilege"
Public Const SeSystemEnvironmentPrivilege As String = "SeSystemEnvironmentPrivilege"
Public Const SeChangeNotifyPrivilege As String = "SeChangeNotifyPrivilege"
Public Const SeRemoteShutdownPrivilege As String = "SeRemoteShutdownPrivilege"
Public Const SeUndockPrivilege As String = "SeUndockPrivilege"
Public Const SeSyncAgentPrivilege As String = "SeSyncAgentPrivilege"
Public Const SeEnableDelegationPrivilege As String = "SeEnableDelegationPrivilege"
Public Const SeManageVolumePrivilege As String = "SeManageVolumePrivilege"
Public Const SeImpersonatePrivilege As String = "SeImpersonatePrivilege"
Public Const SeCreateGlobalPrivilege As String = "SeCreateGlobalPrivilege"
Public Const SeTrustedCredManAccessPrivilege As String = "SeTrustedCredManAccessPrivilege"
Public Const SeRelabelPrivilege As String = "SeRelabelPrivilege"
Public Const SeIncreaseWorkingSetPrivilege As String = "SeIncreaseWorkingSetPrivilege"
Public Const SeTimeZonePrivilege As String = "SeTimeZonePrivilege"
Public Const SeCreateSymbolicLinkPrivilege As String = "SeCreateSymbolicLinkPrivilege"
End Class
[Flags()] Public Enum SePrivilegeAction
EnabledByDefault = 1
Enabled = 2
Removed = 4
UsedForAccess = &H80000000
End Enum
[StructLayout(LayoutKind.Sequential)] Public Structure LUID
Public LowPart As Integer
Public HighPart As Integer
Public Shared ReadOnly Zero = New LUID
Public Shared Function FromPrivilegeName(ByVal PrivilegeName As String) As LUID
Dim Luid As New [Structure].LUID()
Advapi32.LookupPrivilegeValue(Nothing, PrivilegeName, Luid)
Return Luid
End Function
End Structure
[StructLayout(LayoutKind.Sequential)] Public Structure LUIDAndAttributes
Public LUID As LUID
Public Attributes As SePrivilegeAction
End Structure
[StructLayout(LayoutKind.Sequential)] Public Structure TokenPrivileges
Public PrivilegeCount As Integer
[MarshalAs(UnmanagedType.ByValArray, SizeConst:=SePrivilege.SeCount)] Public Privileges() As LUIDAndAttributes
End Structure
It seems I can not post "<" , ">" character
|
|
|
|
|
Time is a bit short for me right now. I've got a switch/fiber problem I'm working.
In a brief "wait for the other guy" moment, I've managed to come up with this[^]. See what you can get from this example, just under half way down the page.
|
|
|
|
|
It just works
Public Declare Function AdjustTokenPrivileges Lib "advapi32.dll" (ByVal tokenhandle As IntPtr, ByVal disableprivs As Boolean, ByVal Newstate As IntPtr, ByVal bufferlength As Integer, ByVal PreivousState As TokenPrivileges, ByRef Returnlength As Integer) As Boolean
Public Class TokenPrivileges
Inherits List(Of LUIDAndAttributes)
Implements IDisposable
Dim P As IntPtr
Public Function AllocHGlobal() As IntPtr
FreeHGlobal()
P = Marshal.AllocHGlobal(Marshal.SizeOf(GetType(Integer)) + Marshal.SizeOf(GetType(LUIDAndAttributes)) * Count)
Dim P2 As IntPtr = P
Marshal.WriteInt32(P2, 0, Count)
P2 = Sum(P2, Marshal.SizeOf(Count.GetType))
For Each LUIDAndAttributes As LUIDAndAttributes In Me
Marshal.StructureToPtr(LUIDAndAttributes, P2, False)
P2 = Sum(P2, Marshal.SizeOf(LUIDAndAttributes.GetType))
Next
Return P
End Function
Public Sub FreeHGlobal()
If P <> IntPtr.Zero Then
Marshal.FreeHGlobal(P)
P = IntPtr.Zero
End If
End Sub
End Class
Public Shared Function Sum(ByVal P As IntPtr, ByVal I As Integer) As IntPtr
If IntPtr.Size = 4 Then
Return New IntPtr(P.ToInt32 + I)
Else
Return New IntPtr(P.ToInt64 + I)
End If
End Function
|
|
|
|
|
I wish I had the time to play around around with the code myself.
Glad it works for you though!
|
|
|
|
|
Morning guys.
I need help with moving buttons.I need to have a button on a form move as soon as the mouse curser moves across it.
Please help guys.Thank you in advance.
kagiso
|
|
|
|
|
look at the mouseenter and mousleave events
and the top, left property's
when mouseenter --> change top,left property's
when mouseleave --> stop the change
hope this helps
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistakes.
|
|
|
|
|
Will sure try it and let yu knw.Thanx for the assistance.
Anymore suggestions guys??
kagiso
|
|
|
|
|
You've been given the only correct answer, why are you asking for more suggestions ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
matjame wrote: Anymore suggestions guys?
No. The one you were already given is pretty much it.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Im creating 1 software ......
it is subject to internet connection.
there r following componants.....
FOrm1
button1
lable1
....................................
Now following things i want to do...
when we will click button1 , it will check that computer is connected to internet or not.
If it is connected , lable1 will be renamed as Yes
if it is not , lable1 will be renamed as No.
Plzz help me .. i searched on the internet for this coding but i failed..
plz help me
|
|
|
|
|
ankur0101 wrote: i searched on the internet for this coding but i failed..
There's about 1,600,000 answers to that ubiquitous question, here[^]. All you have to is type "vb.net is internet connected" into Yahoo or Google.
|
|
|
|
|
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
|
|
|
|
|
Aamir Mustafa wrote: 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.
So create a form that asks for this information. If your code that starts creating a new document, create a new instance of this form and show it using ShowDialog. The user enters the details and clicks OK. You then get the data from that form and pass it along to the method that creates a new document.
Aamir Mustafa wrote: 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)
So what's the problem??
Aamir Mustafa wrote: 3. When I click on close menu, it should close the active window .for example image1 window.
If you're using an MDI layout, then the currently active child form will be in the MdiParent form's ActiveMdiChild property.
Now that I get to the bottom of your post, I see that you don't have much experience with designing an application, let alone designing a moderately complex one like this. You've got a LOT of learning to do, and you're not going to get it from a bunch of forum posts. You're asking a bunch of questions on how to implement very basic functionality, like putting up a small form to ask for resolution values and tracking windows you have open. These are things that you should already know how to do before moving on to implementing actual drawing on a form.
|
|
|
|