Forum: Visual Basic 4 / 5 / 6 6 Days Ago |
| Replies: 3 Views: 230 Hi
Visit here for control array tutorial and try it
http://www.vb6.us/tutorials/vb6-control-array-tutorial |
Forum: Visual Basic 4 / 5 / 6 Jul 30th, 2009 |
| Replies: 3 Views: 567 Hi,
ReDim statement is used to change the size of a dynamic array in procedure level.
Preserve keyword is used to preserve the data in an existing array when you change the size.
Ex
... |
Forum: Visual Basic 4 / 5 / 6 Feb 24th, 2009 |
| Replies: 2 Views: 892 Hi, U can use Usercontrol.Parent Property get the Parent object and use WithEvents keyword to capture the Parent events
'In UserControl
Option Explicit
Dim WithEvents mParent As Form
... |
Forum: Visual Basic 4 / 5 / 6 Feb 7th, 2009 |
| Replies: 3 Views: 793 Hi,
You can also use PaintPicture () to get the portion of image
Code
Option Explicit
Dim iX As Integer, iY As Integer, iHeight As Integer, iWidth As Integer
Private Sub... |
Forum: Visual Basic 4 / 5 / 6 Jan 27th, 2009 |
| Replies: 8 Views: 1,487 Yes, Debasisdas is correct.
Refer
WeekDayName ()
WeekDay ()
&
Other Date Functions
to achieve this.
WeekDayName ( WeekDay ( Date ) ) returns today date in String |
Forum: Visual Basic 4 / 5 / 6 Jan 7th, 2009 |
| Replies: 10 Views: 1,214 Hi,
Use MSFlexGrid.TextMatrix ( row, column ) to get/set then value rom/to the grid. |
Forum: Visual Basic 4 / 5 / 6 Oct 26th, 2008 |
| Replies: 4 Views: 1,293 Hi,
You can try Masked Edit Control instead of TextBox control |
Forum: Visual Basic 4 / 5 / 6 Oct 7th, 2008 |
| Replies: 5 Views: 1,673 Hi, Try to Write MessageBox Coding in Form_QueryUnload event or Form_Unload Event. This is will show the Message whenever user close the Window |
Forum: Visual Basic 4 / 5 / 6 Sep 30th, 2008 |
| Replies: 5 Views: 1,006 Hi, ADO uses similar properties and methods like DAO. It differs in some methods and properties. The way of open the database and Table are somewhat differ. |
Forum: Visual Basic 4 / 5 / 6 Sep 30th, 2008 |
| Replies: 7 Views: 1,303 Hi,
When we use Unload statement the form is getting unload (visible=false) from memory and not destroyed as said by jireh. Then the form is removed from the Forms collection. It is not actually... |
Forum: Visual Basic 4 / 5 / 6 Sep 26th, 2008 |
| Replies: 7 Views: 1,303 Hi,
Global variable or Properties can be used as your suggestion.
Assume you have Ok and Cancel button in your modal form.
In the Modal form, user can click Ok button for approval and for... |
Forum: Visual Basic 4 / 5 / 6 Sep 18th, 2008 |
| Replies: 5 Views: 760 Ok, You can do extract and Concatenate from string. It is another way to solve your problem |
Forum: Visual Basic 4 / 5 / 6 Sep 15th, 2008 |
| Replies: 5 Views: 760 Hi,
I think you want like Stop Watch. Date variables dont take such values, If u set 00:00:00 it automatically changes to 12:00:00 AM.
You can create Your own Date class that implements the... |
Forum: Visual Basic 4 / 5 / 6 Sep 11th, 2008 |
| Replies: 3 Views: 1,879 Hi, Can u post your sub routine or its prototype? |
Forum: Visual Basic 4 / 5 / 6 Sep 4th, 2008 |
| Replies: 2 Views: 1,218 Hi,
I was also faced that problem, but never get good solution. Data Environment is not refresh when add a new Record. It will be static.
But i did separate the Data Environment and my... |
Forum: Visual Basic 4 / 5 / 6 Sep 3rd, 2008 |
| Replies: 3 Views: 918 Hi,
If you want to shade that portion you have know a point inside that portion. |
Forum: Visual Basic 4 / 5 / 6 Aug 25th, 2008 |
| Replies: 5 Views: 1,111 Ok, one solution is to have two FileListboxes. One with Multiselect = 1 (design time). and another with MultiSelect = 2 (Designtime). When user change the property you swap the visibility of the... |
Forum: Visual Basic 4 / 5 / 6 Aug 25th, 2008 |
| Replies: 5 Views: 1,111 Hi, I think error form the line
File1.MultiSelect = 2
because MultiSelect property is read only at Runtime. that is you can set it at design time only. |
Forum: Visual Basic 4 / 5 / 6 Aug 24th, 2008 |
| Replies: 3 Views: 1,052 Hi, Use
ConnectionString =
"Provider=Microsoft.Jet.OLEDB.4.0; Data Source=MyDB;Persist Security Info=true;Jet OLEDB:Database Password=MyPassword" |
Forum: Visual Basic 4 / 5 / 6 Aug 18th, 2008 |
| Replies: 5 Views: 2,159 Code the things said by guest11
Private Sub Command1_Click()
If WindowState = vbMaximized Then
WindowState = vbNormal
ElseIf WindowState = vbNormal Then
WindowState =... |
Forum: Visual Basic 4 / 5 / 6 Aug 15th, 2008 |
| Replies: 1 Views: 1,443 Hi,
Form has WindowState Property.
The values may be
vbNormal - 0 - (Default) Normal.
vbMinimized - 1 - Minimized (minimized to an icon)
vbMaximized - 2 - Maximized (enlarged to... |
Forum: Visual Basic 4 / 5 / 6 Aug 14th, 2008 |
| Replies: 2 Views: 3,094 Hi,
In vb, MOD is an operator to find Remainder
Ex
Dim iRemainder As Integer
iRemainder = 2008 MOD 10 'Here 8 is the Remainder
If you divide one number by another number... |
Forum: Visual Basic 4 / 5 / 6 Aug 4th, 2008 |
| Replies: 11 Views: 1,798 It is correct, just change
Private Sub Label1_DragDrop(Source As Control, X As Single, Y As Single)
If Label1.Caption = "" And TypeOf Source Is Label Then
Label1.Caption =... |
Forum: Visual Basic 4 / 5 / 6 Aug 4th, 2008 |
| Replies: 11 Views: 1,798 Make Enabled property of Target Control is working.
Consider the Above coding
Private Sub Label1_DragDrop(Source As Control, X As Single, Y As Single)
If TypeOf Source Is Label Then
... |
Forum: Visual Basic 4 / 5 / 6 Aug 3rd, 2008 |
| Replies: 11 Views: 1,798 Check the Caption of the Label
> If it is empty then perform the drag operation (that is Change the Caption)
> Otherwise Dont do the Drag Operation
OR
> Make Enabled Property of the... |
Forum: Visual Basic 4 / 5 / 6 Aug 3rd, 2008 |
| Replies: 11 Views: 1,798 Yes, Change the Visible property to false to the source control after making the drag operation. |
Forum: Visual Basic 4 / 5 / 6 Aug 2nd, 2008 |
| Replies: 11 Views: 1,798 I give example for drag and drop
> Place two label (Label1, Label2)
> Change DragMode Property of Label2 to 1 - Automatic
> And try the below code
Private Sub Label1_DragDrop(Source As... |
Forum: Visual Basic 4 / 5 / 6 Aug 2nd, 2008 |
| Replies: 3 Views: 689 Make Stretchproperty of ImageBox to true. |
Forum: Visual Basic 4 / 5 / 6 Jul 26th, 2008 |
| Replies: 4 Views: 1,343 Hi, Use Mid() function or Left() or Right() function for separating the characters and Len () function for Length . |
Forum: Visual Basic 4 / 5 / 6 Jul 24th, 2008 |
| Replies: 4 Views: 1,663 Yes, I agree dmf1978 points, Property is a special feature in VB6. It encapsulates a private member variable inside a class.
For Ex
'in a Class
Private mLength As Integer
Public Property Get... |
Forum: Visual Basic 4 / 5 / 6 Jul 22nd, 2008 |
| Replies: 2 Views: 561 Hi,
I think in vb6 you cannot do this using Shell () function. It just executes the exe files. You can use Win 32 APIs (CreateProcess(), WaitForSingleObject() ...) for this. |
Forum: Visual Basic 4 / 5 / 6 Jul 20th, 2008 |
| Replies: 7 Views: 1,461 To create control array you must do it in design time. When drawing shape form Toolbox to form,
1) First place one shape control and set the properties for the shape. Change the Name of the Shape... |
Forum: Visual Basic 4 / 5 / 6 Jul 19th, 2008 |
| Replies: 7 Views: 1,461 Do you have 140 shapes? How do you name the shapes ? Is it shape1, shape2 .... Shape140...
If you have shapes in control array, it will be useful. because we cannot code as many(140) controls.
... |
Forum: Visual Basic 4 / 5 / 6 Jul 18th, 2008 |
| Replies: 7 Views: 1,461 Hi, Timer will solve your problem.
1) Use a flag variable that indicates bigger to smaller and smaller to bigger as form level.
Dim bBigToSmall as Boolean
Dim iNoOfTimes As Integer
... |
Forum: Visual Basic 4 / 5 / 6 Jul 18th, 2008 |
| Replies: 7 Views: 1,042 Yes, Veena gives the correct code.
I give another way that use Recordset.GetRows. It may be faster.
Dim i As Long
Dim j As Long
Dim sC As Variant
Dim iU1 As Long
... |
Forum: Visual Basic 4 / 5 / 6 Jul 17th, 2008 |
| Replies: 7 Views: 1,042 Hi, Instead of specifying the field name use field index and a loop.
For Example
Dim sAdd as String
Dim i as Integer
For i = 0 To rekod.Fields.Count - 1
sAdd = rekod.Fields(i) & vbTab... |
Forum: Visual Basic 4 / 5 / 6 Jul 17th, 2008 |
| Replies: 3 Views: 1,162 yes, my suggestion is to select TextBox with lock property to True because you can copy from textbox but ListBox and Combobox not having this facility. |
Forum: Visual Basic 4 / 5 / 6 Jul 17th, 2008 |
| Replies: 4 Views: 2,364 Hi, Rnd () function generates random number.
Dim iNumber As Integer
Randomize
iNumber = Int(2 * Rnd)
If iNumber = 1 Then
'Head
Else
'Tail |
Forum: Visual Basic 4 / 5 / 6 Jul 13th, 2008 |
| Replies: 2 Views: 711 Hi, Are you using any loop? Then use DoEvents inside the loop. If you call DoEvents in your code, your application can handle the other events.
Ex
For ............
DoEvents
... |
Forum: Visual Basic 4 / 5 / 6 Jul 12th, 2008 |
| Replies: 5 Views: 763 Yes, This control is ListView.
To draw the Similar, as Jx_Man said insert Component (Microsoft Windows Common 6.0(sp6)) into your project and Change the Following property.
View - Report... |