| function for getting a substring of a string |
|
 |
Index ‹ Visual Studio ‹ MFC
|
- Previous
- 1
- Visual Basic >> Trip to DisneyGET YOUR TRIP
TRIPS TO DESNEY
TRIPS TO HAWAII
http://travelexpert2004.us
http://travelexpert2004.biz
http://gotraveling85.us
- 2
- VB Scripts >> Collect Item Return in diffrent order.Hello all,
I'm not the best programer in the world so I was wondering if I could get a
little help from you all. I'm using VBScript to make a WMI call to the event
viewer on a 2003 server. The return for the query is great... Code snip.
et colEvents = objWMIService.ExecQuery ("Select * from Win32_NTLogEvent
WHERE (Logfile = 'System') AND (EventCode = '6005'or EventCode = '6008' or
EventCode = '1074' or EventCode = '1076') AND (SourceName <> 'W3SVC')")
intCount = 0
For Each objService in ColEvents
if objService.EventCode = "6005" THEN
strboottime = objService.Timewritten
end if
if objService.EventCode = "1074" THEN
intCount = intCount + 1
strstoptime = objService.Timewritten
strdiff = ( DateDiff("s", WMIDateStringToDate(strstoptime),
WMIDateStringToDate(strboottime)) )
intdiff = intdiff + strdiff
WScript.Echo "Down For: " & SecondsToText(strdiff)
This returns....
Down For: 1 Minute, 7 Seconds
Down For: 1 Minute, 24 Seconds
Uptime Report For: CSCS-IT-007C
Microsoft Windows XP Professional 5.1.2600
Install Date: 12/06/2004 11:28:17
Last Reboot: 01/11/2005 18:03:23
Up For: 6 Days, 17 Hours, 45 Minutes, 9 Seconds
Total Reboots: 2
Total Down Time: 2 Minutes, 31 Seconds
So far so good, now I want to change how far back data is collection so I
mode the query to look for timewritten... code snip...
Set dtmStartDate = CreateObject("WbemScripting.SWbemDateTime")
DateToCheck = Date - 365
dtmStartDate.SetVarDate DateToCheck, True
Set dtmEndDate = CreateObject("WbemScripting.SWbemDateTime")
dtmEndDate.SetVarDate Date, True
WScript.Echo "Start Date: " & dtmStartDate & " End Date: " & dtmEndDate
Set colEvents = objWMIService.ExecQuery ("Select * from Win32_NTLogEvent
WHERE TimeWritten >= '"&dtmStartDate&"' AND Logfile = 'System' AND (EventCode
= '6005'or EventCode = '6008' or EventCode = '1074') AND SourceName <>
'W3SVC'")
The problem I have is the output order is diffrent. Instead of DESC it now
AESC. I have tried to add ORDER BY TimeWritten but I get an error. Any
insite on how to change the order would be very helpfull.
Thanks
David.
- 3
- MFC >> OT - Debug Windows EXEHi Guys,
Sorry about the offtopic message.
I have an old exe (16 bit). Don't have the source. I want to step throught
the exe. I tried loading it in VS 2003 and even 4.1 but couldn't get it to
do it.
I remember doing that with exe's back in DOS days. Opening the exe in TASM
and stepping through the exe.
Does anyone know of a program that will let me do this?
Ali
- 4
- 5
- MFC >> CDC::TextOut (or ExtTextOut) background colour troublesHi. I'm displaying some text on a dialog.
CPaintDC dc(this);
dc.TextOut(rect.left,rect.top,"HELLO");
On initial drawing of the dialog, the text background is white. As soon as a
control is used, the text background goes grey. Any way to make this not
change (or set to one colour)?
- 6
- 7
- MFC >> OnCreate of CFrameWnd based splitter pane gets called twice!!!Hi All,
I have a splitter window, in which I want to have 3 panes (as vertical
columns).
My primary requirement is I want a menu inside one of the panes, i.e,
menu should belong to the pane and not the whole window.
To achieve this, I put a CFrameWnd derived class inside the pane. This
CFrameWnd derived class has the menu I want.
Now, my problem is that after I do this, the OnCreate of the FrameWnd
is getting called twice all the time. Can anyone help me know why this
is happening?
Or even better, does anyone have an alternate solution to putting a
menu in each pane of a splitter window?
Thanks
R
- 8
- Visual Basic [VB] >> vb.net's CreateFileHi,
Private Declare Function CreateFile _
Lib "kernel32" Alias "CreateFileA" _
(ByVal lpFileName As String, _
ByVal dwDesiredAccess As Long, _
ByVal dwShareMode As Long, _
ByVal lpSecurityAttributes As Any, _
ByVal dwCreationDisposition As Long, _
ByVal dwFlagsAndAttributes As Long, _
ByVal hTemplateFile As Long) As Long
Private Declare Function closeHandle_ _
Lib "kernel32" _
Alias "CloseHandle" (ByVal hObject As Long) As Long
How to convert these to vb.net - or is there some other way of obtaining a
file handle. Well actually its "\\.\C:" i want to get to pass to another api
function
Stephen
- 9
- Visual Basic >> vb NameI use Name to rename a file.
All OK, Except when the directory name contains a space ..
Name c:\Test files\abc.txt c:\Test files\abc.txz
then Name fails.
Any suggestions please.
garry
- 10
- Visual Basic [VB] >> printing a text file, printdocument1_printpage gets called TWICE for each page?!Ok, so this is driving me mad. For some reason, regardless of the
value of ev.hasmorepages, the printoducment1_printpage gets called
twice for every page. So, I print 2 pages of data on one page, with
the second overlaying the original data. If i set ev.hasmorepages to
false, essentially telling the printdocument to only print one page,
it prints one page, with two pages of data, because at the end of the
_printpage subroutine, even when ev.hasmorepages is false, it runs the
sub once more. Any help on this would be fantastic, below is my code:
Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object,
ByVal ev As System.Drawing.Printing.PrintPageEventArgs) Handles
PrintDocument1.PrintPage
Dim linesPerPage As Single = 0
Dim yPos As Single = 0
Dim count As Integer = 0
Dim leftMargin As Single = ev.MarginBounds.Left
Dim topMargin As Single = ev.MarginBounds.Top
Dim line As String = Nothing
'ev.HasMorePages = True
' Calculate the number of lines per page.
linesPerPage = (ev.MarginBounds.Height /
printFont.GetHeight(ev.Graphics)) - 1
' Print each line of the file.
'If counterx = False Then
While count < linesPerPage
line = streamtoprint.ReadLine()
If line Is Nothing Then
Exit While
End If
yPos = topMargin + count *
printFont.GetHeight(ev.Graphics)
ev.Graphics.DrawString(line, printFont, Brushes.Black,
leftMargin, yPos, New StringFormat())
count += 1
End While
'End If
'If counterx = False Then
'counterx = True
'ElseIf counterx = True Then
'counterx = False
'End If
' If more lines exist, print another page.
If (line IsNot Nothing) Then
ev.HasMorePages = True
Else
ev.HasMorePages = False
End If
End Sub
..........THIS IS WHAT CALLS THE PRINTPAGE....
streamtoprint = New IO.StreamReader("C:\temp.dat")
Try
printFont = New Font("Times New Roman", 10)
AddHandler PrintDocument1.PrintPage, AddressOf
Me.PrintDocument1_PrintPage
PrintDocument1.Print()
Finally
streamtoprint.Close()
IO.File.Delete("C:\temp.dat")
End Try
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
Thanks everyone!
- 11
- Visual Basic >> passing a textbox control in parameter listHi, I have an application that has about 3 subroutines that I'd like to use in another application so I decided to move them out into a DLL. Anyway, I moved them out and I call them from the two applications and they all work fine. When I moved them out, I temporarily commented out anything to do with the user interface - basically the routines do some processing of files that sometimes takes a long time so in the original application, the routines would update a little status form
What I'd like to do is popup the status form in each of the two applications and then call the subroutines in the DLL and then have the subroutine update the form. So I decided to add a simple textbox control in the subroutines' parameter list. When I go to compile the DLL I get
Compile error
Private object modules cannot be used in public object modules as parameters or return types for public procedures, as public data members, or as fields of public user defined type
This is the test subroutine that gives me the compile error
Public Sub test(t As Control
t.Text = "foobar
End Su
Am I stuck, am I doing something wrong? Is there a way around it? Any other suggestion of how to do what I'd like? Thanks
- 12
- Visual Basic >> Show previous instance?I use App.PrevInstance to assure that a second instance of my app
cannot be started. If it's True, I display a MsgBox telling the user
about it and then force a shutdown of the second instance.
What I would like to do is quietly shutdown the second instance and
bring the previous instance to the foreground maximized. How do I do
that?
(I'll bet this is on Randy's web site somewhere but I couldn't find
anything.)
- 13
- Visual Basic >> If.....Else?I have a WebBrowser control & a hidden ListBox. When the Form loads,
the ListBox gets populated with those sites which the user has
categorized as Restricted Sites (the ListBox actually gets populated
with the different URLs from a text file).
Now what I want is when the user types a URL in the address bar (which
is a ComboBox), first it has to be checked whether the typed in URL
exists in the ListBox or not. If yes, then show a MsgBox to the user
asking hime whether he would like to proceed ahead or not (since it is
a restricted site). If yes, take the user to the URL but if no, stay
there itself & change the URL of the ComboBox to what it was before the
user typed in the URL of the restricted site.
For e.g. a user first visits www.yahoo.com which is not listed as a
restricted site (though it will be checked first whether www.yahoo.com
is listed as a restricted site or not). Next he types www.google.com,
which is listed as a restricted site, in the address bar. When he
presses 'Enter' on the keyboard, since www.google.com is a restricted
site, he will be first shown a MsgBox asking whether he would like to
proceed or not. If yes, direct the user to www.google.com but if no,
stay there itself & change the address in the address bar to
www.yahoo.com (since before typing www.google.com, the user was in
www.yahoo.com).
This is what I tried:
Private Sub cboURL_Click(Index As Integer)
Dim iCount
For iCount = 0 To lstSites(0).ListCount - 1
If (InStr(cboURL(0).Text, lstSites(0).List(iCount)) > 0) Then
If (vbYes = MsgBox("Are you sure you want to proceed?",
vbYesNo)) Then
wWeb.Navigate2 cboURL(0).Text
Else
wWeb.Stop
End If
'Else
' wWeb.Navigate2 cboURL(0).Text
End If
Next
End Sub
Suppose the user types www.google.com, which is a restricted site, in
the address bar. He is shown the MsgBox. Assume that he clicks No; so
he stays put where he was & doesn't proceed ahead.
Assume that next he enters www.yahoo.com in the address bar which is
not a restricted site. Under such circumstances, the commented "Else"
condition would take the user to www.yahoo.com after verifying that
www.yahoo.com is not a restricted site BUT if that "Else" condition
(i.e. the second "Else" condition) is not commented, then when the user
had been shown the MsgBox asking him whether he would like to proceed
or not after he had typed www.google.com in the address bar, then
irrespective of whether the user clicks Yes or No in the MsgBox, he is
still directed to www.google.com. The bottomline is there can be 3
scenarios:
1. URL typed in the address bar exists in the ListBox; show MsgBox
a. If "Yes" is clicked in the MsgBox, let the user proceed forward to
the restricted site (MsgBox="Yes")
b. If "No", stay there itself & don't let the user proceed ahead.
(MsgBox="No")
2. URL typed by the user in the address bar doesn't exist in the
ListBox; so let the user go ahead (which is as good as MsgBox="No").
So on one hand, when MsgBox="No", then stay there itself but on the
other hand, when MsgBox="No", proceed ahead. This is where I am getting
stuck up i.e. the condition is the same (MsgBox="No") but 2 different
statements have to be executed.
Any ideas how do I overcome this problem?
Thanks,
Arpan
- 14
- 15
- VB Scripts >> CDONTS strangenessI'm trying to send a mail using CDONTS with a .FROM email
address that doesn't exist (like bob@nowhere.com), but it won't send
the mail unless I put a valid .FROM email address (i.e. of an email
address that exists)
The mails I try to send on the Windows 2000 server are moved into the
mailroot/Badmail folder as spam.. so this would seem to be a built-in
spam prevention tool that CDONTS employs.
This would be fine, if it always worked, but sometimes perfectly correct
email addresses don't work either.
Is there any way to disable this spam-prevention so that I can send
emails no matter what the .FROM email address is?
Cheers.
--
"I hear ma train a comin'
... hear freedom comin"
|
| Author |
Message |
ArvindSingh

|
Posted: Sun Feb 29 06:30:54 CST 2004 |
Top |
MFC >> function for getting a substring of a string
Hello,
I have CString variable.
What is the function for getting the substring value of that string (like
mid function in VB) ?
Thanks :)
Visual Studio382
|
| |
|
| |
 |
A

|
Posted: Sun Feb 29 06:30:54 CST 2004 |
Top |
MFC >> function for getting a substring of a string
Use Mid function of CString....
"Eitan" <EMail@HideDomain.com> wrote in message
news:uMfvDXr$EMail@HideDomain.com...
> Hello,
> I have CString variable.
> What is the function for getting the substring value of that string (like
> mid function in VB) ?
>
> Thanks :)
>
>
|
| |
|
| |
 |
A

|
Posted: Sun Feb 29 06:30:54 CST 2004 |
Top |
MFC >> function for getting a substring of a string
Use Mid function of CString....
"Eitan" <EMail@HideDomain.com> wrote in message
news:uMfvDXr$EMail@HideDomain.com...
> Hello,
> I have CString variable.
> What is the function for getting the substring value of that string (like
> mid function in VB) ?
>
> Thanks :)
>
>
|
| |
|
| |
 |
Joseph

|
Posted: Sun Feb 29 16:13:00 CST 2004 |
Top |
MFC >> function for getting a substring of a string
CString::Mid?
joe
On Sun, 29 Feb 2004 13:20:16 +0200, "Eitan" <EMail@HideDomain.com> wrote:
>Hello,
>I have CString variable.
>What is the function for getting the substring value of that string (like
>mid function in VB) ?
>
>Thanks :)
>
Joseph M. Newcomer [MVP]
email: EMail@HideDomain.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
|
| |
|
| |
 |
| |
 |
Index ‹ Visual Studio ‹ MFC |
- Next
- 1
- Visual Basic >> VB5 QuestionHello,
I have programmed in several languages, but never VB before (not regular VB
anyway). I've got a customer with an old application written in VB5. They
only want a few simple changes, so I picked up a copy of VB5, and am
attempting to load the program and make some simple changes. When I try to
compile the project, it runs across a line of code that says, "Dim rs As
Recordset". I know what this is, but I get the error, "Compile error: Can't
find project or library" When I click the OK button, a form comes up
listing available references, and apparently wants me to check off one of
the libraries that may contain a reference to the Recordset object. I
checked off a few that seemed like the right ones, like Microsoft ActiveX
Data Objects 2.8 Library, and a few others, but this error persists. What
do I to resolve this?
Thanks,
Jesse
- 2
- VB Scripts >> automate ICF on/offHi:
Any suggestions on a script that would automate turning on/off the Internet
Connection Firewall on the Local Area Network Connection?
thanks!
- 3
- Visual Basic [VB] >> Control events raised in a control from a projectThis is a multi-part message in MIME format.
------=_NextPart_000_0005_01C7D119.D8A50730
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
Hi;
I have a component called Control that raises events when certain
conditions are met.
I'm using this component in a project called Business, and the Business
component is used in another called UI.
I will like to control in the UI component the events that Control
raises, but I'm only referencing to Business in UI.
Does it make sense?
Thanks
------=_NextPart_000_0005_01C7D119.D8A50730
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<html xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns=3D"http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<meta name=3DGenerator content=3D"Microsoft Word 11 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Times New Roman";}
h1
{margin-top:12.0pt;
margin-right:0in;
margin-bottom:3.0pt;
margin-left:0in;
page-break-after:avoid;
font-size:16.0pt;
font-family:Arial;}
h2
{margin-top:12.0pt;
margin-right:0in;
margin-bottom:3.0pt;
margin-left:0in;
page-break-after:avoid;
font-size:14.0pt;
font-family:Verdana;
font-style:italic;}
a:link, span.MsoHyperlink
{font-family:Verdana;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;}
span.StyleBoldUnderline
{font-family:Verdana;
font-weight:bold;
text-decoration:underline;}
span.StyleItalic
{font-family:Verdana;
font-style:italic;}
span.BoldUnderline
{font-family:Verdana;
font-weight:bold;
text-decoration:underline;}
span.EmailStyle21
{mso-style-type:personal-compose;
font-family:Arial;
color:windowtext;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
{page:Section1;}
-->
</style>
</head>
<body lang=3DEN-US link=3Dblue vlink=3Dpurple>
<div class=3DSection1>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Hi;<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>I have a component called <b><span =
style=3D'font-weight:bold'>Control</span></b>
that raises events when certain conditions are =
met.<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>I’m using this component in a project called =
Business,
and the <b><span style=3D'font-weight:bold'>Business</span></b> =
component is used
in another called <b><span =
style=3D'font-weight:bold'>UI</span></b>.<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>I will like to control in the <b><span =
style=3D'font-weight:
bold'>UI</span></b> component the events that <b><span =
style=3D'font-weight:bold'>Control</span></b>
raises, but I’m only referencing to <b><span =
style=3D'font-weight:bold'>Business</span></b>
in <b><span =
style=3D'font-weight:bold'>UI</span></b>.<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Does it make sense?<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Thanks<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
</div>
</body>
</html>
------=_NextPart_000_0005_01C7D119.D8A50730--
- 4
- MFC >> How to Disable current menu and Show another menuHi To All,
My problem is i created one menu like File in that some sub
menu's are login,logout,module selection..........My question is when
i selected any option from file menu first it has to show the dialog
box after selecting options it has to show another menu which i
created.
Any one can help me how to create this,i am jest stated to
learn c++ using MFC
- 5
- Visual Basic >> Removing "Names" from Excel from AccessHi All
In Excel you can use create "Names" this available under the Menu
"Insert\Name\Define". We have made good use of these in Excel. I want to be
able to remove these using Access - it must be from within Access and not
Excel.
Does anyone know how to do this?
Thanks in advance
Chris
- 6
- MFC >> Errors compiling with Visual Studio 2005.Hi:
So I'm trying to compile a project from VS 2003 but I'm getting all
these link errors. They are for the same thing. The error message is:
"error LNK2001: unresolved external symbol __invalid_parameter_noinfo"
Does anyone have an idea of what this symbol is used for?
thanks,
David
- 7
- MFC >> How to draw icon on button?Hello,
I have what I think is a simple question. How do I draw an icon on a
button? I set the "Icon" property for the button to true, but I don't know
what to do next.
Thanks.
- 8
- Visual Basic [VB] >> If statment and between range in the form text controlHello,
This is my first post so I hope I'm doing this correctly. I am
currently working on creating an order form for sales associates at my
work to be used at conventions. I have a form with a subform. On the
main form, there is a text box that displays the sum of total orders
entered in the subform, [SUBTOTAL]. I'm trying to create another text
box on the main form, [GIFTS] that looks at the subtotal text box and
depending on the value, displays one out of three options.
I have set the control source of the Gifts text box to be the same as
in the Subtotal text box. I have entered the following code in the
even after update of the GIFTS tex box.
Private Sub Gifts_AfterUpdate()
If [Subtotal] >= 0 And [Subtotal] <= 2499 Then
Me.gifts = 0
ElseIf [Subtotal] >= 2500 And [Subtotal] <= 4999 Then
Me.gifts = 250
ElseIf [Subtotal] >= 5000 Then
Me.gifts = 600
End If
End Sub
Can somebody please help me with this, I have looked at allot of
messages and most of them deal with dates.
- 9
- MFC >> Build problemI've got a multi-project solution (VS 2002) which builds a bunch of DLLs and
then an MFC application.
Now, I want to get it to build the help file (.chm) ... but the interesting
bit is that most of the topic files (and bits of the table of contents and
so on) is actually autogenerated ... by the MFC application, when run with
some magic command line switch.
So what I need to do to build the system is:
(1) build the DLLs
(2) build the application
(3) run the application, giving it a magic command line switch, to generate
some help files
(4) build the .chm
Various approaches seem possible:
(a) Try to do it all inside the project that builds the application,
probably using some combination of a Project Custom Build Step and the
Post-Build Event to do (3) and (4) (and all the other stuff that the
Post-Build event is already doing).
(b) Leave the existing project just building the application, and add a new
project to the solution to do (3) and (4). But, what sort of project should
it be? - there's no generic "empty project" option to which I could add the
necessary custom build steps.
(c) As (b) but use a "makefile project" and code all the dependencies for
(3) and (4) in the makefile and maintain it by hand.
Pros and cons??
One issue is that it would be nice if (3) could run whenever any of the
source files in one subdirectory of the application's project changed (as
the application might then generate different help files), and to run (4) if
*either* (3) was run *or* any of the hand-written help files have changed
(which again really wants me to be able to specify a wild-card for the
dependencies, as I don't want to have to list every single hand-written
topic file under "Additional Dependencies"). Step (3) takes a couple of
minutes, and (4) many seconds, so I'd like to both avoid running them when
not necessary and make sure I do run them when they need to be run.
--
Tim Ward
Brett Ward Limited - www.brettward.co.uk
- 10
- Visual Basic >> exe to be included as part of a MSI packageI wrote a little prg that must be included in an installer. I am not the
author of installers. As a matter of fact, I know nothing about them. The
author of the installer asked if I could return an error code that the MSI
could handle. Sure... I guess. How to I return something to the equivalent
of a command line?
Maybe I am confused. If so, feel free to dope slap me!
Thanks
S
- 11
- Visual Basic [VB] >> Book recommendation?Has anyone read the book Microsoft .NET Remoting by Williams, Naftel, &
McClean (Microsoft Press)? There are mixed reviews on Amazon. I'd like to
know what you think. If you've also read Microsoft .NET Distributed
Applications: Integrating XML Web Services and .NET Remoting by MacDonald,
I'd also be interested in your opinion of that.
- 12
- Visual Basic >> the specified module could not be foundHi All
Just upgraded to (win xp pro and office pro 2003) from (win 98 and word 97).
A reference has been set to the Microsoft Word 10.0 Object Library, but the
following code gives me an Automation Error: "The specified module could not
be found"
================================
Dim objWord as Word.Application
Set objWord = New Word.Application
================================
Any ideas why this is?
Thanks
Harold
- 13
- Visual Basic [VB] >> Listview select from Textbox stringI have a text box select items in a listview as text is being typed
into the text box. I get the select bar to move correctly in the
Listview control.
If the user presses the down or up key in the text box, I want to move
to the selected item in the listview box.
The down or up arrow does set focus to the listview box and the
selected item switches from the grey of being unfocused to the blue of
focus. So far, so good.
Pressing the down arrow again moves to the second entry in the
listview instead of the entry below the currently highlighted entry.
Susbsequent cursor movements work.
Obviously, the selected table index that I'm using is not working
correctly. What do I need to do to fix it?
Private Sub txtLoc_TextChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles txtLoc.TextChanged
Dim boolFound As Boolean
Dim i As Integer
Dim intLen As Integer
Dim Item As ListViewItem
Dim strLoc As String
strLoc = txtLoc.Text.Trim ' Get the string
If strLoc = "" Or strLoc = Nothing Then Exit Sub
intLen = strLoc.Length ' Length of substring
For i = 0 To lvw.Items.Count - 1
Item = lvw.Items(i) ' Get the item
Try
If boolFound = False And Item.Text.Substring(0,
intLen) = strLoc Then
lvw.Items(i).Selected = True
lvw.Items(i).EnsureVisible()
boolFound = True
Else
lvw.Items(i).Selected = False
End If
Catch ex As Exception
lvw.Items(i).Selected = False
End Try
Next
End Sub
Private Sub txtLoc_KeyUp(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyEventArgs) Handles txtLoc.KeyUp
If e.KeyData = Keys.Down Then lvw.Focus()
If e.KeyData = Keys.Up Then lvw.Focus()
End Sub
Thanks
- 14
- Visual Basic >> Why does VB require a runtime library?Why is it that VB requires a runtime library, but some other languages don't?
Some programming languages can create a truly standalone executable that
doesn't have to rely on external files to run. Why doesn't VB create a truly
standalone executable? The IDE creates an executable, but then a runtime
library must be distributed with it. Why?
Thank you.
David
- 15
- MFC >> what is the implement of the "OnFilePrint"I can not find this function's implement both in MSDN and in the Project.
only I can find is the
ON_COMMAND(ID_FILE_PRINT_DIRECT, CScrollView::OnFilePrint)
and I can not find OnFilePrint in any other place.
and what is this functiong working and why is it not written in MSDN?
|
|
|