248 Posted Topics
Re: 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] … | |
Re: [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, … | |
Re: [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 … | |
Re: [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 … | |
Re: 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] | |
Re: [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 … | |
Re: 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 … | |
Re: 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 … | |
Re: There's a property for the datagrid called AllowDelete. Set that property to True. Otherwise, it will not allow the user to delete data. | |
Re: 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 … | |
Re: 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 … | |
Re: [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 … | |
Re: 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 … | |
Re: 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 … | |
Re: 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 … | |
Re: 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 … | |
Re: You're using VB.Net. This is VB6. I don't have much experience with VB.NET. You might try on that forum. | |
Re: 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. … | |
Re: 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) … | |
Re: 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 … | |
Re: [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 … | |
Re: [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 … | |
Re: 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 … | |
Re: [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 … | |
Re: 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 … | |
Re: 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 = … | |
Re: [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 … | |
Re: 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 … | |
Re: #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 … | |
Re: 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, … | |
Re: 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 … | |
Re: [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 … | |
Re: 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 … | |
Re: 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 … | |
Re: 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 … | |
Re: 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 … | |
Re: 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 … | |
Re: 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. | |
Re: 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 & … | |
Re: 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 … | |
Re: 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 … | |
Re: 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. | |
Re: 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 … | |
Re: 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] | |
Re: 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] | |
Re: 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) … | |
Re: 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 … | |
Re: 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 … | |
Re: 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 … |
The End.