|
Dave Kreskowiak wrote: by using VB6, you've made it much harder on yourself. I would highly suggest using VB.NET instead.
I second that. I just wasn't grumpy enough earlier to snap on it for being a VB6 question
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
I just said that because .NET has the Winsock stuff native as well as better P/Invoke support for those net api calls he's going to use, and VB6 doesn't. But, if he really does want to reinvent the wheel...
|
|
|
|
|
Right. The Net namespace should have pretty much everything he is looking for.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
I have a form with two textboxes. One is txtForname and other is txtSurname and I also have a search button btnSearch. I have a table from a MSAccess database below this. The table has the fields "Forname" and "Surname" and what i would like is to, when you type something in either "Forename" or "Surname" the results automatically display in table when button search is clicked like a query when searching a field in a table. How would I do this?
In the end we're all just the same
|
|
|
|
|
Here is an approach I have used:
1) Create an unbound form with 2 text boxes txtForname, txtSurname and your search button, btnSearch.
2) Place a subform on your form which includes your datatable; Employees (or whatever)
3) Put code behind the btnSearch on the Click event that sets a filter for your subform. Example:
me.employee_subform.Form.Filter = me.txtForname.value
me.employee_subform.Form.FilterOn = true
this should get you a head start; you will need to consider blanking out fields and determining which field to filter on.
|
|
|
|
|
Here i search the table and display data in the Grid
http://www.codeproject.com/KB/cs/N-Tier22.aspx[^]
Is this Similar to what you want ?
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Hi
I want to open a note pad for every 2 seconds by setting a timer control..
can anyone can help??
Dim t As New Timer
t.Interval = 500
t.Start()
process.Start("notepad.exe")
I didnt complete the code any one can help?
I dont know how to put loop for opening a note pad for each 2 second
|
|
|
|
|
Drag the timer-icon from the toolbox onto your form. Set its interval = 2000 (milliseconds). Create the timer-tick-event by double-clicking on the timer-icon below you the VS-designer. In this tick-event start your process.
|
|
|
|
|
Thank u for your reply .I have sent my code
.In the textbox if i give "0 :10"
aftre 10 seconds over the note pad will open..
hgow to open the note pad in every 2 seconds .?
In the form load :::
TextBox1.Text = "0 :2" '"2:07:59"
Timer_tick::
Dim timspan As TimeSpan = dt - Now
If timspan.Ticks < 0 Then
Timer1.Enabled = False
Label1.Text = "Test completed"
Button2.Enabled = True
Dim blah As Process
blah = New Process()
Process.Start("notepad.exe")
End If
In the button click event ::
dt = Now + TimeSpan.Parse(TextBox1.Text)
Timer1.Enabled = True
Timer = New Timers.Timer()
'initialise internal timer
_StartTime = Date.Now
_CurrentTime = _StartTime
SetTargetTime(1)
Start()
|
|
|
|
|
Instead of keep asking, whu not read up on the system timer - you have been given the answer bu 2 people already. If you drag a timer from the toolbox onto your form, then double click the timer it will open the timer_click event coce. Now find out the rest by doing a bit of work for yourself.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
|
cbenan wrote: wat is this?U cant answer properly ..we r trying this..if u cant help no need to reply...
And what happens if you can't understand, or refuse to try, the simple answers you've been given?? Those answers are in the simplest terms possible. What do you want?? The code written for you?? What would learn then??
|
|
|
|
|
I did help, I have given you simple instructions to achieve what you are asking for, as has at least one other poster. What more can I do? Write the code for you? Tough.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
|
You put your code in the timer tick event, but are you REALLY sure you want to open notepad every 2 seconds? You will soon be overloaded with them.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
If you manage to get this working, your affection for NotePad will soon be over...
|
|
|
|
|
I've got 2 Buttons, Next and Previous. I'm using these to move through the images saved in my dataset.
However, looking up Buttons in help you should be able to do something in order to set the Data Source. However I'm not getting this option.
Regards
Vidhish
|
|
|
|
|
Buttons have nothing to do with setting a data source, so of course, you didn't find anything in the documentation for the buttons. All a button does is trigger code to run when you click them. You respond to that click by handling the button's Click event. In there, it's up to your code to make any changes required to do what you want, like setting the datasource of another control. A button will not do this for you.
Seriously, pick up a beginners book on VB.NET and work through it. Your question is coming from a complete misunderstanding of how the basic controls work.
|
|
|
|
|
It sounds like you are looking for a control like the BindingNavigator control. I've never used it myself, but you may want to research it as it.
|
|
|
|
|
Im using Visual Studio 2005 VB in language..
i have a "application project " and compiled to produce EXE application installer..
the title is "EMPLOYEE DATABASE MANAGEMENT SYSTEM" This application is a customized user interface that manage all the employee data from an access database... it gets the data and display and you can edit, delete, update the employee information using that custom system software "EMPLOYEE DATABASE MANAGEMENT SYSTEM"
>>My OS is windows vista ultimate.
>>My Developing Tool is VS Studio 2005 Pro VB
>>my application package library or Installer Dependencies or i mean all component library or "dll" which are necessary are:
-stdole.dll
-adodb.dll
-msdatasrc.dll
-Microsoft.stdformat.dll
-Microsoft.Buil.Conversion.dll
-Microsoft.VisualBasic.dll
-Microsoft.VisualBasic.Compatibilty.dll
>>the database i use to access with my application is ACCESS 2000 version
>>and my "software" application, database connection is using OleDbConnection and ADODB Connection
so? stdole.dll is for OleDbConnection.. im i right? and adodb.dll is for ADODB Connection/Manipulation.. im i right?
when i run this installer to my "PC" Win.VistaUltimate and other computer Win2000Pro english version "WITH" or "WITHOUT" MS OFFICE 2003 english version or i mean no MS Office at all.. and after that i run the installed "EMPLOYEE DATABASE MANAGEMENT SYSTEM" application? it pops up and prompt my application "LOGIN Form" before entering the entire application... and after you fill-up, my LOGIN Form will connect to the access database 2000 and try to search valid user login then after confirm? my LOGIN Form will open the table "USER_LOG_TIMEIN" for example.. and insert the user time of login...
i just justified that there is reading and updating transaction between my application from the start you open my application and start to login... and im using OleDbConnection...
and finally?? my application run smoothly!!!
but there is a problem i can't figure it out myself and very confusing part..
that when i try to install my application to laptop with OS of Windows 2000 Prof. Japenese version with an MS Office 2003 English en Japanese version...
the application installed properly and when i try to run the my application???
it pops-up or prompt the LOGIN form... and when i try to fill-up my user account and password... then hit the enter or login??? then the error message pops-up
"System.Data.OleDb.OleDbException"
"System.Data.OleDb.OleDbCommand.ExecuteCommandText"
"System.Data.OleDb.OleDbCommand.ExecuteNonQuery"
and i guest that the error comes from a line with a code like this below from my LOGIN Form...
<br />
myOleCommand = New OleDbCommand("Insert Into tblLogHistory(Log_ID,Log_Name,Time_In,Date_In,Computer_Name) " & _<br />
"Values ('" & .lblIDNo.Text & "','" & .lblActiveUser.Text & "',#" & Format(Now, "hh:mm tt") & "#," & _<br />
"#" & Format(Now, "MM/dd/yyyy") & "#, '" & System.Net.Dns.GetHostName.ToUpper & "')", myOleConnection)<br />
myOleCommand.ExecuteNonQuery()<br />
if my application works smoothly from other pc?? how come this one comes out error related with the OleDbConnection error??? i've check out if the library from installed folder are present and all of library are there specially "stdole.dll" AND "adodb.dll" for my oledbconnection and adodb connection...
Anybody there have any idea??? please help... im very frustrated to find a way out with this mess... please help....
im very greatful to anyone who can help... please??
modified on Thursday, November 6, 2008 3:24 AM
|
|
|
|
|
vbDigger'z wrote: myOleCommand = New OleDbCommand("Insert Into tblLogHistory(Log_ID,Log_Name,Time_In,Date_In,Computer_Name) " & _
"Values ('" & .lblIDNo.Text & "','" & .lblActiveUser.Text & "',#" & Format(Now, "hh:mm tt") & "#," & _
"#" & Format(Now, "MM/dd/yyyy") & "#, '" & System.Net.Dns.GetHostName.ToUpper & "')", myOleConnection)
This is all garbage. Rewrite this code to use a parameterized query instead of string concantentation to build the query directly. The OleDbParameter objects will worry about formatting each value for you to so you can limit strange errors like this.
Search the articles for "SQL Injection" and you'll come up with a very good article by Colin Angus Mackay describing the concepts and showing examples.
|
|
|
|
|
Hello all,
I'm new to this forum site,I found a problem here with my vb program. I need found multiple field of data for 1 main id. Can I put a button to a vb6 grid? My idea is if I click that button,then it will linkup another vb6 grid to show the data that using the same id.
Example such as this: Student A take 3 subject for this semesterin Uni,so the subject column of this student row will be a button. So when I click the button it will expand a new grid from the column so we can see the subject took y the student.
Hope someone can give me ome guidelines for this problem or any sample reference for this using VB6 codes? I have read some sample or VB.NET but not VB6.
Thanks for reading and hope someone might give me some idea/solution. Thank you~!
Regards
JACSON
|
|
|
|
|
First, VB6 is dead. It has not been supported by Microsoft for some time now, and the runtime will not be supported by Windows 7. Support for VB6 by the community and third party controls is also waning. If this is new developement, I highly suggest abandoning VB6 and moving to VB.NET.
Google results for "vb6 add button to msflexgrid[^]".
|
|
|
|
|
Actually its not a toally new system. i am trying to improve the system by adding in the button into one of the grid so easier to display for the user to check it. Anyone can give me any idea about this?
Thanks for reading~!
|
|
|
|
|
Why do you want to add a button? Why not trap a mouse click anywhere on the row and display the next row?
|
|
|
|