|
Check out <DllImport> in the help file.
|
|
|
|
|
How can I use the information from this hardware in VB.Net
|
|
|
|
|
They have released a mamnaged code library that wraps thier API interface and even a few sample applications. You can get them on thier website:
http://www.ealaddin.com/support/hasp/Win32api.asp[^]
I have used it and is seens very stable and easy to use.
I have not played around with any of the envelope stuff though, just with the encoded storage capabilities of the HW key.
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
Jörgen Sigvardsson wrote:
If the physicists find a universal theory describing the laws of universe, I'm sure the a**hole constant will be an integral part of that theory.
|
|
|
|
|
They have samples for accessing generic HASP DLL which is in C++ or Visual Basic 6.0. You could call generic DLL (Win32 DLLs) in VB.NET. Shouldn't be a problem.
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
Hi I am using the following code to replace a string in VbScript.
Documents.Closeall
Documents.Open FileName.txt, "Text"
ActiveDocument.Selection.StartOfDocument
blnFound = ActiveDocument.Selection.FindText(String)
If blnFound = true Then
ActiveDocument.ReplaceText String "ReplaceStr 2.2"
MsgBox "Hello World!", 65, "MsgBox Example"
End If
ActiveDocument.Save FileName.txt
My filename.txt looks like this:
string 2.3,002 4
The script replaces "String" with "ReplaceStr 2.2", but I also want to replace all the part following string i.e 2.3,002 4.
I want my filename to look like this after the script is run:
ReplaceStr 2.2 instead of ReplaceStr 2.2 2.3,002 4
Any help will be very much apprciated.
Thanks
|
|
|
|
|
Is there any way to check that .NET is installed before running? I'm looking to have my program put up an error message stating that .NET needs to be installed if hasn't been yet, kind of like how Windows programs used to tell you that you need to run the program in Windows if you try to start them up in DOS.
To not know is bad.
To not wish to know is worse.
|
|
|
|
|
Your going to need some kind of external process to check for the existence of the .NET Framework BEFORE your VB.NET app is launched. This is because the .NET Framework is needed just to load the VB.NET app.
I haven't been able to find any method of replacing the stub code in a .NET executable to put up the kind of message you want.
But, I could be wrong...
RageInTheMachine9532
|
|
|
|
|
DumpBin /imports indicates that the executable has a static reference to _CorExeMain in mscoree.dll . The loader won't load the executable if mscoree isn't present.
So even if you could replace the stub, it wouldn't help.
|
|
|
|
|
I was 99% sure it couldn't be done, just because of the reason you specified. I was just looking for a second opinion.
About the only way you could do that is to have a second executable check for the existence of the mscore.dll first, maybe with version checking too , then launch the .NET EXE if it finds it.
Thanks!
RageInTheMachine9532
|
|
|
|
|
I have asked a great Delphi coder to code something that detects if the framework is installed. If it is, it launches my application, if not, it tells the user which version is required (1.0/1.1) and gives the option to install it (from the CD). Very efficient way of doing it. The good thing about it being done in Delphi is that it requires no external DLL or runtime (VB6 would require VBRUN6.DLL). It could also have been done in C++, but we felt Delphi was a better language for this purpose.
|
|
|
|
|
I have three datasets that uses one datagrid to display the data. I need to format this datagrid to fit each dataset. However, I couldn't figure out how. Here's what I found out so far. In the DataGridTableStyle Collection Editor, I have created three members: 0, 1, 2. In each of these members, I have defined a GridColumnStyles collection in DataGridColumnStyle Collection Editor their properties. The problem I have right now is how do I call the DataGridTableStyle member at run time. I have three datasets that uses the same datagrid that is why I have three members in the DataGridTableStyle. But I can not figure out how to call the member that will correspond with a dataset that it is bind to the datagrid. Any help to do this task is greatly appreciated!
ljCharlie
|
|
|
|
|
How can I access the name of the server that my code is running on in VB?
|
|
|
|
|
in VB6 you can use the winsock control and query it's hostname related property.
or you can use the 'GetHostByName' WinAPI function
"It was when I found out I could make mistakes that I knew I was on to something."
-Ornette Coleman
|
|
|
|
|
I've got a spin box, how do I set it so that it controls the current value of one of the attributes of my ScrollableControl??
-------------------------------
To begin at the beginning
|
|
|
|
|
Presumably the spin box control raises an event such as SpinBox1.PositionChanged or something similar (Check the controls documentation). You need an event handler for this in pseudocode it is something like this:
<br />
Private Sub SpinBox1_PositionChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SpinBox1.PositionChanged<br />
'Code to handle event here.<br />
End Sub<br />
The event handler should pass data back in the Event args that you can use to set the attribute of the ScrollableControl or you could use the SpinBox controls property to set the value:
<br />
Private Sub SpinBox1_PositionChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SpinBox1.PositionChanged<br />
ScrollableControl.MyAttribute = e.Position<br />
'Or<br />
ScrollableControl.MyAttribute = SpinBox1.Position<br />
End Sub<br />
If you are using VS.Net intellisense should point you in the right direction.
What are the controls that you are using and what are the properties, events and methods that you wish to change on them?
Jim
|
|
|
|
|
Hi Friends
I want to do this without database support. all i m using is collections(ArrayList). my
data is stored in the ArrayList.
I have few entries in my collection and i want to display the entire collection in the
CheckedListBox so the user can make selection, i also want to diaplay TextBoxes for each
record in the collection to be displayed in the CheckedListBox. so in each row displayed
it will display 1 CheckedListBox and 2 TextBoxes + some text retrived from the
collection.
Some thing like below :
...
1. "CheckedListBox" sometext "TextBox" sometext "TextBox"
2. "CheckedListBox" sometext "TextBox" sometext "TextBox"
3. "CheckedListBox" sometext "TextBox" sometext "TextBox"
4. "CheckedListBox" sometext "TextBox" sometext "TextBox"
5. "CheckedListBox" sometext "TextBox" sometext "TextBox"
...
If any one can get the solution to this without database support, it will be of great help
to me
I am not sure whether this can be done without database support or not...!
Many Thankx
Jay
|
|
|
|
|
I have a VB 6 app where we control which menu items to enable based on security policies assigned to users.
To automate the code we stored the menu control names in a table and then assigned these to various security groups.
When a user logged on we read in the list of menus. We than looped through all the controls on the form and looked for controls with ames that match our list and eabled/dissabled appropiately.
in Dot net for some reason Microsoft have hidden the "name" propert for menuitem & panelbutton controls. this means that I CANNOT just loop through a collection and check their names.
I have tried using the REFELCTION code but still cannot see the names of these controls.
Does nayone know of a way to either get these controls names or doing what i did so easilly in VB6.
Please DO NOT tell me to hard code the checking in the form. This would mean that every time I adda new menu item I am going to have to add code in the form to enable/dissable it. Rembeber I might end up having over a hundred forms.!
Thanks in Advance
Del
|
|
|
|
|
I had a similar problem with the MenuItem control, and I got around it by assigning string information to the Tag property. When looping through a collection of controls, I checked the type to see if it was a MenuItem, and if it was, I compared against the Tag instead of the Name like I was using for the rest of the controls.
This still means you'd need to add the Tag info to all those forms, but your application code would still just be in the one place.
To not know is bad.
To not wish to know is worse.
|
|
|
|
|
Hi Guys.
Any ideas on how to find out the ColorSpace of an image file. It doesn't seem to be available through the normal properties/attributes.
Image might be a tif, jpg, bmp, etc.
The app needs to move cmyk pics to one directory while rgb pics go to another.
Any help for a newbie would be appreciated.
|
|
|
|
|
I would like to write some software which checks the status of a printer, gets number of page counts, error details, paper capacity levels etc. through the network.
The printer I using is a DocuPrint N4525.
Some options could be MIBs, LPR/LPD, Port 9100, port 80, IPP, SNMP.
What would the best way be and where could i find documentation for that.
|
|
|
|
|
Your going to have to get with Xerox on that. They have their own program that retrieves that kind of information from the printer. And since you have to register that program, I'd guess that they are not going to give up the protocol information without a fight.
I can't find any publicly available documentation on how these stats are retrieved. I can tell you it is done using TCP Port 9100 on the printer, but the only documentation on that port is that it supports RAW printing, although the documentation on XManager states that it also uses that port for two way communication that does exactly what you want.
RageInTheMachine9532
|
|
|
|
|
There is a .NET component what I at this site[^] that does that.....
|
|
|
|
|
That component monitors the queue and the jobs in it. It does not monitor the status of the printer itself. What he is looking for is hte status of the printer, the error logs, paper capacity remaining, ... stuff like that.
|
|
|
|
|
The PrinterMonitorComponent.PrinterInformationChanged will fire when the status of the printer changes and the PrinterInformation class passed in the event args has status, pages printed etc....
'--8<------------------------
Ex Datis:
Duncan Jones
Merrion Computing Ltd
|
|
|
|
|
I'm sorry, but I don't see in your components, where it returns the printer's Error History and current Paper Capacity remaining.
RageInTheMachine9532
|
|
|
|