|
|
Tell me the way to customise menus in VB6 with graphical icons and colorfull backgroud. and How to make transparent form.
Shoaib Nawaz
|
|
|
|
|
I think This Feature is not available in vb6. better u can try for any 3rd party controls.
Try for it.
bye !!
V.Gopi.
Easy Design Systems
Coimbatore
India
|
|
|
|
|
Hi everyone,
I need an algorithm/program (code) that can compute planetory position data for a given date/time/place according to Lahiri Ayanamsha (in Indian Astrlogical System). Can anyone please help me to find the same (source code/algorithm) or explain me how to find/calculate it.
Thanks in advanced,
K Amit
|
|
|
|
|
First you need to read your horoscoipe every day until it says "Today you will find the answer to that which you seek."
Then on that day, search Google for amateur astronomy sites that explain planetary position calculations.
Should not be hard to find or figure out - after all I did exactly that when I was a 12 year old kid with a telescope. All I used was a pencil, my dad's sliderule, and "The Field Guide to Astronomy".
|
|
|
|
|
Would this also work for "simple" satellites like those producing GPS information? I am looking for a position-locator algorithm for GPS satellites provided I know the Date-Time(GPS date-time), the satellites I'm reading on my GPS unit on Earth (names, signal strength), and other info I get from GPS data streams.
Thanks.
John-John
|
|
|
|
|
Planetary orbits are very stable, otherwise we would have long to live. They are also well defined. So you can calculate their positions at any given time.
GPS satellite orbits are less stable. See the link below for an overview:
http://www.pdhonline.org/courses/l116/l116content.htm[^]
|
|
|
|
|
Thanks! This looks to be a very informative article. Kepler was a genius!
Regards,
Johnny
|
|
|
|
|
In our datagrid Coding I use The Buildin function "Datagrid1.Select(i)"
If "i" may be 100 Means The 100th Row Will be selected. But I can't able to view the Particular row with in the width of datagrid. If i want to view the row mean, I want to scroll the datagrid and after It can able to saw the record.
Plz Give me suggestion or Coding for my Problem.
I am Mani I work in pondicherry
|
|
|
|
|
Dear all,
How can I change the value in a textbox into local currency format, while inputting?
Thankx
|
|
|
|
|
use format function while the has lost its focus
ex : Txtamount.Text = format(txtamout.txt,"Currency")
OK !!!
V.Gopi.
Easy Design Systems
Coimbatore
India
|
|
|
|
|
No i want the text changed as i input in the textbox, not after lost focus
thanx
|
|
|
|
|
Dear all
I would like some help about one problem . the problem is I want to create a set of strings .this is the example :
there is a string "some" and I want to create new strings that have the same length (the new string also have 4 charaters) but the condition is
the charater "s" can become to charater "a" and "c"
the charater "m" become to charater "k" ,"l" and "u"
the charater "e" can become to charater "b" and "h" .
so the result is we will get the following strings :
1 some 10 soue 19 aole 28 coke
2 somb 11 soub 20 aolb 29 cokb
3 somh 12 souh 21 aolh 30 cokh
4 soke 13 aome 22 aoue 31 cole
5 sokb 14 aomb 23 aoub 32 colb
6 sokh 15 aomh 24 aouh 33 colh
7 sole 16 aoke 25 come 34 coue
8 solb 17 aokb 26 comb 35 coub
9 solh 18 aokh 27 comh 36 couh
I create a function in vb6 but I just can create only 29 strings
so I need some help about this
Please help me on this by create some code in vb6 .
I hope I can get the answer from everyone in this 2 or days !
Thanks !!!!!
Regards,
Ly bun
|
|
|
|
|
If you post the code you are using, maybe we can help.
...Steve
|
|
|
|
|
I have rewritten your code to use a recursive Sub rather than a Function. The main problem with your examle is that you were not inspecting all possible combinations of the input string (i.e. only one iteration of the For...Next loop was ever executed). It can be refined further but this will do for a brief explanation.
This example also uses a Scripting.Dictionary object rather than an array because it simplifies the detection of duplicate strings (I assumed that duplicates were not permitted). Look this up in the VB help files for more information.
Option Explicit
Private Sub GenerateStrings()
Dim wd As Scripting.Dictionary
Set wd = New Scripting.Dictionary
Call test2("some", wd)
'Command1.Caption = wd.Count
End Sub
Sub test2(str As String, ByRef wd As Scripting.Dictionary)
Dim ch As String
Dim ch1 As String
Dim ch2 As String
Dim wlen As Integer
Dim i As Integer
wlen = Len(str)
For i = 1 To wlen
ch1 = Left(str, i - 1)
ch = Mid(str, i, 1)
ch2 = Mid(str, i + 1, wlen)
Select Case ch
Case "s"
Call test2(ch1 & "a" & ch2, wd)
Call test2(ch1 & "c" & ch2, wd)
Case "m"
Call test2(ch1 & "k" & ch2, wd)
Call test2(ch1 & "l" & ch2, wd)
Call test2(ch1 & "u" & ch2, wd)
Case "e"
Call test2(ch1 & "b" & ch2, wd)
Call test2(ch1 & "h" & ch2, wd)
Case Else
End Select
Next
If Not wd.exists(str) Then
Debug.Print str
wd.Add str, str
End If
End Sub
'Function test1(str As String) As String()
' Dim wd() As String, ch As String, ch1 As String, ch2 As String
' Dim wlen As Integer, i As Integer, j As Integer
' j = 0
' wlen = Len(str)
' For i = 1 To wlen
' ch1 = Left(str, i - 1)
' ch = Mid(str, i, 1)
' ch2 = Mid(str, i + 1, wlen)
'
' If ch = "s" Then
' ReDim Preserve wd(j)
' wd(j) = ch1 & "a" & ch2
' j = j + 1
' ReDim Preserve wd(j)
' wd(j) = ch1 & "c" & ch2
' j = j + 1
' End If
' If ch = "a" Then
' ReDim Preserve wd(j)
' wd(j) = ch1 & "s" & ch2
' j = j + 1
' ReDim Preserve wd(j)
' wd(j) = ch1 & "c" & ch2
' j = j + 1
' End If
' If ch = "c" Then
' ReDim Preserve wd(j)
' wd(j) = ch1 & "s" & ch2
' j = j + 1
' ReDim Preserve wd(j)
' wd(j) = ch1 & "a" & ch2
' j = j + 1
' End If
'
' If ch = "m" Then
' ReDim Preserve wd(j)
' wd(j) = ch1 & "k" & ch2
' j = j + 1
' ReDim Preserve wd(j)
' wd(j) = ch1 & "l" & ch2
' j = j + 1
' ReDim Preserve wd(j)
' wd(j) = ch1 & "u" & ch2
' j = j + 1
' End If
' If ch = "k" Then
' ReDim Preserve wd(j)
' wd(j) = ch1 & "m" & ch2
' j = j + 1
' ReDim Preserve wd(j)
' wd(j) = ch1 & "l" & ch2
' j = j + 1
' ReDim Preserve wd(j)
' wd(j) = ch1 & "u" & ch2
' j = j + 1
' End If
' If ch = "l" Then
' ReDim Preserve wd(j)
' wd(j) = ch1 & "k" & ch2
' j = j + 1
' ReDim Preserve wd(j)
' wd(j) = ch1 & "m" & ch2
' j = j + 1
' ReDim Preserve wd(j)
' wd(j) = ch1 & "u" & ch2
' j = j + 1
' End If
' If ch = "u" Then
' ReDim Preserve wd(j)
' wd(j) = ch1 & "k" & ch2
' j = j + 1
' ReDim Preserve wd(j)
' wd(j) = ch1 & "l" & ch2
' j = j + 1
' ReDim Preserve wd(j)
' wd(j) = ch1 & "m" & ch2
' j = j + 1
' End If
' If ch = "e" Then
' ReDim Preserve wd(j)
' wd(j) = ch1 & "b" & ch2
' j = j + 1
' ReDim Preserve wd(j)
' wd(j) = ch1 & "h" & ch2
' j = j + 1
' End If
' If ch = "b" Then
' ReDim Preserve wd(j)
' wd(j) = ch1 & "e" & ch2
' j = j + 1
' ReDim Preserve wd(j)
' wd(j) = ch1 & "h" & ch2
' j = j + 1
' End If
' If ch = "h" Then
' ReDim Preserve wd(j)
' wd(j) = ch1 & "e" & ch2
' j = j + 1
' ReDim Preserve wd(j)
' wd(j) = ch1 & "b" & ch2
' j = j + 1
' End If
'
' Next
' test1 = wd
'End Function
'
...Steve
|
|
|
|
|
LyBun wrote:
Dear steve
First I thank you to give the solution .but we still got some problem with the solution . It is when we create other one like "sole" , "coub" or "bkoa" it can't give the correct answer .It is maybe I tell the condition not clear . so I say again
1 the charater "s" can become to charater "a" and "c" but the "a" can also become to "s" and "c" . the "c" can also become to "s" and "a"
2 the charater "m" become to charater "k" ,"l" and "u" ."k" also can become to "m" ,"u" and "l" . "l" also can become to "m" , "u" and "k" . "u" can also become to "m" , "k" and "l" .
3 the charater "e" can become to charater "b" and "h" the same with the 3 one .
when I change your code it run out of stack space . How to correct the code to avoid the error
The code change is :
Sub test2(str As String, ByRef wd As Scripting.Dictionary)
Dim ch As String
Dim ch1 As String
Dim ch2 As String
Dim wlen As Integer
Dim i As Integer
wlen = Len(str)
For i = 1 To wlen
ch1 = Left(str, i - 1)
ch = Mid(str, i, 1)
ch2 = Mid(str, i + 1, wlen)
Select Case ch
Case "s"
Call test2(ch1 & "a" & ch2, wd)
Call test2(ch1 & "c" & ch2, wd)
Case "a"
Call test2(ch1 & "s" & ch2, wd)
Call test2(ch1 & "c" & ch2, wd)
Case "c"
Call test2(ch1 & "s" & ch2, wd)
Call test2(ch1 & "a" & ch2, wd)
Case "m"
Call test2(ch1 & "k" & ch2, wd)
Call test2(ch1 & "l" & ch2, wd)
Call test2(ch1 & "u" & ch2, wd)
Case "k"
Call test2(ch1 & "m" & ch2, wd)
Call test2(ch1 & "l" & ch2, wd)
Call test2(ch1 & "u" & ch2, wd)
Case "l"
Call test2(ch1 & "k" & ch2, wd)
Call test2(ch1 & "m" & ch2, wd)
Call test2(ch1 & "u" & ch2, wd)
Case "u"
Call test2(ch1 & "k" & ch2, wd)
Call test2(ch1 & "l" & ch2, wd)
Call test2(ch1 & "m" & ch2, wd)
Case "e"
Call test2(ch1 & "b" & ch2, wd)
Call test2(ch1 & "h" & ch2, wd)
Case "b"
Call test2(ch1 & "e" & ch2, wd)
Call test2(ch1 & "h" & ch2, wd)
Case "h"
Call test2(ch1 & "b" & ch2, wd)
Call test2(ch1 & "e" & ch2, wd)
Case Else
End Select
Next
If Not wd.Exists(str) Then
Debug.Print str
wd.Add str, str
End If
End Sub
Hope see your answer soon .
Thanks!!!!!
Regards,
bun
Bun,
The problem with what you are trying to do is that you'll cause an infinite recursion loop in test2() since "a" can replace "s" and "s" can replace "a" etc..., and hence that is why you get the stack overflow error.
I should have asked this question in the first place, but what are you actually trying to achieve? Is this some real world application or just a programming exercise? Is it a condition of the algorithm that multiple substitutions are permitted or is only one pass over the initial input string to be performed?
...Steve
|
|
|
|
|
Hello,
I am designing an accounts webform( Crikey! ) in which I have two fields 'rate' in textbox1 and 'points' in textbox2 which are of type decimal in the first half of the webform. The user enters the values in these text boxes from the webform and on hitting a button 'calculate & display' following things should happen:
1. In textbox3 - result (type decimal) it should display the result (rate)-(points) which I have achieved
2. the user then enters the rest of the form and hits 'save form'. which means i have two buttons on the form,'calculate&display' and 'save'
3. On hitting save, it should save all the values on the webform into my (SQL server) database --- this is not working, it saves all of the other fields except these 3 text box values i.e. 'rate', 'points' and 'result', all that the database is saving each time is '0.00000' and '1.00000'
can someone please help me with this ... cansome give me a quickie tour of how to calculate values on webform , display the result and save the rsult in database because i need to do a lot of this in the rest of the form. I have 6 more fields which I need to compare, calculate,display and save in database !!!
I use Vb.net code but C# is welcome too.
Thanks a Zillion in advance...it is going to be big help!!!
Aartee.
...HE is watching Us All!
|
|
|
|
|
have you tried changing the type of ur results?
Aim small, miss small...
|
|
|
|
|
Hi tatchung,
I don't quite understand what exactly you mean by changing the type of results but everything is in decimal...even if i try it in type Int or varchar etc... it still does not work, it is calculating and displaying the correct subtracted values but only on the webform, not saving it in the database.
Aartee.
...HE is watching Us All!
-- modified at 22:26 Sunday 18th September, 2005
|
|
|
|
|
Good day sir,
I mean have you tried checking the value u are returning in ur insert command? is it of type decimal? i've had a similar problem with a short once and all i did was declared the value in my insert command. might work on ur problem but then again i could be wrong...im still a beginer u know
Aim small, miss small...
|
|
|
|
|
all that the database is saving each time is '0.00000' and '1.00000'
You might have referenced the wrong control, or you are losing the control handle on postback of the page.
If you can give a small sample code containing your Textboxes and Database update we might be able to help you more on this.
Ed
-- modified at 3:03 Monday 19th September, 2005
[Edit]Also, posting in ASP.Net forum might be better.[/Edit]
|
|
|
|
|
Can anyone help with this one
Have a form with a listbox and 5 textboxes, by clicking the different customer id's in the listbox this then displays the relevant info in the textboxes which is first name, last name, city, state and zip code from the Customers Table, this works fine but I'm trying to display at the same time the orders placed for each selected customerid only in a datagrid from the Orders Table but can't get it to work
The orders placed details to be displayed in the datagrid from the database are OrderID, OrderPrice and CustomerID, have tried to include a data relation but being new to programming not sure if it's right, or which is the correct datasource to use for the datagrid
I also need to show when the form initially loads the info for the first CustomerID by default
Any advice/coding which could help me would be much appreciated, my coding is below
Many thanks
Imports System.Data.OleDb
Imports System.IO
Public Class Form1
Inherits System.Windows.Forms.Form
Dim ds As DataSet
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Declares and instantiates command object
Dim SqlCustomers As String = "SELECT * FROM customers"
'Sets the connection string
Dim connString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\The Doughnut Shop.mdb"
'Declares and instantiates a new OleDbconnection object
Dim myconnection As OleDbConnection = New OleDbConnection(connString)
' Sets the connection string property
myconnection.ConnectionString = connString
'Declares and instantiates a data adapter
Dim dacustomers As OleDbDataAdapter = New OleDbDataAdapter(SqlCustomers, myconnection)
ds = New DataSet
dacustomers.Fill(ds, "customers")
Dim sqlorders As String = "Select OrderID, OrderPrice, CustomerID from Orders"
' Declares and instantiates the datadapter
Dim daorders As OleDbDataAdapter = New OleDbDataAdapter(sqlorders, myconnection)
daorders.Fill(ds, "orders")
Dim relation As DataRelation = New DataRelation("CustomersOrders", ds.Tables("Customers").Columns("CustomerID"), ds.Tables("Orders").Columns("CustomerID"))
ds.Relations.Add(relation)
ListBox1.DisplayMember = "CustomerID"
ListBox1.DataSource = New DataView(ds.Tables("customers"))
TextBox1.Text = ds.Tables("customers").Rows(0).Item("FirstName")
TextBox2.Text = ds.Tables("customers").Rows(0).Item("LastName")
TextBox3.Text = ds.Tables("customers").Rows(0).Item("City")
TextBox4.Text = ds.Tables("customers").Rows(0).Item("State")
TextBox5.Text = ds.Tables("customers").Rows(0).Item("ZipCode")
End Sub
Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged
Dim drv As DataRowView = CType(ListBox1.SelectedItem, DataRowView)
Dim childRows() As DataRow = drv.Row.GetChildRows("CustomersOrders")
TextBox1.Text = drv("FirstName")
TextBox2.Text = drv("LastName")
TextBox3.Text = drv("City")
TextBox4.Text = drv("State")
TextBox5.Text = drv("ZipCode")
DataGrid1.DataSource = childRows
DataGrid1.Refresh()
End Sub
End Class
|
|
|
|
|
SLG7 wrote:
at the same time the orders placed for each selected customerid only in a datagrid from the Orders Table but can't get it to work
Is it displaying all of the customers or nothing at all?
|
|
|
|
|
There's nothing showing in the datagrid for the Orders Table
Been racking my brains over this one any help/coding would be great
Thanks
|
|
|
|
|
Hi there!
I'm trying to control a program with a gamepad.
Does anybody know how to initialize a joystick or gamepad using DirectInput and make the joystick inputs usable?
Thanks
|
|
|
|
|