An easy way would be to write an installation date to the registry (or a hidden file somewhere on the hard drive) and then do a datediff function. If it returns < 30 then run regular code, if not, go to a form that shows how they can register. If you're going to do this tho, you should do some type of encryption of the date so your general user isn't changing the date every 30 days.
Leeland
Posts
-
VB.NET Trial Version -
Select Top 1Can you give us your entire SQL statement. What you have there is invalid.
-
columns don't currently have unique valuesIf you don't have unique values, then you can't create foreign keys. The purpose of a foreign key is to make sure that the 2 rows in each table can be lined up. To do this, one of the tables needs to have unique entries for the column name you listed.
-
How do I check if a user is online?I got the following code from http://www.devx.com/vb2themax/Tip/19159[^] I haven't tested it, but it appears to be just a matter of making sure the wininet.dll is in the system directory and then calling IsConnectedToInternet function from your code. If it returns true you're connected, if false you're not. They you just change the location based on the response. Private Declare Function InternetGetConnectedState Lib "wininet.dll" (ByRef _ lpSFlags As Long, ByVal dwReserved As Long) As Long Const INTERNET_CONNECTION_MODEM = 1 Const INTERNET_CONNECTION_LAN = 2 Const INTERNET_CONNECTION_PROXY = 4 Const INTERNET_CONNECTION_MODEM_BUSY = 8 ' return True if there is an active Internect connection ' ' optionally returns the connection mode through ' its argument (see INTERNET_CONNECTION_* constants) ' 1=modem, 2=Lan, 4=proxy ' 8=modem busy with a non-internet connection Function IsConnectedToInternet(Optional connectMode As Integer) As Boolean Dim flags As Long ' this ASPI function does it all IsConnectedToInternet = InternetGetConnectedState(flags, 0) ' return the flag through the optional argument connectMode = flags End Function
-
Is there a way to check if a user is online?That's like asking if a person is living. You need to give a lot more details of what you're looking for. Are you looking to track a person's browsing, check to see if they're accessing your site, etc...etc... By saying "online" it can mean a lot of different things in different contexts. Before you elaborate on this, keep in mind that most people will not help you perform illegal actions. If that's your intention, I'd just let this thread die away. If however, you have a valid reason, then please...ask away.
-
Disable button for certain users (ContentMenu)You need to create roles and demand permissions. Create a Principal permission based on their user and then demand it. Dim myPermission1 as new PrincipalPermission("ADMINISTRATOR", Nothing) Dim mypermission2 as new PrincipalPermission("MANAGER", Nothing) Dim myPermission3 as new Principalpermission("EXECUTIVE", Nothing) Dim myPermission as PrincipalPermission Try myPermission.demand button1.enabled = true Catch 'If they're not in the ManagerGroup it won't run the enabled = true command End Try
-
Winforms QuestionThere may be an easier answer than just digging up one for this. What's the final goal you're trying to reach?
-
how to find record in datagridI haven't worked with MS Access in a while, so I'm not sure how they do it. The easiest way to do this is to cycle through the rows until you find what you need. Dim row As DataGridViewRow For Each row In DataGridView1.Rows If row.Cells(0).Value.ToString = TextBox1.Text Then DataGridView1.CurrentCell = row.Cells(0) Exit For End If Next The 0 in the cells parameters should match whatever column you want it in. HTH
-
helpppppppppppppppppppppppppWell, if you want to do it completely "behind the scenes" you'll need to get the command line add-in. [^] Once you have that installed, you can create a string for the additional parameters and pass it to a shell command str = "c:\path\to\winzipcl.exe file.zip file1 file2 file3" shell(str)
-
IPSec clientsGood Luck. I had a Shiva box (they were bought by Intel, then Intel stopped making them) and tried to find something. Never did find anything. I have worked with the ZyXEL previously and I always used Windows VPN Client to connect. it's a bit tricky, but doable. IMS, there was a write up on their website to do it.
-
US fears Chinese PCs may be buggedBAHAHAHAHAHAHAHAHAHA
-
Copy file to diferent domainAs long as you have rights to the directory on the remote domain you can write to it. The only difference is that when you connect, you have to use a username that is recognized on the remote domain. You'll also need to use the full username: Domain\Username
-
Vb .NET Async Socket problem with dataCheckout the System.Text.Encoding namespace. It can convert the stream to and from various encoding.
-
help meShell("Drive\Path\FileName.Ext")
-
How do I wait For a Web Transction to complete? [modified]I'd recommend a mixture of threads and delegates. First thing to do is spawn a new thread for your stream listener "master". The only purpose of this thread is to get it off of the main forms thread so the user will not see a performance hit when it does it's work. Then, from that thread, you'll launch your additional threads. These threads should be spawned with a reference to a new instance of a class that handles all incoming events. Once that thread is running, it will send and receive all of the data relating to the newsgroup you connect it to. Now for the delegates fun :). In each thread that spawns, you should have a delegate back to the main form that will allow you to update the users gui. Now, for an explanation of why this will work. When you start the new thread with a socket it will stay open until you specifically close it or the other end closes it. If the other end closes it, it's because of a timeout issue. If a timeout issue occurs on their side then it won't matter because that is a true indication that you're not gonna get anything else from them. The delegate back to the main form will fire the event no matter what is going on. There's no need to set up a loop or anything to monitor. The rest of your code can do whatever it wants and it will fire that event whenever the new data is received. Now, you seem like the kind of person who doesn't mind research, so here's a list of what to look for: System.Threading.Thread (will launch the new thread) Delegates Sockets A mixture of those three should give you what you need. Either that, or I'm loosing my mind and I'm just rambling on :)
-
Removing a reference from the projectopen up your projects properties and click on the references tab. Highlight the reference you want to remove and click the remove button.
-
RPC problemsounds like the rpc server isn't running on the machine you're attempting to connect to. Pull up the services on that machine and see if it's running.
-
How to preview Report without using crystel reports and export it to any formatThat would depend on what kind of report you're using. If it's a Crystal Report file, then you need use crystal reports. If you haven't created the report yet, then I would look into a 3rd party add-in that will allow you to do that. If you only want to display it in one format like excel, then you can just create an Excel Application object and fill your sheets through it.
-
combo box proeblemSet your Text Property to "Select Country"
-
combo box proeblemSet the combo box's "DropDownStyle" to "DropDownList"