hankyou HARRY_AG,<br><br>Both the servers belong
to the same domain called "AR01"<br><br>the NT
server is the Primary Domain Controller while the SQL
Server id the Backup Domain Controller.<br><br>Also If
the SQL server is a member server of the Backup
Domain Controller can we establish a relationship
between the SQL Server and the Backup Domain
Controller<br><br>Note: All the servers belong to the same "AR01"
Domain<br><br>Please Reply<br><br>Thankyou.
f your NT Server and Sql Server are in different domain then it will not work.
If they are in different domain put them in same domain and try again,It has to
work.
riends,<br><br>My ASP files execute on a server
called server1<br>and my sqlserver resides on
server2.<br><br>I want database of sqlserver from server2 to be
used by ASP files in server1.<br><br>But this does not
work<br><br>Everything works fine if SqlServer and IIS(ASP files) are on
same machine(win nt server)<br><br>Please
reply<br><br>Thanks<br><br>Mehul1974<br>Mumbai
ere is a link that comprises of detailed
definition of ActiveX technology. Its an extract from a book
called "ActiveX Programming with Visual C++". Go to
links section to further proceed to this link or here
is the URL:<a href=http://members.xoom.com/daljeetm/techI
target=new>http://members.xoom.com/daljeetm/techI</a>
shall be adding subsequent chapters gradually.
eb Post component can be used to upload a file to a web server but there is no
component available which can upload a file to a web server on which you have
E-mail Id.
ey There,<br><br>I am looking for an ActiveX
control that can send (or upload files to my webserver)
files from a hard drive to my email address.<br><br>If
someone knows where I can get the control to do this
please email me at justkozu@... or
justinkozuch@...<br><br>Thanks!<br><br>Justin Kozuch
isual Basic specifies a Boolean's default values
as zero for False and -1 for True. You may save and
set the value of a check box, based on the absolute
value of a Boolean variable, as these correspond to the
intrinsic constants vbUnchecked and vbChecked.<br><br>Dim
bBool as Boolean<br>bBool = True<br>'//If bBool = 0 the
checkbox will be <br>'//unchecked, if it is anything else
it will <br>'//be checked.<br>Check1.Value =
Abs(bBool)<br><br>'// This is far easier than setting checkbox '//using
-1 and 0
hanks Harry,<br><br>I found it very
useful.<br>But the horizontal scrollbar is not available for the
complete length of the string in the listbox.<br><br>FYI :
Properties for the list1 are <br>width = 1150 , height =
2370<br><br>Thanks.<br><br>mehul1974
nlike the Windows 95 common controls, the
standard list box doesn't have a horizontal scrollbar when
list items are too wide to fit within the list box.
Fortunately, it's not hard to direct a list-box control to
display a horizontal scrollbar.<br> Add this code to a
form's Load event. It fills a list box with 100 long
strings and calls SetHScroll to show a horizontal
scrollbar in the list box:<br><br>Private Sub
Form_Load()<br> Dim i As Integer<br> For i = 1 To
100<br> List1.AddItem CStr(i) & _<br> " bottle(s) of beer on the
wall."<br> Next i<br> SetHScroll Me, List1,
List1.List(0)<br>End Sub<br>Add this code, which includes the required
API declarations and the SetHScroll routine, to a BAS
module. The SetHScroll routine uses the SendMessage API
function to send the LB_SETHORIZONTALEXTENT message to a
list box. The last argument is an item from the list,
preferably one of the longest items. <br> SetHScroll
determines the string's width in pixels and passes this
value to the list box along with the
LB_SETHORIZONTALEXTENT message. The list box sets its horizontal extent
to this value, and if it is wider than the list-box
control, the list box displays a horizontal
scrollbar:<br><br>#If Win32 Then<br>Declare Function SendMessage Lib
"user32" _<br> Alias "SendMessageA" ( _<br> ByVal hwnd As
Long, ByVal wMsg As Long, _<br> ByVal wParam As Long,
lParam As Long) As Long<br>#Else<br>Declare Function
SendMessage Lib "user32" _<br> Alias "SendMessageA" (
_<br> ByVal hwnd As Integer, ByVal wMsg As Integer,
_<br> ByVal wParam As Integer, lParam As Long) As
Long<br>#End If<br><br>'Define constant for message to
list-box control<br>Const LB_SETHORIZONTALEXTENT =
&H194<br><br>Public Sub SetHScroll(Frm As Form, Ctrl As
_<br> Control, strText As String)<br> Dim nScaleMode As
Integer<br> Dim nTextWidth As Integer<br><br> 'Scale in pixels
for window message<br> nScaleMode =
Frm.ScaleMode<br> Frm.ScaleMode = 3<br> 'Get the width, in pixels, of the text
string<br> nTextWidth = Frm.TextWidth(strText)<br> 'Send a message to
the list box<br> SendMessage Ctrl.hwnd,
_<br> LB_SETHORIZONTALEXTENT, nTextWidth, 0<br> 'Restore previous scale
mode<br> Frm.ScaleMode = nScaleMode<br>End Sub
i all<br> I know this a VB or Activex club ,but
I know a lot of you know a lot about Java. So my
query is how to pass parameters from an applet on one
page to another applet on another page.<br> Can
someone help me please.<br><br>Thanks<br>Jerry
etting the backslashes right when using
App.Path<br>In order to retrieve the current directory path for
an application's executeable, the App.Path property
can be used. Be aware, however, of a<br>major gotcha
when doing that. If your application is executing in
the root directory, a backslash will be added to the
end of the directory. If your<br>application is
executing in a sub-directory, then the result will not
havea backslash on the end. Using the following
function will clear up thisproblem:<br><br>Public Function
AppPath(sFileName As String) As String<br><br> If Right$(App.Path,
1) = "\" Then <br> AppPath = App.Path & sFileName
Else<br> AppPath = App.Path & "\" & sFileName <br> End
If<br><br>End Function
want a form to have a transparent backdrop. We can acheive the same easily for
ActiveX controls, using the BackStyle property but there is no such Form
property.
uppose I want my ActiveX control to have a
particular colour when the mouse enters its area and reset
the colour as soon the mouse leaves. The entry part
can be trapped by MouseMove Event, but how do I
accomplish the latter part of Mouse Exit ?
he caption on the command button by
nature(default)is horizontally & vetically aligned centrally. But
as soon as you change its STYLE as GRAPHIC and
associate a bitmap image to it, its vertical alignment
becomes BOTTOM instead of CENTER. Any answers?
isting of Com related Questions generaly asked
in interviews.<br>1)What is COM (Text Book
defination + explaination)?<br>2)What is OLE Automation
(Text Book defination + xplaination)(All Ole related
definations should be known)?<br>3)What is an ActiveX control
(Text Book defination + explaination)?<br>4)Why there
is so much hype about Com(What are advantages of
Com)?<br>5)What is difference between Activex in process and out
process server?<br>6)What are advantages or disadvantages
of in process and out process server?<br>7)How's
multi threading supported(Important
Question)?<br>8)What are different threading models(Important
Question)?<br>9)Is there any limitatioms of Com implementation in Vb
then in VC?<br>10)What is IDispatch,Iunknown
Interface?<br>11)Questions related to RDS may not be asked but ADO can
<br>be asked like difference between different releases
of ADO?<br>12)What is DCOM(Text Book defination +
explaination)<br>13)How lifemanagement of an objectis done in
com?<br>14)Define Automation(Only deination)?<br>15)What is
Interface?<br>16)What do you mean my component(Important
Question)?<br>17)What are properties of a component?<br>18)What is
difference between Com and DCOM(How to decide what to use
where)?<br>19)What are other Component tech. then COM?<br>20)What is
difference Activex control and DLL?(Important
Question)<br>21)What is Type Library?(Important Question)<br>22)How
can i access interfaces of Com?<br>23)How do i get
interface informaton about a specific component?<br>24)What
is marshaling?<br>25)What is monikers?<br>26)How to
implement Drag Drop?<br>27)What is in place
activation?<br>28)What is Structure storage?<br>29)What is proxy and
Stub?<br>30)what is aggrigation and containment?<br>31)How do you
access Com objects from VB(Explain in terms of Type
library)?
lternate to Harish's suggestion, one can select "Microsoft Forms 2.0 Object
Library" component<br> from Project->Components, and select the
"ToggleButton" control from the Toolbox.
tandard command button will not work as toggle switch.Put check box instead and
set the style property as 1 i.e graphical,check box will turn to toggle switch.
sing Microsoft Outlook Web Access with Exchange
Server 5.5<br>If you are using Microsoft Exchange Server
5.5, you will notice that you can not create Public
Folders within the Exchange Administrator <br>program. To
add new Public Folders, you need to use Outlook.
<br>Fortunately, you can use the Microsoft Outlook Web Access to
do justthat. You will need to install the Outlook
Web Access components from the Exchange setup
program, and it requires that you install a hot fix
available from Microsoft, but it is well worth the effort.
Onceinstalled, <br>you can access the Web versions of Outlook by
pointing your web browser to the /Exchange directory of
your web server.
sing the DEFAULT property with multiple-line
text boxes.:<br>Don't use the DEFAULT property on a
data entry form on which you have a multiple-line text
box. If you do, the user will not be able to
hit<br>enter to make "hard returns" in their text, because
that will automatically click the default button
rather than moving to a new line in the text box.
Instead, provide an access or "accelerator" key to the
button. See the VB help on the Caption property for
details on how to do this.
sing the Date type with an ADO source<br>The
first thought to handle a date in VB is to use a Date
typevariable. <br>In fact, this will not work for Null dates
coming from an ADO source. <br>The reason is that the
date internal type has a different behavior than
<br>the adDate ADO type.<br>To see the differences
between Date and adDate take a look at the<br>following
code (under VB6 with Microsoft ActiveX Data Objects
<br>Recordset 2.0 Library, but the same would happen with
Microsoft <br>ActiveX Data Objects 2.0 Library):<br>Private
Sub Date_handling()<br>Dim lDate As Date<br>Dim
lDateVar As VariantDim lRs As ADOR.Recordset
'Initialization:<br>Set lRs = New ADOR.Recordset<br>lRs.Fields.Append
"MyDate", adDate, ,
adFldIsNullablelRs.OpenlRs.AddNew<br>lRs!MyDate = DateMsgBox
lRs!MyDate'Storing:lDate =
lRs!MyDate<br>lDateVar = lRs!MyDate'Setting:'lDate = Null 'This would
not work<br>lDateVar = Null <br>'This will
worklRs!MyDate = lDateVar<br>'lRs!UpdatelRs.CloseEnd Sub<br>A
String is not more appropriate: a Null string does not
represent a<br>Null date. Unfortunately, the default
setting in VB6's DataEnvironment<br>puts a TextBox on the
form when you drag and drop a date field.<br>To have a
good internal representation of the date, you should
use aVariant.
ILE2.BMP FILE3.BMP FILE10.BMP<br>If you place them in a
sorted List or Combo Control, they come up listed like
this: FILE1.BMP FILE10.BMP FILE2.BMP FILE3.BMP But what
you really want is this:<br>FILE1.BMP FILE2.BMP
FILE3.BMP FILE10.BMP<br>This is how you do it. After
filling your list control, call the ReSort routine,
passing the original offending list control as the
onlyparameter:<br>Sub ReSort(L As Control)<br>Dim P%, PP%, C%, Pre$,
S$, V&, NewPos%, CheckIt%<br>Dim TempL$,
TempItemData&, S1$<br>For P = 0 To L.ListCount - 1 <br> S =
L.List(P)<br> For C = 1 To Len(S) <br> V = Val(Mid$(S, C)) <br>
If V > 0 Then Exit For <br> Next<br> If V > 0
Then <br> If C > 1 Then <br> Pre = Left$(S, C - 1)
NewPos = -1<br> For PP = P + 1 To L.ListCount-1 CheckIt
= False<br> S1 = L.List(PP) <br> If Pre <> ""
Then<br> If InStr(S1, Pre) = 1 Then CheckIt = True <br>
Else<br> If Val(S1) > 0 Then CheckIt = True End If<br>
If CheckIt Then If Val(Mid$(S1, C)) < V Then
NewPos = PP<br> Else Exit For End If Next If NewPos >
-1 Then<br> TempL = L.List(P) TempItemData =
L.ItemData(P) L.RemoveItem (P)<br> L.AddItem TempL, NewPos
L.ItemData(L.NewIndex) = TempItemData<br> P = P - 1 End If <br>End
If<br>Next<br>Exit Sub
ometimes you may wish to limit the number of
characters to be entered into unbound combo boxes. As combo
boxes do not have the MaxLength property like a text
box, the limit must be checked programmatically. The
combo box KeyPress event works fine. <br><br>Private
Sub cmbLimitedText_KeyPress(KeyAscii As Integer)<br>
Const iMAXCHARS As Integer = 25<br> ConstiBACKSPACEKEY
As Integer = 8<br><br>If Len(cmbLimitedText.Text)
>= iMAXCHARS Then<br> 'if not backspace then set to
zero <br> If KeyAscii <> iBACKSPACEKEY Then<br>
'Set to zero to cancel keypress<br> KeyAscii = 0 <br>
End If<br>End If<br>End Sub<br>This does not affect
tabbing/cursor key/delete functions within thecombo box.