|
Is there any way of using a dll file in VB if there is no documentation for the dll file.
Please help
Sudar
|
|
|
|
|
Hello everyone,
I am a newbie and I am hoping that you all can help me with a little trouble I am having. I have a VB.NET CRM application that I am writing for my company. I am using a MySQL database to hold all of the data. The app is a windows form application which will be installed on everyone's computer in the office. I need to be able to authenticate the user from a list of users in a db table (which I can do no problem) but I am getting stuck on how I can keep the user's logged in status so that I can record (in another database table) the actions they perform in the system.
I appreciate any and all help and advice that you can give me on how to do this. Have a great day.
Sincerely,
Robert W. Dempsey
|
|
|
|
|
hey i dont know if your still having the problem with keeping track of a user's logged in status but a simple way would be to create a loggedin field on the end of the user's record and when they login set that field equal to 1 and when they log out set it to 0
|
|
|
|
|
I'm relatively new to VB programming and I have written an Access 2000 application and am currently copying the Access mdb's for each different database. My users have as many as 3 or 4 databases each. This is a nightmare if I have to make a code, form, or data structure change. What would you suggest as an alternative? I am trying to create a VB application that would allow them to select what Access database they want to work with and process from there. Sort of like selecting the database to open from a Common Dialog.
Any suggestions for a quick and efficient method would be appreciated.
|
|
|
|
|
Well, if you're using ADO.NET, then all you have to do is change the connection string in your OleDBConnection object. Just let the user select whichever one they want, modify your connection string, and assumining that your databases are all the same that should be all you need to do.
Hope that helps!
Daniel E. Blanchard
|
|
|
|
|
Each user is on a standalone laptop or desktop. All databases are identical in structure. No .NET. I change the ODBC DSN when they run reports that I have created in Crystal Reports. Other than that they open the .mdb they want to update and then run the reports. No networking or servers are involved.
|
|
|
|
|
I am relatively new to VB and I'm trying to figure out how to reference the images in an imagelist by using the index of the image within the list. I want to be able to take an image from the imagelist and place it in a picture box by using the index. I cannot figure out the syntax for this code.
DGW
|
|
|
|
|
Should look like this:
MyPictureBox.Image = MyImageList.Images.Item(Index)
Hope that helps!!
Daniel E. Blanchard
|
|
|
|
|
Thanks much - that works. The images are a bit blurry but they are at least showing up now.
DGW
|
|
|
|
|
How can I translate de following VB function ?
Function DateToNumber(dOrig as Date) as Long
Dim HDate as date
HDate = DateSerial(1900,1,1) + TimeSerial(0,0,0)
DateToNumber = Abs(DateDiff("d",HDate,dOrig))
End Function
Regards,
Marcelo
|
|
|
|
|
IN Visual Basic 6?
Thanks
JW
DJ
|
|
|
|
|
Hi
try TerminateProcess API function
BOOL TerminateProcess(HANDLE hProcess,UINT uExitCode)
|
|
|
|
|
You'll need the ToolHelp32 or PSAPI files depending on which OS you want to support. There are a variety of functions in those that allow you to list processes, terminate processes, etc.
|
|
|
|
|
|
You'll have to download PSAPI:
http://www.microsoft.com/downloads/details.aspx?FamilyID=3d1fbaed-d122-45cf-9d46-1cae384097ac&DisplayLang=en
There is function in there which lists processes. If I remember correctly, I think it uses a callback, but that may only be for 16-bit processes. There is also a function that will allow you to terminate a process. You'll have to put the dll on your target machine and declare the functions in your vb code.
|
|
|
|
|
Yopu might try posting a wm_close message to it's main window first - this will allow it to do any proper cleanup like closing files etc. Ideally you should only terminate a process using Terminateprocess if it has hung...IMHO.
'--8<------------------------
Ex Datis:
Duncan Jones
Merrion Computing Ltd
|
|
|
|
|
Does anyone know of a way to set the PC's system time in VB?
Thanks
NR
------------------------------------------
I beat the internet - the end guy is hard.
|
|
|
|
|
use SetLocalTime API function to set date and time.
|
|
|
|
|
Yes I found it thanks - I was having trouble using the API but I finally figured out that the SystemDate Structure items had to be Short not Integer ! Thanks
------------------------------------------
I beat the internet - the end guy is hard.
|
|
|
|
|
Calling the TimeOfDay and setting it does the samething.
|
|
|
|
|
Setting the TimeOfDay Property in Visual Basic
does the samething.
|
|
|
|
|
Doh!
Thanks
------------------------------------------
I beat the internet - the end guy is hard.
|
|
|
|
|
dear all,
how can i detect a system restart using WM_QUERRYSESSION.
i'm able to differentiate between a Logoff and shutdown using the message, but no clue whatsoever of differentiating between a system shutdown and system restart.
plz. respond
regards
|
|
|
|
|
Is there a way to either set a Windows Service (I'm not talking Web Services here) dependencies through code or through the installui utility?
Once my VB.NET service is setup using the command line utility installui.exe, since I have the "Installer" class included in my project with all the options like Type (Automatic, Manual, Disabled), everything behaves like I want... except I see no easy way to set Service dependencies. The "hacked" way of doing it appears to be going to:
HKLM\System\CurrentControlSet\Services\YourServiceName\ and adding a key called DependOnService of type REG_MULTI_SZ and then include the service name(s) you are dependent on. This does appear to work well... except there's got to be a better way than having to manually enter this stuff into the registry.
Anyone?
|
|
|
|
|
You need a service installer in your project. Go to the Design view of your service and right-click in the designer and select 'add installer'. This will add a file called ProjectInstaller.vb which has a ServiceProcessInstaller and ServiceInstaller class. The property window of the ServiceInstaller class will let you add other service dependencies. Search the MSDN for an article entitled:
Walkthrough: Creating a Windows Service Application in the Component Designer
It gives all of the details.
|
|
|
|