248 Posted Topics

Member Avatar for stream4559

Post the exact error message. With [B]Turbo C 2.01[/B] I tried a simple "Hello, World" program. I started in a different directory from the TC path. I just typed in the path: e.g. [I]C:\Documents and Settings\hkdani\My Documents\cfiles > c:\tc\tc.exe.[/I] I compiled the program and it ran fine. And the [B]PATH[/B] …

Member Avatar for timetraveller92
0
209
Member Avatar for Misbah khan

[CODE]'form 3rd form Dim p As String Private Sub Form_Load() Label1.Caption = Form1.p End Sub[/CODE] You're using private variables from another form. If you want to use the variables from another form, you must declare those variables as Public and not Private. Once you use Form1 followed by the period, …

Member Avatar for hkdani
0
168
Member Avatar for dwiniers

[QUOTE]without clicking the edit, delete, and add button[/QUOTE] That's the key to your solution. Write code in the click event of these buttons to enable the text box controls so that the control will respond to user activity. [code=vb6] TextBox1.Enabled = False ' Need to set this at design time …

Member Avatar for dwiniers
0
193
Member Avatar for wrx_2011

[I]Hola. Que Tal? [/I] Use an Adobe Acrobat Browser Control Type Library. If you have Adobe's Acrobat Reader installed, it should show up as a component in your Visual Basic Components. Add this control to your form. And then use something similar to the following to load a file: [icode]AcroPDF1.LoadFile …

Member Avatar for hkdani
0
98
Member Avatar for mitchney

I see you have a [icode] .ListSubItems [/icode] But where are you declaring a ListItem. I don't see that in your code. [code=vb6] Dim si as ListItem[/code]

Member Avatar for mitchney
0
264
Member Avatar for mitchney

[QUOTE]i am using the adodb as my recordset..what should i put as my recordsource?[/QUOTE] There are different ways to open a recordset. I usually do the following: [code=vb5] Dim cnAdodb as ADODB.Connection Dim rst as ADODB.Recordset Dim strSQL as String set cnAdodb = new ADODB.Connection set rst = new ADODB.Recordset …

Member Avatar for hkdani
0
449
Member Avatar for mokong

Use the ItemClick event Please, use code tags when posting your code: "code=vb6" "/code" but use brackets [] instead of quotation marks. Click on the Code Tag Icon next to quote tag in the editor. It should paste the appropriate code tags into the editor automatically. [CODE=vb6]Private Sub ListView1_ItemClick(ByVal Item …

Member Avatar for mokong
0
119
Member Avatar for diamondw

Just use the ASCII values Chart for the characters. I don't know why you're using all those Mod functions? ASCII values for the UpperCase letters run from 64- 90, lowercase from 97 - 122. You'll have to write code to deal with any shifts that throw you over the limits …

Member Avatar for diamondw
0
144
Member Avatar for PH.Ric

There's a property for the datagrid called AllowDelete. Set that property to True. Otherwise, it will not allow the user to delete data.

Member Avatar for mokong
0
228
Member Avatar for jillwimmersbloo

That should get you started. Use your documentation to find out which methods to use. [I]I hope you have not waited till the last minute![/I] [CODE=vb.net]Public Class frmScoreBoard Private Sub bnEnterScore_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bnEnterScore.Click Dim strScore As String Dim intTotal As Integer, intCounter As …

Member Avatar for hkdani
0
742
Member Avatar for jillwimmersbloo

You're in the wrong forum. You are using VB.NET. This is VB4/5/6 Post over there and someone, more than likely, will help you. [code=vb6] [Public Class footballfever Private Sub Label2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label2.Click End Sub Private Sub ExitToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As …

Member Avatar for hkdani
0
1K
Member Avatar for theofilos93

[QUOTE=Narue;1675904]It's called being an idiot.[/QUOTE] Idiot is an inaccurate statement and unacceptable for use. The word idiot comes from two Greek words which mean "out of mind." It has become a commonplace expression in our more recent culture on the planet. Apparently, it was also considered an unacceptable practice when …

Member Avatar for hkdani
0
286
Member Avatar for bonzo2008

First of all, it would help for readability to use what are universally accepted variable declarations for variables. For example, use str at the beginning of a string variable, int at the beginning of an integer, lng at the beginning of a long variable, etc. [code=vb6]strDateGreece as String ' as …

Member Avatar for hkdani
0
177
Member Avatar for keylord1013

Use a timer control. Set the interval property to 1000 milliseconds. Use the enabled property to start and stop the timer. Use static variables inside the timer functions to store minutes, seconds. Just a few suggestions to get you started. But as WaltP pointed, you haven't posted any code. If …

Member Avatar for hkdani
0
212
Member Avatar for vedro-compota

Try using a file and assigning to stdin? [QUOTE]/* * The structure underlying the FILE type. * * Some believe that nobody in their right mind should make use of the * internals of this structure. Provided by Pedro A. Aranda Gutiirrez * <paag@tid.es>. */ #ifndef _FILE_DEFINED #define _FILE_DEFINED typedef …

Member Avatar for hkdani
0
6K
Member Avatar for SI THU
Member Avatar for 4ukh

There's really not much difference in setting up a local or wide area network. You just have to have a network connection. Logon to a shared directory on the server. And preferably map that location or shared resource as a drive on the client system. It should then show up …

Member Avatar for hkdani
0
103
Member Avatar for bikashdas

You're using VB.Net. This is VB6. I don't have much experience with VB.NET. You might try on that forum.

Member Avatar for bikashdas
0
227
Member Avatar for mightyjoe77

Apparently, your text file has input something like the following: George, 99 Lisa, 82 WaltP, 100 Each line in the text file can be assigned to a variable. And then you can declare a variable to keep track of the information. One popular method is to declare your own type. …

Member Avatar for hkdani
0
104
Member Avatar for SI THU

One way is to add the Scripting Type Library to your project and use the File System Object. From the Project Menu in your IDE, choose the References Menu. Look for the Microsoft scripting runtime libray and add it to your project. [code=vb6] Private Sub DeleteFolder (ByVal FolderName as String) …

Member Avatar for SI THU
0
101
Member Avatar for henpecked1

I would recommend VB over C for working with Access database files. Writing code for C is more complex for working with Access Databases. Of course, a typical C programmer likes things more complex, anyway. But Visual Basic 5, 6 was basically built to run Access databases and is fairly …

Member Avatar for hkdani
0
126
Member Avatar for PinoyDev

[CODE=vb6]Private Sub Text1_Change() On Error GoTo ErrMsg Dim LstItm As ListItem Dim Strt as Integer With ListView1 .FindItem(Text1.Text, , , 1).Selected = True 'If something was chosen then we get the rest of it strt = Len(Text1.Text) Text1.Text = .SelectedItem.Text Text1.SelStart = strt Text1.SelLength = Len(Text1.Text) - strt End With …

Member Avatar for PinoyDev
0
689
Member Avatar for lmoe23

[I]Just a little code to help you with your assignment[/I] [code=vb6] Const LAZY_BUM = 0 Const HARD_WORKING_STUDENT = 1 Private Sub Form_Load() Dim i as Integer i = MsgBox("Am I a good student student?", vbYesNo, "Character") If (i = vbYes) MsgBox "The test of your character is what you do …

Member Avatar for hkdani
0
837
Member Avatar for Aman6o

Don't use the second include line in the first file. You don't need that. Use the extern keyword in the first file on lines 5 and 6: Since these functions are external to this file and are found in the second file. And then compile your file on the command …

Member Avatar for Aman6o
0
211
Member Avatar for Alba Ra

[QUOTE]I tried to open a connection from an Excel file to itself as if it were an external database, only to be told by the Wizard that it does not contain any tables. And I don't know whether this is a problem within the Excel file or due to it …

Member Avatar for Alba Ra
0
323
Member Avatar for sandeep.shivara

Working with Excel Sheets is not too well documented anywhere. So, here is some code to open up an existing excel worksheet. But you have to know the worksheet name. And you have to be aware of what the Actual Row and Column is. If you know you have values …

Member Avatar for hkdani
0
97
Member Avatar for minimi

You don't need to initialize the array at first. But you should define an array after [code=c]int main(void) // use void, don't leave it blank // declare your array to your previously defined struct here. // I'm not going to do it for you. int i ; for (i = …

Member Avatar for hkdani
0
135
Member Avatar for ticktoc09

[QUOTE]My question is how can I save the database path? because whenever I change computer from Home to School I need to reconnected all the database connections.. or else a "/db/.mdb is not a valid path" error pops out.. I still can't figure it out how to set a database …

Member Avatar for hkdani
0
162
Member Avatar for DmytriE

malloc returns a pointer to void. You're trying to typecast a pointer to an integer pointer to what malloc expects to be a pointer to a variable of whatever type. That might be the problem. Other than that, I wouldn't know what to tell you without further details. [QUOTE]The code …

Member Avatar for Narue
0
95
Member Avatar for dan1992

#include <stdio.h> // prototypes for functions. int tipareste (int a[]) ; int permuta (int k) ; int main(void) { int i = 10, num = 4 ; for (i = 1; i <= n; i++) { } return 0 ; } // Put your functions down here: // Also, goto …

Member Avatar for hkdani
0
104
Member Avatar for alone882

Why do you want to regress to VB6? There is no console program in VB6: [icode]System.Console.WriteLine[/icode] You're using namespaces. Using namespaces are a superior feature of the VB.Net language. You can use class modules in VB6 for classes. But the .NET platform was developed mainly because of the internet revolution, …

Member Avatar for hkdani
0
423
Member Avatar for gourav1

You want to use the malloc function to allocate memory on the heap for the size that a variable, array, etc. will occupy. One way the * operator can be explained is by saying "the contents of" in its place. So, your first example makes sense: the contents of new1 …

Member Avatar for gourav1
0
161
Member Avatar for nered

[CODE]#include <direct.h> #include <stdlib.h> #include <stdio.h> int main( void ) { char* buffer; buffer = (char*)malloc(sizeof(char)*MAX_PATH) ; // Get the current working directory: if( (buffer = _getcwd( NULL, 0 )) == NULL ) // code to deal with error else { printf( "%s\n",buffer ); free(buffer); } }[/CODE] Adapt it to …

Member Avatar for nered
0
201
Member Avatar for hegde1997

That's a good suggestion. Using one of the managed code languages is easier. However, the managed code languages were more than likely developed with C. [QUOTE]Eh C is more based for Console App.[/QUOTE] The majority of the Windows API is written in C. But most Operating System's have a media …

Member Avatar for hkdani
0
278
Member Avatar for bonzo2008

You should use the International Friendly functions supplied with VB6. This must be a classroom assignment. You're not the first to post here about how to do this. Look up the following phrase in yous MSDN documentation: "Writing International Code in Visual Basic" But never use a string value for …

Member Avatar for bonzo2008
0
312
Member Avatar for daddiedan

You'll have to set up your program to use Active X Data Objects (ADO) : usually Microsoft Active X Data 2.X. You can use Data Access Objects (DAO). But ADO is more up to date. Not as fast. But more up to date. Do this in the References section of …

Member Avatar for hkdani
0
100
Member Avatar for bonzo2008

International settings can be changed in VB6 by the end user by changing the locale settings in the control panel. In VB6 you should be careful to use international friendly code so that this can be done, for example: [icode]format(curAmount, "currency") [/icode] The code will search the user's locale settings …

Member Avatar for hkdani
0
159
Member Avatar for dwiniers

Use a select case statement and an array of command buttons called something say cmdBtnProp. So you should have cmdBtnProp(0), cmdBtnProp(1), etc.... Then whenever the user clicks on one of the buttons, it will point to the same section of code. At this time, you'll use the Select Case mechanism …

Member Avatar for dwiniers
0
323
Member Avatar for throide

What do you mean? Update the items that I checked in my listview? That statement could have as many variations as there are people in the world. Give us your desired outcome and we could possibly give you your desired code.

Member Avatar for hkdani
0
35
Member Avatar for enovez

You need to set the connection properties before using the setting the recordset connection properties [code=vb]With conn .Provider = "Microsoft.Jet.OLEDB.3.51" ' or 4.01 or whatever .Open "c:\MyAccess.mdb", "admin", "" End with Set Rs = New Recordset Adodc1.RecordSource = " select * from logfile where no_ponsel = '" & textSearch & …

Member Avatar for dwiniers
0
100
Member Avatar for mameemonster

More than likely your program is crashing because you are asking scanf to enter a string when you only give it one character: [icode]scanf ("%s", &name[i][30]);[/icode]. You must supply scanf with an array of characters: e.g. [icode]scanf ("%s", &name[i]);[/icode] What you have declared [icode]char name[30][30] ; char add[30][30][/icode] is a …

Member Avatar for WaltP
2
440
Member Avatar for Quenchy coder

The Combo Box has a Click Event. When a value in the Combo List Box is clicked, it raises the Combo_Click() Event. Select the Combo1 Control from the Control List box on the left hand side of the IDE. And then click on the Combo_Click Event. That should set code …

Member Avatar for hkdani
0
110
Member Avatar for sifuhall

Why are you putting a vbcrlf in the file name? Unless vbcrlf character happens to be part of the file name, don't include it as part of the file name. MessageBox will not show you the vbcrlf character: it's invisible to the human eye.

Member Avatar for sifuhall
0
520
Member Avatar for dwiniers

Every VB6 control has a default value. For instance, the text box control's default value is text. So, if I just code say Text1, that would be equivalent to Text1.Text. Combo1 has a default value. Find out what it is and that will help you out. It's probably text. Other …

Member Avatar for hkdani
0
128
Member Avatar for alone882

I don't know. I banged my head around with VB6's internet functions. To no avail. I really don't think they work. But you're using API's. You might try bypassing the username and password and just open the URL directly injecting the username and password into the URL: e.g., [url]http://username:password@whatismyipaddress.com[/url]

Member Avatar for hkdani
0
434
Member Avatar for coder_10

Good grief. Now you have an array of an array of characters: [icode]char *message[1024]. *t[50];[/icode] Use [icode]char message[1024], t[50] ;[/icode] [CODE]#include <stdio.h> int main(void) { char message[]= "hello" ; printf("%s\n", message) ; return 0 ; } [/CODE]

Member Avatar for hkdani
0
201
Member Avatar for maybnxtseasn

They both compile and give the same results. A function has its own unique memory address. The function's entry point is this address. Therefore, you can use a pointer to a function to call the function which is essentially what you are doing in the second declaration. [icode]int (*pFcn)(int, int) …

Member Avatar for Narue
0
87
Member Avatar for SpiritualMadMan

Well, don't post expecting immediate positive feedback. Just post out of a sincere desire to help the individual. [I]Cast your bread upon the waters, for after many days you will find it again. Let us not become weary in doing good, for at the proper time we will reap a …

Member Avatar for Netcode
0
191
Member Avatar for Bamboozled

It does not look like you have instantiated your object. Use one of the following 2 methods: [code=vb6]Dim fso as FileSystemObject set fso = new FileSystemObject ' Or Dim fso as New FileSystemObject [/code] The first method is early binding and is quicker. The second method is late binding and …

Member Avatar for Bamboozled
0
363
Member Avatar for androidz

This usually means that the function you're requesting from your ActiveX Database Object (ADO) is not supported. Which probably means you're not using the right cursor type for the function that you are requesting. Certain functions are only supported with certain cursor types. You might try changing which type of …

Member Avatar for hkdani
0
567

The End.