|
girishpalmah wrote: If any one has source code of computer Lab managament system in VB .NET programming language then reply me
What do you wish to monitor?
If you try to write that in English, I might be able to understand more than a fraction of it. - Guffa
|
|
|
|
|
Hi, I have a real problem
I have been trying for days to thik of a solution for the following;
I have a table called AccessGroup and another called AccessPermission. I have a link table between the 2 because you have any number of AcessGroups assigned to any number of AccessPermissions.
When I want to ADD an access group, I simply input and Name for the AccessGroup like ADMIN. Then I select from a DataGrid, using checkboxes, AccessPermissions. I can choose as many as I want. When I click on SAVE, the link table will be populated with the relationship between the ADMIN AccessGroup and the AccessPermissions Chosen.
Here's the problem. When I select an AccessGroup from a DataGrid for updating, The ADD page appears with a textbox loaded with "ADMIN" and it is ReadOnly. That's fine. What I also want is for the checkboxes in the DataGrid which has all the AccessPermissions in a list to be CHECKED depending on what AccessPermission are assigned for that AccessGroup.
I hope that made sense. Please help.
Thanks!
|
|
|
|
|
Can you create an event so that when an item from AccessGroup is selected and then the 'Update' button is pressed, that the table that opens up has the selections of all the possible accesspermissions. Then all you need to do is run through a loop for each permission setup for the item on accessgroup and have it check the neccessary boxes.
|
|
|
|
|
Helo Everybody!
Im jonmargs from Bacolod city,Philippines. I am a new
member of Code Project...Ive been using clipper and dbase for 2
years and now i am upgrading my skills in windows programming.
Right now im Creating a program in Vb6.0 my backend is MSSql 2000
and Crystal 9.0 for my Report... my problem goes like this...
i am planing to create a report that can call stored procedure from MSSql
2000 to display in crystal report...Does anybody have this sample code?
thanks...
jonmargs;)
|
|
|
|
|
We have have 10 VB6.0 proejcts, all the 10 projects are refered by one Main Project (Vb6.0)
Using VS2005 upgrade wizard, we have migrated only the Main Project, .net automatically created interop for the other projects.
The application (migrated application) is running smoothly .net.
But while closing the applicaiton we are getting the following error :
"unhandled exception at 0x660688 (msvbvm60.dll) in DBCenter.exe: 0xc0000005: Access violation reading location 0xfeeeffaa"
Please help us to resolve this error.
Advanced thanks
Mano
|
|
|
|
|
good day to everyone, once again i need your help...
can anyone give me any third party grids that is customizable?... links are very highly appreciated thank you....... to be used for vb.net2005.... tnx tnx tnx.. datagridview is limited, its my last option... thank you very much....
nothing is impossible.....
|
|
|
|
|
How to Invoke the record in openoffice database
what is the provider in openoffice database.
i have try in sqldataprovider,Oledbdataprovider,Jet and the default wizard type also used.
so,please tel the open office provider...
Santhosh
|
|
|
|
|
how to convert excel data to sql server using vb.net code?
thank you
|
|
|
|
|
Error 1 Unable to write to output file 'C:\Documents and Settings\John\My Documents\Visual Studio 2005\Projects\Customers Database\Customers Database\obj\Debug\Customer Database.exe': System Error &H80070714&
It pops up when i try to run my program, also, i am unable to re-build my application.
Posted by The ANZAC
|
|
|
|
|
The ANZAC wrote: Error 1 Unable to write to output file 'C:\Documents and Settings\John\My Documents\Visual Studio 2005\Projects\Customers Database\Customers Database\obj\Debug\Customer Database.exe': System Error &H80070714&
It pops up when i try to run my program, also, i am unable to re-build my application.
At a guess, the program is still resident in memory. Bring up the process list in task manager and see if 'Customer Database.exe' is running. If it is, then kill it.
Otherwise, check the read/security permissions on the exe and make sure you have permissions to write it.
Also, check to make sure the folder exists.
|
|
|
|
|
Once again, solved my own problem( that I created anyway. lol). I had an icon, that i had created, the icon contained support for 256x256 pixel vista icons, yet vs can't compile these so it spat this error. I edited my icon now all is fine.
Now for the question:
What do you suggest as the best method to validate text feilds on a form? The controls are databound(SQL). Would it be best to use masked textboxes or string validation? What is the best way to do string validation? Are there other ways to validate that are simpler and more effective?
OK 4 questions (I got carried away. lol)
Posted by The ANZAC
|
|
|
|
|
If you want to validate the length of input, just set the "MaxLength" property of the texbox to something.
If you want the field to be required, user a <asp:RequiredFieldValidator>
If you want the text box to be a specific set of numbers or date. Study and use the <asp:CompareValidator>
If you want to do anything funky, check out the <asp:RegularExpressionValidator>
(checkout http://regexlib.com/DisplayPatterns.aspx)
For each Validator, if you set the "Display" property to Dynamic, then the text in the "Text" property will be displayed NEXT to the textbox control. if the "Display" property is set to None, there will be no display to the error message. The advantage in that one is that you can place a <asp:ValidationSummary> control which will display all error messages in one block from ALL the validation controls.
Play around with these things. It's quite fun
|
|
|
|
|
This all sounds interesting, but i'm writing a windows application. Is it still applicable.
Posted by The ANZAC
|
|
|
|
|
Not sure mate.. sorry. I am programming a web application
|
|
|
|
|
Simply define what the user can and can't put in.
Use this in the forms keydown (make sure keypreview is enabled) to determine if it's a number or a letter:
<br />
Alpha = False<br />
<br />
If e.KeyCode < Keys.D0 OrElse e.KeyCode > Keys.D9 Then<br />
If e.KeyCode < Keys.NumPad0 OrElse e.KeyCode > Keys.NumPad9 Then<br />
Alpha = True<br />
End If<br />
End If<br />
If e.KeyCode = Keys.Back Then<br />
AllowBack = True<br />
Else<br />
AllowBack = False<br />
End If
Then use this in the field's keypress if you only want letters and other characters:
If Alpha = True Then<br />
e.Handled = False<br />
Else<br />
e.Handled = True<br />
End If
And use this in the field's keypress if you only want numbers and not other characters:
If Alpha = True Then<br />
e.Handled = True<br />
Else<br />
e.Handled = False<br />
End If<br />
If AllowBack = True Then<br />
e.Handled = False<br />
End If
-- modified at 0:13 Saturday 9th December, 2006
Posted by The ANZAC
|
|
|
|
|
Hello,
I have a checked list box. When I run the application the checked is populated. But when I click on one of the items in the list, I have to check it twice to check the item.
Is there anyway that I can do to just single click to check an item in the list.
Many thanks in advance,
Steve
|
|
|
|
|
Got it, Should have seen that.
clickOnCheck is the answer.
Steve
-- modified at 1:23 Friday 8th December, 2006
|
|
|
|
|
I am trying to get information on creating a virtual printer driver in vb.net.
Basically, I need the application to appear as a printer in the windows print dialog. When a text file is "printed" to this program, I have custom logic to parse the text file.
Any help is appreciated!
|
|
|
|
|
I need to seacrh a simple customer database. As the user types in letters to a textbox, the a listbox filled with all available options will highlight the closest option to what is being typed.
e.g. in textbox "j" is typed
Listbox highlights "jim"
When "jo" is typed the list should highlight john
How would i search the database (sql) for the closest match on the text_changed event
I am using Visual studio 2005, a dataset, binding source and table adapter.
P.S. Would it be possible to search a list box in the same method without actually searching the source.
Posted by The ANZAC
|
|
|
|
|
You can filter the listbox by iterating over methods and using the string.Contains method.
select * from blah were col LIKE @param + '%'
will find all strings that start with @param.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Thanx Christian, i found an easier way though...FindString, this searches the listbox as the user types, as this changes, the listbox highlights the most relevant item, and because all my controls are databound to the same source, this then displays the correct information in the other fields i have.
Dim i As Integer = Me.lstLast.FindString(Me.txtSearchLast.Text)<br />
Me.lstLast.SelectedIndex = i
Posted by The ANZAC
|
|
|
|
|
How do i reset 1st item for combolist VSFlexGrid to blank after load the data from database, eg:
If adoRset.RecordCount > 0 Then<br />
grdPeriods.ColComboList(grdPeriods.colIndex("VintageID")) = grdPeriods.BuildComboList(adoRset, "VintageCode", "VintageID")<br />
End If
Thanks
Angela
|
|
|
|
|
This script works great on the XP box I wrote it on but not on a Win 2000 box.
The script was found while Googling and I have added the rename sub and a few other changes to suite my required task.
I am reletivly new to dev and am not sure if the problem is win2k supporting the script or if the script needs changing.
The problem is at line 70 creating the tcp ip ports. if I take this out the script runs to completion telling me the printers are added but they are not.
I manually added the ports and re ran the script but no luck.
Please help...
<br />
'This script will add ip ports for your local printers and attach printers to<br />
'those ports. Just edit the arrays to reflect the paths for the .INF files<br />
'and get the printer descriptions from the .INF files. If the printer is listed<br />
'in the system32/inf/ntprint.inf use that as the .INF it tells the script where<br />
'to look for the driver otherwise use the UNC path to get the path.<br />
'===================================================<br />
strComputer = "."<br />
'strComputer can be an array of netbios computer names or<br />
'ip addresses put into a for loop<br />
'===================================================<br />
<br />
Public Error<br />
Dim Count:Count=0<br />
Set WshShell = WScript.CreateObject("WScript.Shell")<br />
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")<br />
<br />
<br />
Wscript.echo "This process may take several minutes please be patient." & VbCrLf _<br />
& "Another pop-up box will inform you when it is finished."<br />
<br />
'Here is where your edit the port IP addresses<br />
'===================================================<br />
Dim IPArray<br />
IPArray = Array( "192.168.100.1","192.168.100.1")<br />
Dim PrintersArray<br />
'===================================================<br />
<br />
'Here is where you enter the driver inf paths<br />
PrintersArray=Array("C:\CanonDrivers\win2k_xp_PCLModBW\P52KUKAL.INF",_<br />
"C:\CanonDrivers\win2k_xp_PS_2-9\W2KPS3K.INF")<br />
'===================================================<br />
<br />
'Here is where you edit the printer names<br />
Dim PrinterNames<br />
PrinterNames=Array("Canon iR C5180 PCL5c", "Canon iR C5180 PS3")<br />
'===================================================<br />
<br />
'Here is where you edit the new printer names<br />
Dim PrinterNewNames<br />
PrinterNewNames=Array("Black and White", "Colour")<br />
'===================================================<br />
<br />
For n = LBound(IPArray) To UBound(IPArray)<br />
'Install the IP printer ports<br />
Install_IP_Ports IPArray(n)<br />
Next<br />
For n = LBound(IPArray) To UBound(IPArray)<br />
Count = Count + 1 'just increments the counter for the message at the end!<br />
'===================================================<br />
<br />
'Add the printers (Arguments: ip port, path to the .inf files, printer name)<br />
'get the name from the inf files or make one up!<br />
'===================================================<br />
<br />
Add_local_ip_printer IPArray(n), PrintersArray(n),PrinterNames(n)<br />
Next<br />
'===================================================<br />
<br />
'If only one printer in array set to zero e.g. PrinterNames(0) or comment out!=<br />
Make_Default_printer PrinterNewNames(0)<br />
<br />
'===================================================<br />
'Install the TCP/IP Port(s):<br />
Function Install_IP_Ports(strIPAddress)<br />
<br />
Set objWMIService = GetObject("Winmgmts:")<br />
objWMIService.Security_.Privileges. _<br />
AddAsString "SeLoadDriverPrivilege", True<br />
<br />
Set objNewPort = objWMIService.Get("Win32_TCPIPPrinterPort").SpawnInstance_<br />
objNewPort.Name = strIPAddress<br />
objNewPort.Protocol = 2<br />
objNewPort.HostAddress = strIPAddress<br />
objNewPort.PortNumber = "515"<br />
objNewPort.Queue = "lp"<br />
objNewPort.SNMPCommunity = "public"<br />
objNewPort.SNMPEnabled = False<br />
objNewPort.Put_<br />
<br />
'stop the spooler<br />
Set colServiceList = objWMIService.ExecQuery _<br />
("Select * from Win32_Service where Name='Spooler'")<br />
For Each objService In colServiceList <br />
errReturn = objService.StopService()<br />
WScript.Sleep 1000<br />
Next<br />
<br />
'start the spooler<br />
For Each objService In colServiceList<br />
errReturn = objService.StartService()<br />
WScript.Sleep 5000<br />
Next<br />
<br />
End Function<br />
<br />
Function Add_local_ip_printer(strIP,strPath_To_Inf_Files,strPrintername)<br />
<br />
WSHShell.run ("CMD.EXE /C RUNDLL32 PRINTUI.DLL,PrintUIEntry /if /b "_<br />
& chr(34) & strPrinterName & chr(34) & " /f " & chr(34) _<br />
& strPath_To_Inf_Files & chr(34) & " /r " & chr(34) _<br />
& strIP & chr(34) & " /m " & chr(34) & strPrinterName & chr(34) _<br />
& " /q /u"),0,True<br />
<br />
ReNamePrinter strPrintername,PrinterNewNames(n)<br />
<br />
End Function<br />
<br />
Function ReNamePrinter(prnName,prnNewName)<br />
<br />
Set objWMIService = GetObject("winmgmts:" _<br />
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")<br />
<br />
Set colPrinters = objWMIService.ExecQuery _<br />
("Select * from Win32_Printer Where DeviceID = '" & prnName & "'" )<br />
<br />
For Each objPrinter in colPrinters<br />
objPrinter.RenamePrinter(prnNewName)<br />
'objPrinter.Put_<br />
Next<br />
<br />
End Function<br />
<br />
Function Make_Default_printer(strPrinterName)<br />
<br />
Set colInstalledPrinters = objWMIService.ExecQuery _<br />
("Select * from Win32_Printer") <br />
For Each objPrinter in colInstalledPrinters<br />
If objPrinter.Name = strPrinterName Then<br />
objPrinter.SetDefaultPrinter()<br />
End If<br />
Next<br />
<br />
End Function<br />
<br />
Wscript.echo "Install completed, please check you have 2 printers added" & VbCrLf _<br />
& "One named 'Black and White' and the other named 'Colour'"<br />
'End Script<br />
When people make you see red, be thankful your not colour blind.
|
|
|
|
|
Hi,
I need to round the minutes to the nearest queater of hour. For example if it is 00:07 (hour:minutes) then it would be 00:15, if 00:05 then it would be 00:00.
Any ideas how to go about doing this?
Many thanks for your time.
|
|
|
|
|
you can use an if elseif then statement to accomplish this task or even a select case. Are you pulling the time from the Now function and if so then you will need another var to hold the rounded time value.
Recreating the wheel is the best way to appreciate what the previous coders have gone through to get you where you are now.
|
|
|
|