|
I did that first but because the code always got run I tryed it with string as I posted.
I tryed you'r code and still get the same result.
The strange thing about it is even if you invert the condition the code also get's run. So nomatter what the outcome of my condition is the code inside the if gets run
If TypeOf Me.ActiveMdiChild Is frmAgenda Then
' I'm assuming that this code is on the MdiParent form...
Me.rdSearch.Enabled = False
End If
and
If not TypeOf Me.ActiveMdiChild Is frmAgenda Then
' I'm assuming that this code is on the MdiParent form...
Me.rdSearch.Enabled = False
End If
both result in me.rdsearch.enabled = false
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistakes.
|
|
|
|
|
Do the child forms in question derive from frmAgenda at all??
Did you trace through the code step-by-step and watch these sections execute??
Are there any other places where the status of the rbsearch can be set/reset??
|
|
|
|
|
I'v found a way to do it with an custom event but still I'm puzzeld because when I step through the code
it tells me that 'me.mdiactivechild is frmagenda' equals 'false' (checked it with quick watch) but still the code inside the if gets run
setup of the forms:
each mdichild has an ancester and that ancester has another ancester but the form that I need to check frmagenda doesn't have any ancesters so normally I should be able to check against that (I think)
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistakes.
|
|
|
|
|
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
|
|
|
|