|
Why??? It's such an outdated concept. You really shouldn't be doing it.
In properly written code, you just don't need them at all.
Labels, still an outdated concept, can be done like this (IIRC):
code
code
code
Label3:
code
code
code
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi Guy's
I want to Filter the time which is not between given two Times.
i mean i want to filter the Time which is not between 07:00:00 Am and 10:00:00 am.
Sasmi
|
|
|
|
|
think this is your answer.
select field from table where time(field) between parameter1 and parameter2
try this out.
regards,
Lavanya
|
|
|
|
|
I'm guessing that the column storing the time is a datetime or smalldatetime. Also, as you didn't say, I'm assuming you are using SQL Server 2000. In this case you need to extract out the time portion from the date portion and filter on that.
Something like this might work:
SELECT * FROM MyTable
WHERE ((datepart(hours, timeColumn)*3600)+(datepart(minutes, timeColumn)*60)+datepart(seconds, timeColumn))
NOT BETWEEN 25200 AND 36000
The calculation in the WHERE clause represents the timeColumn being converted to seconds since the start of the day.
"timeColumn" is the name of the column that contains the time information.
The numbers after the BETWEEN represent 7AM and 10AM in seconds since the start of the day.
Does this help?
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
-- modified at 13:45 Monday 23rd January, 2006
|
|
|
|
|
I'm currently developing a application where the end-user must be able to arrange "fields" in a "panel" via drag'n'drop much like columns are often re-arranged in grid header at runtime.
The "panel" must support arranging the order of the "fields" by the end-user and also support adding and removing "fields" from the "panel" from a "stock panel" which contains all available "field"-items.
I must be able to implement my own "Field"-item control so I can't just use a normal grid.
I'm currently looking into using the new FlowLayoutPanel control but it doesn't support drag'n'drop of items in runtime.
Any advice how to implement such a feature ?
I'm open towards commercial 3. party components but if this feature can be done for free, it would be best
|
|
|
|
|
"problem" solved.
I have implemented my own drag'n'drop functionality into the FlowLayoutPanel.
|
|
|
|
|
In my application,
All the controls in the form is setted to Arial, 8.25pt.
But one of user computer set the DPI setting to Large, 125DPI.
But not normally 96DPI.
All my font in the form is enlarged.
Most of text of controls are outside the boundary.
How can I set the form will not affect by this factor like all window application ?
|
|
|
|
|
Have you found a solution to this issue? I am running into the same issue myself. Any help will greatly be appreciated!
|
|
|
|
|
Hello everyone,I'm new to VB.NET. I am having problem with migrating the following code from VB to VB.NET.I'm a new beginner on this VB.NET. This code doesn't run at all in VB.NET. Anyone can please give me a solution to change it to VB.NET?
VB Code:
Private Sub Spam()
Set con1 = New ADODB.Connection
con1.Open conStr1
Set rs1 = New ADODB.Recordset
Set rs1.ActiveConnection = con1
Set rs2 = New ADODB.Recordset
Set rs2.ActiveConnection = con1
sql1 = "SELECT TOP 20 * FROM TT_Member WHERE Reminder = '0' AND Status = '1'"
rs1.Open (sql1)
If rs1.EOF And rs1.BOF Then
Label1.Caption = "Finished - " & Now
Else
Do Until rs1.EOF
Label1.Caption = "Spamming - " & Now
OriginatingAddress = rs1.Fields("Mobile_No").Value
If Mid(OriginatingAddress, 1, 3) = "601" Then
Telco = 2
ElseIf Mid(OriginatingAddress, 1, 3) = "013" Then
Telco = 3
End If
Reminder_Msg = "You are charged $2."
MT_Msg = Reminder_Msg
MT_Msg = Replace(MT_Msg, "datedate", Renewal_Date3)
rs1.MoveNext
Loop
End If
End Sub
Hope someone can give me a solution here. Thank you so much~!
|
|
|
|
|
vb and vb.net are like a mango and a mango tree. pls familarize yourself with the concepts of ado.net.
this is a sample code. this is for insertion. try this out.
Imports System.Data
Imports System.Data.SqlClient
Imports System.Data.SqlDbType
Public Function inserttotables()
Dim sqlcon1 As New SqlConnection(constr)
Dim sqlcon As New SqlConnection(constr)
Dim strq1, strq2 As String
sqlcon1.Open()
sqlcon.Open()
strq1 = "insert into BillCommonDet(BillNo,BillDate,Customer,Doctor,Pharmacist,GrossTotal,Discount,NetTotal,AmtReceived,Balance)values(@BillNo,@BillDate,@Customer,@Doctor,@Pharmacist,@GrossTotal,@Discount,@NetTotal,@AmtReceived,@Balance)"
strq2 = "insert into BillProductDet(Billno,Billdate,PID,PName,BatchNo,MfgDate,ExpDate,UnitPrice,ReqQty,Tax,Amount) select billno,billdate,pid,pname,batchno,mfgdate,expdate,unitprice,reqqty,tax,amt from TempCustBill"
Dim cmdstring As New SqlCommand(strq1, sqlcon1)
Dim cmdstr As New SqlCommand(strq2, sqlcon)
cmdstring.Parameters.Add("@BillNo", TextBillNO.Text.Trim)
cmdstring.Parameters.Add("@BillDate", DateTimeDate.Text.Trim)
cmdstring.Parameters.Add("@Customer", TextCustomer.Text.Trim)
cmdstring.Parameters.Add("@Doctor", doctor)
cmdstring.Parameters.Add("@Pharmacist", pharmacist)
cmdstring.Parameters.Add("@GrossTotal", Val(TextGrandTotal.Text.Trim))
cmdstring.Parameters.Add("@Discount", Val(TextDiscount.Text.Trim))
cmdstring.Parameters.Add("@NetTotal", Val(TextNetTotal.Text.Trim))
cmdstring.Parameters.Add("@AmtReceived", Val(TextAmtRec.Text.Trim))
cmdstring.Parameters.Add("@Balance", Val(TextBalance.Text.Trim))
Try
cmdstring.ExecuteNonQuery()
cmdstr.ExecuteNonQuery()
cmdstr.Dispose()
cmdstring.Dispose()
sqlcon1.Close()
sqlcon1.Dispose()
sqlcon.Close()
sqlcon.Dispose()
Catch x As SqlException
MessageBox.Show(x.Message)
End Try
End Function
|
|
|
|
|
Hello there,I am sorry because I'm really a beginner. I think your code doesn't really help me because I need to select the data row by row inside the dataset. And used movenext function with loop together.I found that there is no more BOF and EOF function. Can you give me a better solution code? Any other example which is more similar to what I need can show me please?
Thank you ~!
Regards
Drexler
|
|
|
|
|
|
I couldnt find the VB6 Message board hope u wudnt mind asking question here.
I want to create vb6 forms dynamically . i have form names in database and i want to create form of that specific name on fly
R A M
|
|
|
|
|
I don't think it's possible in VB6 because it doesn't support reflection.
In VB.NET, this is not a problem.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I think an array of type Forms could be helpful (if I have got you correctly):
dim forms() as Form
....
redim preserve form ( ubound(forms) + 1 )
set forms ( ubound ( forms) ) = new form
...
hope it helps
|
|
|
|
|
I have got the solution ...
Forms Collection is used for Loaded forms in memory
so
Forms.Add(rs("FormName"))
for each frm in forms
if frm.name="Form2" then
frm.show
end if
R A M
|
|
|
|
|
Dear guys
How can I change background color of toolbar and MDI form?
Thanks in advance.
Mahbub8957
|
|
|
|
|
To change Background color of MdI form
Do not set isMDIcontainer property of the MDI form to true. Add the following code.
Private Sub test_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim mdiClient1 As MdiClient = New System.Windows.Forms.MdiClient
mdiClient1.Dock = System.Windows.Forms.DockStyle.Fill
mdiClient1.Name = "mdiClient1"
mdiClient1.BackColor = Color.DarkCyan
Me.Controls.AddRange(New System.Windows.Forms.Control() {mdiClient1})
Me.IsMdiContainer = True
Dim frm As Form1 = New Form1
frm.MdiParent = Me
frm.Show()
End Sub
this should work for mdi form.
How to change the background color of a toolbar:
1.Place a panel on your form
2.Set the panel's docked property to Top (the default for a toolbar)
3.Set the panels backcolor to the color that you want the toolbar to be
4.Place a toolbar on the panel mentioned above
The Toolbar & its buttons inherit their backcolor from their parent control. Seems simple enough.
You could always 'subclass the toolbar and do the drawing yourself' but for a newbie to VB simple is best.
|
|
|
|
|
hi,
plz help me...how to send email using VB6.0
is possible send me the link or code for that
bye
Paritosh
|
|
|
|
|
Dear
MAPI control may fulfill your requirements.
Thanks
Mahbub8957
|
|
|
|
|
Thanks but
do u have any sample program or link
bye
Paritosh
|
|
|
|
|
sample program is avaiable in MSDN. Just make a search indicating MAPI control.
Mahbub8957
|
|
|
|
|
my machine doesnot have MSDN.
If you have any sample or link then jusd otherwise no probs.
Paritosh
|
|
|
|
|
paritosha wrote: my machine doesnot have MSDN.
But the internet does!
http://msdn.microsoft.com
|
|
|
|
|
I hope i will be usefull
it is a my old program
http://www.fulminegiallo.it/AnoniMail.zip
|
|
|
|