405 Posted Topics
| |
Re: Hi, change the above code like this [CODE=VB6] Private Sub Text1_KeyPress(KeyAscii As Integer) 'If ( KeyAscii > 47 And KeyAscii < 58) Then If ( IsNumeric ( Chr ( KeyAscii ) ) Then Else MsgBox "Enter only Numbers" 'Make sure that event is processed KeyAscii = 0 End If End … | |
Re: Hi Visit here for control array tutorial and try it [URL="http://www.vb6.us/tutorials/vb6-control-array-tutorial"]http://www.vb6.us/tutorials/vb6-control-array-tutorial[/URL] | |
Re: Hi, i think adding two time values are possible in VB6 just using time1 + time2. Ex [CODE=VB] Dim Time1 As Date Dim Time2 As Date Dim TotalTime As Date Time1 = "2:15" Time2 = "4:30" TotalTime = Time1 + Time2 Time1 = "3:20" Time2 = "4:45" TotalTime = TotalTime … | |
Re: Hi, I think your problem may be "Your database does not include in Package and Deployment" > Include your DB file when Packaging wizard > In the Installation Path choose your Application Path | |
Re: Hi, You can abort the system shutdown using AbortSystemShutdown () win32 API. Please refer this.. | |
Re: Hi, Use the following syntax to add Column at runtime DataGridView1.Columns.Add ( string ColumnName, string ColumnCaption) If your Combobox values are unique then use ComboBox selected value as Column name and Caption otherwise choose your own column name and Columncaption can be combobox value. because Columnnames are unique. Use SelectedIndexChanged … | |
Re: Hi It is my own coding to convert number to string. I cannot sure to work this code properly. Any way try this. > Create a new Module and Paste the below codes [CODE] Public Function UnitString(ByVal Ind As Integer) As String Dim ToStr As Variant ToStr = Array("Zero", "One", … | |
Re: Hi, [B]ReDim [/B]statement is used to change the size of a dynamic array in procedure level. [B]Preserve [/B]keyword is used to preserve the data in an existing array when you change the size. Ex [CODE=VB] ' ' Declare Dynamic Array ' Dim AnArray() As Integer ' ' Now allocate the … | |
Re: Hi, Where you get error, Can u specify? Then only we can find error easily. That is the line in which the error occured. | |
Hi, I am designing a Task Manager like Application in C#. It displays the currently running processes. I used to get the Process detail using Process.StartInfo. But Process.StartInfo.UserName is empty for all process. How can get the UserName for the currently running processes. | |
Re: HI Use \ operator instead of / operator, because / operator in vb gives floating result and \ operator gives integer result. so floating value will be rounded to integer. For example [CODE=VB] Dim a as Integer a = 3 / 2 MsgBox a ' Gives 2 a = 3 … | |
Re: Hi, U can use Usercontrol.Parent Property get the Parent object and use WithEvents keyword to capture the Parent events [CODE=VB] 'In UserControl Option Explicit Dim WithEvents mParent As Form Private Sub mParent_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) MsgBox "Down" End Sub Public Sub SetParent(mParentForm … | |
Re: Hi, use DoEvents function so that other process get chance. This function helps to disable your form. Example [CODE=VB] Dim bStop As Boolean Private Sub cmdProcess_Click() Do While bStop <> True ' ' Long Process ' CurrentX = 0 CurrentY = 0 Cls Print Time DoEvents Loop bStop = False … | |
Hi, I am using VC++6, MFC Application I am having the member variable - CArray < Coordinates, Coordinates & > mCoordinates. Coordinates is a structure, contains x, y, and z. When i return reference to this object, there is no problem. but When i assign to some reference i get … | |
Re: Hi, Refer FindWindow(), SetWindowText() APIs which helps you to change the Name of start button. | |
Re: Hi Use [CODE=VB] Dim sJanDate as String 'Retrieve empty string if the record is null sJanDate = rsmnth("JanDate") & "" 'Then check it If sJanDate = "" .... Then .... End if [/CODE] | |
Re: Hi, I dont think so such query exist but u can use like this [CODE=SQL] INSERT INTO VALUES ( .... ) , ( .... ) , .... [/CODE] Make such SQL and Execute the single query. | |
Re: Hi, Use a flag variable to decide you want to change the other dropdowns. [CODE=VB] Dim bChangeID as Boolean 'On SelectedIndexChanged event If bChangeID = True Then 'Do change End if 'Set bChangeID = true to change the id [/CODE] | |
Re: Hi, Try ADODB.RecordSet.GetRows () Method which returns array of records. It may seem to be fast. | |
Re: Yes, Debasisdas is correct. Refer WeekDayName () WeekDay () & Other Date Functions to achieve this. WeekDayName ( WeekDay ( Date ) ) returns today date in String | |
Re: [QUOTE]I have a TabStrip with 4 tabs on my form. When the user is editing the information on one of the tabs I want to display a message box confirming whether the data should be saved.[/QUOTE] Hi, You have to display a message box, when closing a form or changing … | |
Re: Try [URL="http://functionx.com/vb6/Lesson14.htm"]ADO Tutorials[/URL] | |
Re: Hi, Refer [URL="http://msdn.microsoft.com/en-us/library/ms675841(VS.85).aspx"]ADODB.RecordSet[/URL] Properties ([URL="http://msdn.microsoft.com/en-us/library/ms676701(VS.85).aspx"]RecordSet.RecordCount[/URL]) that will help you. | |
Re: Hi, You can also use PaintPicture () to get the portion of image Code [CODE=VB] Option Explicit Dim iX As Integer, iY As Integer, iHeight As Integer, iWidth As Integer Private Sub cmdCopy_Click() 'Set Destination Picture box width and Height picDest.Width = iWidth picDest.Height = iHeight 'Copy the Portion of … | |
Re: Hi, ComboBox.Style is ReadOnly property at Runtime, that means you can change its value only design time. Try another logic instead of using Style property. [QUOTE=guest11;785670]But i also want to assign value when user access data from database. Actually what i am doing is, when user enter new data that … | |
Re: Hi, I think there is no record and you have not called ADODC.RecordSet.AddNew method to Add new record. Call Adodc.RecordSet.AddNew() method before enter any value to the text box | |
Re: Hi, Make your Exe path on the local system's registry "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run". It will run automatically when system is on | |
Re: Hi, Use DeviceIoControl() API, to eject the removable storage media. Refer [URL="http://support.microsoft.com/kb/165721"]http://support.microsoft.com/kb/165721[/URL] | |
Re: Hi, Use MSFlexGrid.TextMatrix ( row, column ) to get/set then value rom/to the grid. | |
Re: Hi, Why dont you design your message box using Form, Label and Buttons? > Click Add Form from project menu > Choose "Dialog" from the templates | |
Re: Hi Change ListView.View to Report Add Columns as per the recordset columns Use ListView.ListItems.Add() method to add an item to ListView. It will return a ListItem object. Then use that object to add subitems Ex [CODE=VB] Dim oListItem As ListItem ' Create two columns ListView1.ColumnHeaders.Add , , "First" ListView1.ColumnHeaders.Add , … | |
Re: Hi, Specify in which line error occurs. I guess it from your SQL query. Check whether the fields are existing and spelled correctly. | |
| |
Re: Hi, My suggestion > Use ORDER BY Clause > Iterate thru all records > If duplicate occurs (If current = previous), simply ignores it | |
Re: Hi. When u insert a record, did u give any primary key constrain ? | |
Re: Wrong use of Grd.AddItem() and what about cItemName and cUnit | |
Re: May be this discussion is useful [URL="http://www.daniweb.com/forums/showthread.php?t=135921"]http://www.daniweb.com/forums/showthread.php?t=135921[/URL] | |
Re: Hi, Check the condition that Picturebox1.Top is positive. if it is negative, it will be top of the frame. Dont let the PictureBox1.Top to negative. Similarly dont let the PictureBox1.Top + PictureBox1.Height greater than fraScrollBox.Height | |
Re: Hi, You have to add values dynamically to the second combo box that is in the SelectedIndexChanged event of ComboBox1. | |
Re: Hi Fix returns only integral part Use Round (Number, NumberOfDigitAfterDecimal) to round off the value Ex [CODE=VB] Dim SCI_Num As Double SCI_Num = 22 / 7 MsgBox SCI_Num MsgBox Round(SCI_Num, 2) [/CODE] | |
Re: Hi Please follow the MSDN link [URL="http://msdn.microsoft.com/en-us/library/aa363480(VS.85).aspx"]http://msdn.microsoft.com/en-us/library/aa363480(VS.85).aspx[/URL] This is gives the basic idea of windows message on hardware changes, but not give the full solution. | |
Re: Hi, You may Use regular expression (Regex), for string searching. | |
Re: Hi, You can try Masked Edit Control instead of TextBox control | |
Re: Hi, Is it necessary '@' symbol in [iCODE] objcmd1.Parameters.Add("@PatName",txtname.text) objcmd1.Parameters.Add("@PatId",txtid.text) [/ICODE] ? | |
Re: Hi Friend, Specify how u create splash screen in vb6. We will discuss how in VB.NET | |
Re: Hi, You can try this one [CODE=VB] Public Sub FormattedString() Dim strArray() As String strArray = ToArray("This is the Sample String") 'MsgBox "strArray: " & strArray End Sub Private Function ToArray(strString As String) As String() Dim strArray() As String Dim intPointer As Integer Dim intArrayPointer As Integer Dim strLen As … | |
Re: What is the Main Objective of the Code? | |
Re: Hi Specify further details, what u want to print? etc.. | |
Re: Hi, Specify What type of data you want to save, add and edit? |
The End.