Get Current Working Directory


Get Current Working Directory in visual basic 6.0

App.Path Not working

Posted On: Wednesday 12th of September 2012 05:48:57 AM Total Views:  44
View Complete with Replies

RELATED TOPICS OF Visual Basic PROGRAMMING LANGUAGE




how do I get graphs32 control to work?

I inherited a vb6 application and need to update something very simple, but it's turned out not to be so simple. There is a graph control on the form, but I keep getting this error when trying to run the form... "License information for this component not found. You do not have an appropriate license to use this functionality in the design envronment." The ocx file exists in the windows/system32 folder and it's registered. Is there any way for me to get this to work
VIEWS ON THIS POST

71

Posted on:

Wednesday 12th September 2012
View Replies!

How to get from one table row records to another table column records

I need show one table row records another table column records through vb6 program for crystal reports.. Actually i got one table Name : UDV6 select distinct UDv6TxInc,UDv6NTInc,UDv6DvEqu,UDv6TxMal,UDv6TxFgn,UDv6Net,UDv6UIC,udv6fcd FROM UDV6  another table :  select sum(UDv4TxInc) as TaxIncome, sum(UDv4NTInc) as NonTxIncome, sum(UDv4DvEqu) as DivEqualize, sum(UDv4TxMal) as TaxMalaysia, sum(UDv4TxFgn) as TaxForeign, sum(UDv4NetA) as NetPayout,udv4fcd, sum(UDv4HldU) as OSUnit from udv4  I created another table : UWR0001 select UWRDecCd,UWRDistributed,UWRocated,UWRFcd from uwr0001 i use this 2 statements and save the data in to 3rd table(UWR0001) My problem is: 3rd table ( UWRDecCd)  1st field save the data based on the above 2 select statements.. for ex: 3rd Table:  UWRDecCd                       UWRDistributed                            UWRocated                                UWRFcd 1 45789.000 - UDv6TxInc 34456.00 - UDv4TxInc             0001 2 23567.00 - UDv6NTInc  23078.00 - UDv4NTInc      0002 Here UWRDECCd - 1 means  UDv6TxInc  and UDv4TxInc UWRDECCd - 2 means  UDv6NTInc and UDv4NTInc The 1st select statement data need to  save in the 3rd table 2nd column based on the UWRDecCd The 2nd Select Statement data need to save in the 3rd table 3rd cloumn based on the UWRDecCd these all for crystal reports in vb6. i need to do through vb6 program... please any one suggest me.its very urgent..
VIEWS ON THIS POST

35

Posted on:

Wednesday 12th September 2012
View Replies!

How to get in between days

In my program ,i have From date field i.e "02/01/2012" and To date field i.e "07/01/2012".how to get in between days in this format "dd/MM/yyyy".
VIEWS ON THIS POST

46

Posted on:

Thursday 13th September 2012
View Replies!

How to get data from a modal dialog?

I have a form that has a button called [Select Bank] that will open a modal dialog when clicked. The modal dialog has a combobox of Banks, and also the OK and Cancel Buttons. How can I return the selected bank in the calling form after the user click OK I also have problem showing the form because when I used .Show, it's not working. Dim bankForm As New Form_Bank bankForm.Show   But it does open if I used this:   DoCmd.OpenForm(Form_Bank)
VIEWS ON THIS POST

42

Posted on:

Thursday 13th September 2012
View Replies!

using if and for together

Hi I want to give the condition that if the value of i is between 11 and 99 then the code should execute. I don't know how to put if and for together. I want full code.
VIEWS ON THIS POST

63

Posted on:

Thursday 13th September 2012
View Replies!

Exception has been thrown by the target of an invocation.

rated by 0 users VS2008 Pro on Windows 7Recently when I right-click a project in Solution Explorer and then Properties > References or Security, the following Error appears:An error occurred trying to load the page.Exception has been thrown by the target of an invocation.Is there a simple solution please
VIEWS ON THIS POST

36

Posted on:

Thursday 13th September 2012
View Replies!

How to query registry for to get all .NET Framework versions installed

Could you please let me know "How to query registry for to get all .NET Framework versions and service packs installed on a server remotely". i dont have any idea on using VBS.
VIEWS ON THIS POST

30

Posted on:

Thursday 13th September 2012
View Replies!

getting error 80041001 SWbemObjectEX

while running below script on win7, getting error for Put_ Const wbemFlagUseAmendedQualifiers = &h20000 strComputer = "." Set objWMIService = GetObject("winmgmts:" & _ "{impersonationLevel=impersonate,(Security)}!\\" & _  strComputer & "\root\cimv2")  Set colNTEventLogFiles = objWMIService.ExecQuery _  ("SELECT * FROM Win32_NTEventLogFile")  For each objNTEventLogFile in colNTEventLogFiles  'if objNTEventLogFile.LogFileName = "Application" then   objNTEventLogFile.MaxFileSize = 83886080   objNTEventLogFile.OverwriteOutDated = 0   objNTEventLogFile.Put_ wbemFlagUseAmendedQualifiers  'end if Next
VIEWS ON THIS POST

75

Posted on:

Thursday 13th September 2012
View Replies!

getting info to display in text boxes

rated by 0 users hii have a screen where most of the textboxes are been pulled and filled by database which i press my update button.but im doing this new part to it where it looks for midrange values from the info in the datbase and what i want to it is when it runs to display the info in the text boxes not been populate by dbhere is my code Open OPXCOM$ + "\MidRating.TXT" For Input As #fn Do While Not EOF(fn) Line Input #fn, sBuffer ' Input #fn, sBuffer TempArray = Split(sBuffer, ",") ' this will split the data on each comma ' convert your text data into integers for the subroutine MidLevelPostNotched (TempArray(0)), (TempArray(1)), (TempArray(2)) sRatingAgency = (Text2(0).Text) iMidLevelPostNotched = (Text2(2).Text) Loop result = 0 MidRange_Exit: Exit Function MidRange_Error: ErrorRoutine$ = "MidRange" Gerr Err End Function     Public Sub MidLevelPostNotched(iMoodys As Integer, iSP As Integer, iFitch As Integer) Dim iHighest As Integer Dim iArr As Variant If iMoodys = 0 Or iSP = 0 Or iFitch = 0 Then 'get highest value iHighest = iMoodys sRatingAgency = MOODYS_TITLE If iSP > iHighest Then iHighest = iSP sRatingAgency = SP_TITLE End If If iFitch > iHighest Then iHighest = iFitch sRatingAgency = FITCH_TITLE End If iMidLevelPostNotched = iHighest Else 'get median value - Sort the array and get the mid value iArr = Array(0, iMoodys, iSP, iFitch) ' Sort the Array and display the values in order. BubbleSort iArr iMidLevelPostNotched = iArr(2) If iMidLevelPostNotched = iMoodys Then sRatingAgency = MOODYS_TITLE ElseIf iMidLevelPostNotched = iSP Then sRatingAgency = SP_TITLE ElseIf iMidLevelPostNotched = iFitch Then sRatingAgency = FITCH_TITLE End If End If End Sub     and ideas how i can do this from about code was trying it like this but doesnt work sRatingAgency = (Text2(0).Text) iMidLevelPostNotched = (Text2(2).Text)     or do i have to add it to table before i can pull it back dp.SyntaxHighlighter.ClipboardSwf = '/dp.SyntaxHighlighter/Scripts/clipboard.swf' dp.SyntaxHighlighter.Highlight('8527793793e342e6ac529b8d23dec5a0') dp.SyntaxHighlighter.Highlight('1355108adb2f4300897b53fdbe93d4d4') dp.SyntaxHighlighter.Highlight('feb03a6e3a844016b2749a3a03d9e4e9')
VIEWS ON THIS POST

28

Posted on:

Thursday 13th September 2012
View Replies!

using xsd with xml for getting data frm SQL

i need to get data from sql databse to XML file using XSD in VB6
VIEWS ON THIS POST

46

Posted on:

Friday 14th September 2012
View Replies!

hello everyone here in this thread. please help on how to get the....

please help on how to get the accurate number or volume of records encoded between 2 dates selected. this is the code i have so far, but i have an error for filtering the accurate volume of records based on the selected dates: Dim sql As String Dim dtfrom As String Dim dtto As String Dim cn As New ADODB.Connection Set cn = New ADODB.Connection cn.ConnectionString = strConn cn.Open Dim rst As ADODB.Recordset If Label8.Caption = "Database for AUTOMATIC" Then dtfrom = Format(DTPicker1.Value, "mm/dd/yyyy") dtto = Format(DTPicker2.Value, "mm/dd/yyyy")     If dtfrom >= dtto Then     MsgBox "Please enter an invalid date", vbInformation + vbOKOnly, "Query"     Else     Set rst = cn.Execute("SELECT COUNT(*) as RecCount FROM " & _     "NOSAuto WHERE Date_Encoded BETWEEN #" & dtfrom & "# and #" & dtto & "# ", , adCmdText)     Label3.Caption = rst.Fields(0)     End If every time i clicked the command button to get the exact number of volume, for example i entered from 2/1/2010 to 2/28/2010. it also filtering the date for ex. 2/1/2009 and so on. so my problem is, i want only to filter the dates between the specific dates i've entered. 
VIEWS ON THIS POST

63

Posted on:

Friday 14th September 2012
View Replies!

Could you please help me in getting started?

rated by 0 users Hi! I have designed tables for creating a survey form (in asp.net) in my project. They are as shown below. But now I am feeling problem in creating the survey form (web page). I don't know what and how to use. Could you please help me in creating the survey form in asp.net It would be appreciable if you can provide me with a sample code or example.
VIEWS ON THIS POST

71

Posted on:

Friday 14th September 2012
View Replies!

How to get more out of a Dropdown DataGridView ComboBox

rated by 0 users Gents,   For this project I am using Visual Basic in Visual Studio Professional 2008 and SQL 2005 Express.   I have a table in SQL 2005 Express with 4 columns.  These are ID, ProductCode, ProductDescription and Price all included in a dataset called ProductsDateSet.  The ID column is obviously an integer and the primary key.  The ProductCode and Description are both nvarchar(50) and the price is a money column.  The table is called Products.   Initially this DataSet is used to enter product information into the database in Form1 but it is also used on a second VB Form (Form2) resembling a sales invoice.  This is where I have a problem that I hope you can help me solve.   I am using an unbound DataGridView with one ComboBox and 4 other columns.  These are arranged as follows.  Column 0 is “Quantity”.  The sale quantity per item is manually entered when Form2 is used.  Column 1 is the DropDown ComboBox named “Product Code”.  Column 2 is named “Description”.  Column 3 is “Price” and Column 4 is “Total” being the Quantity times the Price.  The ComboBox uses the dataset and ProductsBindingSource with DisplayMember being ProductCode and ValueMember being Price.   As you will see from the code below, this all works if I only want “Price” as the ComboBox’s ValueMember.  This gives me the Price in the correct column and the Total can be calculated.  One big problem.  How do I also show the Item’s Description in the appropriate column and have it track with the changing ProductCode Public Class Form2 Dim Q As Integer Dim P As Double 'Price per item Dim T As Double 'Row total Dim CR As Integer 'Current row index Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'TODO: This line of code loads data into the 'ProductsDataSet.Products' table. You can move, or remove it, as needed. Me.ProductsTableAdapter.Fill(Me.ProductsDataSet.Products) End Sub Private Sub DataGridView1_CurrentCellDirtyStateChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DataGridView1.CurrentCellDirtyStateChanged CR = Integer.Parse(DataGridView1.CurrentCell.RowIndex) If DataGridView1.Item(1, CR).Selected Then DataGridView1.Item(3, CR).Value = DataGridView1.Item(1, CR).Value End If If DataGridView1.Item(0, CR).Value > 0.009 Then Q = Integer.Parse(DataGridView1.Item(0, CR).Value) End If If DataGridView1.Item(3, CR).Value > 0.009 Then P = Double.Parse(DataGridView1.Item(3, CR).Value) End If T = P * Q DataGridView1.Item(4, CR).Value = T DataGridView1.EndEdit() End Sub Private Sub DataGridView1_EditingControlShowing(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewEditingControlShowingEventArgs) Handles DataGridView1.EditingControlShowing If DataGridView1.CurrentCell.ColumnIndex = 1 Then Dim cbo As ComboBox = CType(e.Control, ComboBox) cbo.DropDownStyle = ComboBoxStyle.DropDown cbo.AutoCompleteMode = AutoCompleteMode.SuggestAppend cbo.AutoCompleteSource = AutoCompleteSource.ListItems 'The following lines show settings in the DGV combobox design view 'cbo.bindingSource = "ProductsBindingSource" 'cbo.DisplayMember = "ProductCode" 'cbo.ValueMember = "Price" End If End Sub End Class This function must be possible as similar instances are in use by millions of businesses around the world every day. Any guidance will be appreciated.  I will happiliy provide screen dumps of the database table and DataGridView layout if it would help. dp.SyntaxHighlighter.ClipboardSwf = '/dp.SyntaxHighlighter/Scripts/clipboard.swf' dp.SyntaxHighlighter.Highlight('8a69d8b1e4e4451298c91169da2e6847')
VIEWS ON THIS POST

38

Posted on:

Friday 14th September 2012
View Replies!

ReDim Array and get Subscript Out of Range problem

Public Type ColorArray ColorTable() As Long End Type Dim MyColorArray() As ColorArray Then in code ReDim MyColorArray(1).ColorTable(256) For this I get Index out of Range error
VIEWS ON THIS POST

41

Posted on:

Friday 14th September 2012
View Replies!

How to get date only from a date and time value?

I'm sure I knew this but I can't remember the function to convert a date/time value like "9/13/2012 10:00:00 PM" into "9/13/2012".
VIEWS ON THIS POST

142

Posted on:

Sunday 16th September 2012
View Replies!

ReDim Array and get Subscript Out of Range problem

Public Type ColorArray ColorTable() As Long End Type Dim MyColorArray() As ColorArray Then in code ReDim MyColorArray(1).ColorTable(256) For this I get Index out of Range error
VIEWS ON THIS POST

76

Posted on:

Sunday 16th September 2012
View Replies!

How to get date only from a date and time value?

I'm sure I knew this but I can't remember the function to convert a date/time value like "9/13/2012 10:00:00 PM" into "9/13/2012".
VIEWS ON THIS POST

44

Posted on:

Sunday 16th September 2012
View Replies!

How to get rid of warnings in a project?

rated by 0 users  I have a bunch of warnings dealing with Crystal Reports, which I was going to use in the program but change my mind. I’ve deleted everything I can find dealing with Crystal Reports to no avail. I stall have 20 warnings.
VIEWS ON THIS POST

218

Posted on:

Sunday 16th September 2012
View Replies!

recordset nt getting updated

i have a recorset which is made from excel sheet in vb6.0 & thenthe recorset is populated with truedbgrid its wrking fine now i need to edit the records . when i change the cell values it visiblie on the grid but  after the updatebatch command fr recordset when i debug i get the same old values in the recordset the recordset is nt getting updated
VIEWS ON THIS POST

91

Posted on:

Monday 17th September 2012
View Replies!

get DTPicker date and display in next form's label

hi,i want to get date from on form datepicker to next form date should  display in label when button click.advance
VIEWS ON THIS POST

103

Posted on:

Monday 17th September 2012
View Replies!