124 Posted Topics

Member Avatar for bdrkb

DateDiff("d", "01/01/2008", "01/01/2010") Reference - [url]http://msdn.microsoft.com/en-us/library/aa262712(VS.60).aspx[/url]

Member Avatar for SCBWV
0
98
Member Avatar for xairylle

Try: ("select * from parlordb where custname=" & searchname) It appears you are using DAO as opposed to ODBC. If so, why not use: myrs1.FindFirst txtsearchname.Text

Member Avatar for jireh
0
173
Member Avatar for sidnei

If the printer provides a serial port interface, it may be easier to use that. If you must use the USB interface, this may help. [url]http://www.intel.com/intelpress/usb/examples/VBOverview.htm[/url]

Member Avatar for SCBWV
0
1K
Member Avatar for Lida_pink

Do you mean a line that goes around the edge of the form, like a border? If so, you can Shape control, and redraw the Shape's dimensions in the Form_Resize event. As an example, create a Shape on the form with a Top and Left of 60. Then add Shape1.Height …

Member Avatar for Lida_pink
0
278
Member Avatar for Lida_pink

That's because by the time Text2.Text = Text1.Text executes, Text1.Text has already been changed. Try: Dim Txt as String Txt = Text1.Text Text1.Text = Text2.Text Text2.Text = Txt

Member Avatar for vb5prgrmr
0
146
Member Avatar for Lida_pink

Use a Label in front of each text box and in the Caption for the Label, use an & in front of the letter to define the shortcut key - &m in your example. Make sure the Label's TabIndex is one less than the TabIndex for its associated TexBox. That …

Member Avatar for Lida_pink
0
172
Member Avatar for Roobyroo

Rich Text Boxes have two properties for text - .Text and .TextRTF. Are you using the right one?

Member Avatar for AndreRet
0
144
Member Avatar for OldQBasicer
Member Avatar for SCBWV
0
91
Member Avatar for firoz.raj

Why not use a public boolean value as a toggle? SelectedAll = NOT SelectedAll Item.Checked = SelectedAll Then the function can select and deselect all depending on the last state.

Member Avatar for debasisdas
0
78
Member Avatar for dc_24l

You don't have to lock the text box, just set KeyAscii to 0. Also, you need to handle the backspace key to allow users to fix errors: Private Sub Text1_KeyPress(KeyAscii As Integer) Select Case KeyAscii Case 48 To 57, 8 'Let these key codes pass through Case Else 'All others …

Member Avatar for KSS
0
2K
Member Avatar for nitu_thakkar

The maximum number of controls on a form depends on the type of control and the available system resources. There is a strict limit of 254 control names per form. However, you can use control arrays or user controls to go beyond 254 controls. Check this: [url]http://support.microsoft.com/kb/229756[/url]

Member Avatar for nitu_thakkar
0
146
Member Avatar for RahulV

Probably the easiest way to do what you want is to use a Browser control on your form and open the PDF file in the browser - Browser1.Navigate PDFFile$ - works like a charm and you're not tied to a particular version of Acrobat Reader.

Member Avatar for SlyMaelstrom
0
645
Member Avatar for hawisme000

Just a guess... could it be the field is numeric, where your selection criteria (lblLECNUM ) is text (Caption property)?

Member Avatar for hkdani
0
388
Member Avatar for jaasaria

You can also try LockWindowUpdate to prevent the ListView from updating while the records are loaded. Private Declare Function LockWindowUpdate Lib "user32" (ByVal hwndLock As Long) As Long Call LockWindowUpdate (ListView1.hwnd) 'load the records Call LockWindowUpdate (0&)

Member Avatar for samir_ibrahim
0
171
Member Avatar for dollmar
Member Avatar for karthiknv
Member Avatar for ryan311

I'm not sure why you're using a timer, but you can format time in 12 or 24 hour formats with the Format function - Format(Time$, "hh:mm:ss") or Format(Time$, "hh:mm:ss AMPM")

Member Avatar for SCBWV
0
90
Member Avatar for jeremy7780

Use a for/next loop to load the images from disk. If the number of images loaded is not evenly divisible by 2, you have a problem, since you can't match up an odd number of images. Use 2 image control arrays. Inside the loop, as each image file is read, …

Member Avatar for SCBWV
0
85
Member Avatar for stephen lowry

You could use the Split funtion, but that wouldn't work well if your string contains more than one space, for example "white bread 0.67" If the price is always the last part of the string, why not create a function that starts at the end and finds the last space?

Member Avatar for Comatose
0
94
Member Avatar for RahulV

Why can't you just put centering code in the Form_Load event of the mdi child form? You know what window will be the parent, and it wouldn't matter is the parent is maximized or normal.

Member Avatar for jireh
0
690
Member Avatar for sal21
Member Avatar for rajeshkhanna_in

You have to use a richtextbox, but that only supports a subset of rtf, so you won't get full support of the rtf codes from Word. I have successfully brought in tables, even with borders, but the richtextbox won't maintain the integrity like Word does. Worse yet, in my experience, …

Member Avatar for rajeshkhanna_in
0
79
Member Avatar for stephen lowry

You could use the multiple-document interface (MDI) in which the forms are a "child" of the "parent" main form, but MDI program can be a pain. Why can't you just use the main form's properties to decide where the other forms should appear? For example, in the Form_Load event of …

Member Avatar for stephen lowry
0
103
Member Avatar for B@nkai77

Guess I'm not quite sure what you want to do, but if you want to sun the Windows Installer you can Shell the installer with the MSI file as a parameter. For example: Ret = Shell("MSIEXEC /I " & Combo1.Text, vbNormalFocus) Assuming Combo1.Text contains the name of the .MSI file. …

Member Avatar for Teme64
0
139
Member Avatar for jofaleiva

Error '3077' Syntex error (missing operator) in expression Try Data1.recordset.FindFirst ("nhisto = " & answer)

Member Avatar for SCBWV
0
72
Member Avatar for sganandhsg

To some degree you can manipulate the msgbox, but if you haven't noticed, new message boxes in Vista and subsequently, Windows 7, have a nice look you can't get in classic VB without making your own - such as the high resolution icons. By making your own message box, you …

Member Avatar for SCBWV
0
124
Member Avatar for johnkeartson

One I particularly like... [url]http://www.innovasys.com/download/eval.aspx?productname=freeware%20activex%20controls[/url]

Member Avatar for SCBWV
0
112
Member Avatar for rajuprasad82

Use a autonumber field as a key. Then randomly generate a number between 1 and the total number of questions to retrieve the questions based on the key.

Member Avatar for Comatose
0
130
Member Avatar for mana

Here's a good example as a primer. [url]http://www.hungryhacker.com/articles/code/vb6_xml.html[/url]

Member Avatar for SCBWV
1
88
Member Avatar for ryan311
Member Avatar for DhruvaRai

One way is to separate the hours from the minutes and add them up = 42 hours, 172 minutes. Divide the minutes by 60 using INT divinsion - 172\60 = 2 or INT(172/60) = 2, so you have to add 2 hours to the 42 = 44 hours. To get …

Member Avatar for SCBWV
0
106
Member Avatar for yuleball

If you're using the RichTextBox, this may help. [url]http://www.vbforums.com/showthread.php?t=275310[/url]

Member Avatar for SCBWV
0
73
Member Avatar for meirmark

The Str function returns a leading space for the sign of number. Could that be messing you up? Sinec the leading space is there, you could use "R01" & str$(99)

Member Avatar for meirmark
0
112
Member Avatar for mgorecki

Why are you using extra quotes? ScriptPathandFile = "S:\DsnTools\Drawing Search Tool\UNIT ARRAY\" & ScriptFileName should do just fine

Member Avatar for SCBWV
0
87
Member Avatar for ladyjade

May I suggest a slight coding change for efficiency and readability? Instead of : Private Sub File1_Click() If Combo1.ListIndex = 0 Then File1.Pattern = ("*.wav") ElseIf Combo1.ListIndex = 1 Then File1.Pattern = ("*.mid") ElseIf Combo1.ListIndex = 2 Then File1.Pattern = ("*.avi;*.mpg") Else File1.Pattern = ("*.*") End If Use: Private Sub …

Member Avatar for Yasith93
0
385
Member Avatar for sk8ndestroy14

You need to use the SysInfo Control. It has properties for ACStatuse, BatteryFullTime, BatteryLifePercent, BatteryLifeTime, and BatteryStatus. It will also tell you when the power status changes, among many other things.

Member Avatar for Jx_Man
0
168
Member Avatar for vickyx
Member Avatar for SCBWV

Anyone experience problems with a disappearing control focus rectangle when using an XP style manifest? Some check boxes and option boxes no longer show the focus rectangle when the control gets focus using the kayboard and the tab key. Some do, some don't. Rather strange. I've tried putting them in …

Member Avatar for cindy amaral
0
129
Member Avatar for DonCarmelo

If I remember correctly, an earlier version of Visual Basic used to save files in binary format as the default (which loaded faster), with the option of saving them in text format. You'll have to load them in an older version and resave them in text format

Member Avatar for lissauer
0
180
Member Avatar for mosses

You misspelled bordercolor line1.bodercolor = vbRed line1.bodercolor = vbBlack line1.bordercolor = vbRed line1.bordercolor = vbBlack

Member Avatar for debasisdas
0
112
Member Avatar for technogeek_42
Member Avatar for technogeek_42
0
323
Member Avatar for lerkei

First of all, you declared MTime as Byte when you're using it as an integer. Secondly, why not just use the Timer event instead of MTime? Private Sub Form_Load() MMControl1.Command = "Open" MMControl1.Command = "Play" End Sub Private Sub Timer1_Timer() MMControl1.Command = "Stop" MMControl1.Command = "Close" MMControl1.Command = "Open" MMControl1.Command …

Member Avatar for Jx_Man
0
104
Member Avatar for dee2020

You have Exit For outside every For-Next loop in cmdSubmit_click. Exit For is used to conditionally end the For-Next loop early... such as "If condition = true then Exit For."

Member Avatar for dee2020
0
178
Member Avatar for ashishprem
Member Avatar for jireh
0
117
Member Avatar for SCBWV

Does anyone know how to get the Rich Text Box to save margin information in a file? The RTB seems to ignore all margins.

Member Avatar for technogeek_42
0
75
Member Avatar for macbrutal

namefile = App.Path & "\Accounts\" & Text1.Text & ".txt" if Dir$(namefile) <> "" then msgbox ="Username already exists" else Open namefile For Output As #1 ... ... end if To avoid any potential conflicts in file numbers, you should use the FreeFile function: fileNumber = FreeFile() Open namefile For Output …

Member Avatar for macbrutal
0
102
Member Avatar for hawisme000

Random numbers, where High is the upper limit and low is the lower limit of the range desired: Randomize Timer Rand = Int((High - Low + 1) * Rnd) + Low

Member Avatar for SCBWV
0
80
Member Avatar for kartik07

Unofrtunately, I believe so. I suppose you could dynamically add menu items in a common subroutine. Each form would have to handle the click events, although here too, you could call a common subroutine to do the actual work. It might be more trouble then its work, tracking which form …

Member Avatar for kartik07
0
102
Member Avatar for saurabh.verma

If I remember an old Charles Petzold article correctly, that specific progress bar was made with a gradient, and the motion was created by manipulating the color palette.

Member Avatar for SCBWV
0
87
Member Avatar for saini balvinder

That link should provide you with the best advice, but why not use the Visual Studio Installer?

Member Avatar for SCBWV
0
67

The End.