652 Posted Topics
Re: Right-Click Command Object (Say Command1) Edit your Command's SQL Query and make it : [code=vb] Select * From MyTable Where Fees Between ? And ? [/code] Click on apply Parameter Tab Is Enabled, Go there.. Set these properties for both Parameters: DataType = adDoble HostDataType =Currency And Apply, Save the … | |
Re: Hi, As the name Indicates, DataGrid and DBGrid need to be bound to a database Recordset object. You cannot bind a LocalArray to db grid.. If at all you want to bind the array, Save the Array in some temp table in database and open the recordset and Bind.. If … | |
Re: Hi, Try This : [code=vb] Private Sub Text1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Text1.KeyPress If e.KeyChar <> ChrW(Keys.Back) Then If (e.KeyChar.ToString >= "A" And e.KeyChar.ToString <= "Z") Or (e.KeyChar.ToString >= "a" And e.KeyChar.ToString <= "z") Then Else e.Handled = True End If End If End Sub [/code] … | |
Re: Hi, I'am not clear what u r asking for..? Did u mean to use [COLOR=red][B]"CStr()"[/B][/COLOR] Function..? Regards Veena | |
Re: Hi, use : Select * From MyTable Order By MyDate Regards Veena | |
Re: Hi, To remove grid lines, Right click FlexGrid, goto tab "Style' and give GridLines =0 - None. to change row color: [code=vb] dim j as integer With Grd .Row =1 For j = 0 To .Cols-1 .Col = j .CellbackColor = vbBlue .CellForecolor - vbWhite Next End With [/code] Regards … | |
Re: Hi, Check this : [code] TextBox1.Text = Format(1.9, [COLOR=#800000]"0.00"[/COLOR]) TextBox2.Text = Format(22, [COLOR=#800000]"0.00"[/COLOR]) [/code] Regards Veena | |
Re: Hi, Use [B]SHAPE [/B]Command [code=vb] sSQL = "SHAPE {SELECT CustName FROM CustMaster} AS C " & _ " APPEND ({SELECT * FROM Sales } AS S " _ & " RELATE " & _ " CustID To ID ) AS Cust_Sales " [/code] Regards Veena | |
Re: Hi, Loop thru all the List Items and if it is selected use this code to delete the item: lvw.ListItems.Remove (2) Above code removes second item in listview. Regards Veena | |
Re: Hi, use "VbCrLf" Text1.Text ="Abcd" & vbcrlf & "1234" REgards Veena | |
Re: Hi, Well.. You could have Normalized further, with Just One Master for both Pool Team and NHL Team.. : NPTeam ([b]TeamID[/b], TeamName, TeamType) TeamType >> N or P Your PlayerStats will be : PlayerStats (PlayerID, TeamID, Points) Anyway, Populate the other team by opening this Query : Say, Column 1 … | |
Re: Hi, You actual problem is not the Memory.. it is the logic as to : WHY DO YOU NEED TO LOAD UP SO MUCH DATA IN AN ARRAY OR GRID.......? there are alternative solutions without having to load such a huge data in Array or Grid...... You need to find … | |
Re: Hi, Use DBListBox, Set datasource to an ADODB.recordset.. and bind Regards Veena | |
Re: Hi, Just check for "EOF", If it EOF is true, means record does not exist and You can add new data.. [code=vb] If RS.EOF Then ' Code To Add New Data Else 'MsgBox "Record Exits..." End If [/code] Regards Veena | |
Re: Hi, If you have full source code of the dll, then include the class module to your project. and change the saving part... Instead of calling the Save from the dll, Create an Instance of the class and call the module.. Remove the references of the dll .. Whatever code … | |
Re: Hi, Click on menu : Project >> Make projName.Exe If you are wanting to Deploy it to some other system, just copying the EXE will not work, you have to Create a SetUp Package by "Package & Deployment Wizard".. Regards Veena | |
Re: Hi, Try This : [code] Dim T As Long Dim TAmt As Currency T = DateDiff("n", CDate("14:00:00"), CDate("16:45:00")) TAmt = (10 * T) / 60 MsgBox TAmt [/code] Refine the code according to your requirement... Regards Veena | |
Re: Hi, Try This : "Select * From MyTable Order By MyField Desc" Regards Veena | |
Re: Hi, First Check Which Form is giving the error, and also check what all components (ocx) you have used in that form.... SP2 seems very old.. What I recommend is Download and Install Visual Studio latest service pack (SP6 ) on your machine and Complie and Create Setup ... Also … | |
Re: Hi, the Syntax, you have used to Declare the DLL is not for UserCreated DLL's, It is for WINAPI's.. OK, First Create the DLL and Compile IT. Then, Go to your Calling Project, open References, and Add the DLL, If the dll is not present in the list, add By … | |
Re: Hi, Not sure... but all these are Key words in VB6.. Try adding some prefix to them, so that compiler and yourself dont get confused....: [b] Update Index Fields [/b] Also noted: "Fields() and Values()" are supposed to be arrays.. but you nextline of code dosent treat them like arrays … | |
Re: Hi, There is another ongoing thread on Direct printing.. You can check there.. [url]http://www.daniweb.com/forums/thread255432.html[/url] Loop thru FlexGrid's Rows build a String and dump the string to printer.. Regards Veena | |
Re: Hi, Or else, Just simply change the BackColor of newly added row... Say You have added new row to the grid as the last row, then use this code: [code] Dim i As Integer With Grd .Row = .Rows-1 For i = 0 To .Cols-1 .Col = i .CellBackColor = … | |
Re: Hi, "Select * From Tab" gives list of all the Tables in oracle database.. Regards Veena | |
Re: Hi, 2 of easiest ways.. Type 1: Use MSFlexGrid, And Change the font of the column.. There is a Font called "Marlett' and it comes with all versions of windows, font "b" looks like a Check Mark, so change the font of the cell you are wanting to create a … | |
Re: Hi, What is your Table Structure..? Regards Veena | |
Re: Hi, While adding, you need to check if the Grid has got that many rows... say if the grid has 3 rows and you are trying to fill data in fourth row, then you will get error.. Try this Grd.Rows = Grd.Rows+1 Regards Veena | |
Re: Hi, First shift all the procedures to the "Class" object.(say MyClass) and in calling form, use this code: [CODE=vb] Dim TCls As New MyClass Dim TempName as String TempName="AAA" CallByName(TCls, TempName, CallType.Method) TCls = Nothing [/CODE] Regards Veena | |
Re: Hi, Open Recordset, Loop thru and Add Nodes: Add Root Node: Trvw.Nodes.Add , , "N1","First Node" To Add Child to above Node: TrVw.Nodes.Add "N1", tvwChild, "NC1", "ChildNode" Change Node text / Key to the values returnde from database.. Regards Veena | |
Re: Hi, To Execute SQL Statement, You can also use the "Conn" object... try this : [code=vb] Dim Conn As New ADODB.Connection Dim strSQL As String strSQL = "UPDATE individualsubs SET [individualsubs].[copiesremaining]=[individualsubs].[numberofcopies]-[individualsubs].[copiesout]" Conn.Open "< Your Connection String Here>" Conn.Execute strSQL [/code] Regards Veena | |
Re: Hi, This adds new Textbox : [code=vb] Dim txtMsg As New TextBox() txtMsg.Text = "My New TextBox..." txtMsg.Attributes.Add("runat", "Server") txtMsg.ID = "txtMsg" Me.Controls.Add(txtMsg) [/code] Regards Veena | |
Re: Hi, Directly on messagebox, u cannot show ProgressBar. An alternative is to Show another Form in Modal Form, And Place Progress bar on that and Increment the status, from calling form.. frmProg.Show 1 Regards Veena | |
Re: [QUOTE=Bob1256;1105907] I need to find out how do you add a label to my tool strip on the bottom where start is on windows has it. And then I will start working on booting and all of the program's[/QUOTE] I guess you actually mean "StatusBar Control"... Add components :Microsoft Windows … | |
Re: Hi, With the above code, what you get is : Grid is populated with data for the last selected list item.. dont put in a loop, just build sql string with where condition for the selected listitems and refresh the grid once.. something like this : [code=vb] If lstsoftware.SelCount = … | |
Re: Hi, Try this : [code=vb] Picture1.DrawWidth = 5 Picture1.Line (100, 100)-(1000, 1000) Picture1.DrawWidth = 1 [/code] Regards Veena | |
Re: Hi, Open the connection and recordset, and write this code: Me.Caption =RST("MyFieldName") write the code in Form_Load event.. Regards Veena | |
Re: Hi, To Bind the Dropdown list.. First Write a Function in .vb page (say RetMyTable) which returns a DataTable and Your Edit Item Template should look like this...: [code=vb] <EditItemTemplate> <asp:DropDownList ID="DropDownList1" Runat="server" DataSource='<%#RetMyTable() %>' DataTextField="MyFieldName" DataValueField="MyFieldName" SelectedValue='<%# Bind("MyFieldName") %>' /> </EditItemTemplate> [/code] Regards Veena | |
Re: Hi, It seems like your code was not Published properly.. Open the website in asp.net and Publish it once again... You should get the "Succeeded" message in the output window, otherwise, there will be some problem in the code.. you need to fix the bugs and proceed... If using Database … | |
Re: Hi, What is your version of CR...? Regards Veena | |
Re: Hi, Actually for such problems, you can Apply the Brute-Force Algorithm.... One more way to solve the problem is, : Start From some Point/Town and Find Next Shortest Distance available, and move there, Again Find the shortest distabce from this point.... traverse till all Points are Completed and Return Back … | |
Re: Hi, Hi Change your Command2_click code like this : [code=vb] Private Sub Command2_Click() For x = 1 To howmanySet total = total + numbers(x) Print totalNext x End SubDim numbers(99) As String Dim howmany As String Private Sub Command1_Click() howmany = InputBox("how many number you want input?") For x = … | |
Re: Hi, Try This : TextBox1.Text = TextBox1.Text & Chr(13) & "New Text" OR TextBox1.Text = TextBox1.Text & vbCrLF & "New Text" Note: [B]Multiline[/B] should be [B]True [/B] for the Textbox.. Regards Veena | |
Re: Hi, Very late into the thread... But why not Create a Control Array of Picture Boxes...? Place a PictureBox on the Form and Set Index =0 and Visible =False. Now when you want to load one more pict box, then use this code: [code=vb] Dim t As Integer t = … | |
Re: Hi, You need to install ServicePack 5 or above to set the datareport to Landscape.. Download it from MS website.. Regards Veena | |
Re: Hi, Try This Code : [CODE=vb.net] Dim t As Double t = 4575147.45 Dim cfi As CultureInfo = New CultureInfo("hi-IN") TextBox2.Text = t.ToString("N", cfi.NumberFormat) [/CODE] Regards Veena | |
Re: Hi, I guess, field names with special chars, like "re-xam16", need to be enclosed in square bracket.. Change this way: rs("[re-xam16]") = (summer1.re16.Text) Regards Veena | |
Re: Hi, Try This : In Property Sheet of the form, set this property : [B]StartPosition=CenterScreen[/B] Regards Veena | |
Re: Hi, Not sure... but if you have decalred the variables as "Static", then the variables may not reset.... Static Variables retain their values between procedure calls.. just "Dim" the variables.. Regards Veena | |
Re: Hi, First Open a New Project, Goto References, Browse and add the Dll, from the list (Project1.dll) And Declare like this : Dim TempCls As New Project1.MyClass Text1.Text = TempCls.Adding2(4, 10) The procedure you have declared is for WIN API's.. Regards Veena |
The End.