|
You have to store the user's autonumber as a custom field in Exchange.
You can extract it using MAPI. I myself prefer Outlook Redemption[^]. It's not free but it's pretty good.
To make sure the number appears in the correct spot you can create a message based on the template, read the content of the message, replace the running number location (e.g. you put [[AUTONUM]] in the template) with the current number, and reassign the message content.
Or simply write the message content when creating blank message.
The safest option is to not use templates at all as the person receiving the e-mail will need to have Outlook and the template installed if you are using custom form, otherwise they will only see the standard e-mail message.
Ed
|
|
|
|
|
I want to make an applicaiton which can inform me Call identification (CLI).
Readymade Application are available but it does not fulfill my needs. Any Sample Project for VB6?
Shoaib Nawaz
|
|
|
|
|
Google for "vb6 caller id" and you'll come up with a couple dozen examples.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hello World !
i'm trying to develop an app in VB6.
assume that i have a handle of an already opened IE window with the title "Hello".
how can my app know when that specific IE window has finished loading a document? i found on MSDN an IE event named DocumentComplete. how can i use this? or is there another way? can you post some sample code?
thanks in advance.
|
|
|
|
|
You can't use the events of an object that you don't have. Just having the window handle isn't enough. You'll have to get the automation object first. This is not an easy task. There is an example of what you need here[^], but I don't know if it's going to work for you.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
And admitting the example from the link works, how should I use DocumentComplete? And if I want to run a javascript command in that window? Say... alert()
|
|
|
|
|
No idea. I never use it.
Also, I don't think you can execute a JavaScript statement. At least not easily, without rewriting the page from your code to inject your new code.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hi,
does anybody know if there is a way of catching the item highlight event while traversing a combobox?
Thanks in advance
johnnyf
|
|
|
|
|
There is no "highlight event". I think the closest you're going to come is the SelectedIndexChanged event. What are you trying to do with this?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hi,
I'm trying to generate tooltiptext for long entries. I've used the selectedindexchanged event which works ok but the list retracts after selection with the tooltiptext appearing a distance below the combo box. I'd like the ability to hover on each entry while the list is extended. I thought there might be some way of using a highlight event since each entry is highlighted as the mouse moves over the items.
Regards
Johnnyf
|
|
|
|
|
Hello there fellow coders,
I have 2 picture boxes, pic1 style set to center img, and pic2 style set to normal.
i have a 512x512 pixel image in pic1, i then rotate it 45 degrees w/ some math on a graphics object and put it back in pic 2. in the rotation the image size goes to 724x724, but since its style is set to center img, you don't see a translation.
now my quest. I want to copy only the visible pixels (a 512x512 section) in pic1 to pic2.
any thoughts, when I try to get a section from the graphics object, pic2 shows a translation.
the angle dosent stay a@ 45, it's in continuous motion.
i'd u/l the project when I figure it out...
for now:
file
|
|
|
|
|
schweet_nectur wrote:
any thoughts, when I try to get a section from the graphics object, pic2 shows a translation.
If you've done a translation, you need to reverse it before using the graphics object for something else. If I get this right, you've done a rotate, which of course makes for a bigger image. But you want to copy out the central square, the bit you can see in your picture box ? This is pretty trivial, you just copy a section from the graphics object. If the graphics object is not in the right state to do this, you need to reverse whatever you did to it before.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I figured it out, when i tried to paint directly to the picture box it didn't work. Now it does because before i was overwriting it somewhere else. no more codeing w/o coffee...
|
|
|
|
|
I am trying to pass a Integer to my sql statement.
If I use this,
sComm += "SELECT Fixtures.HomeTeam, Fixtures.AwayTeam FROM Fixtures WHERE (Fixtures.FixtureID = ID)"
It doesn't work.
But if I use this:
sComm += "SELECT Fixtures.HomeTeam, Fixtures.AwayTeam FROM Fixtures WHERE (Fixtures.FixtureID = 1)"
It does work, obviously only getting fixture Id 1. The numbers I am trying to SELECT WHERE are autonums, could this be doing it.
|
|
|
|
|
Change the sql statement to this
Dim ID as integer = //source of id
sComm += "SELECT Fixtures.HomeTeam, Fixtures.AwayTeam FROM Fixtures WHERE Fixtures.FixtureID = " & ID & ";"
|
|
|
|
|
You could go with KaptainKrunchs version but it's always better to use stored procedures and parameterized queries. Read SQL Injection Attacks and Some Tips on How to Prevent Them[^] by Colin Angus Mackay for more information.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
In addition to what's already been said, why are you adding to sComm instead of just assigning a value to it ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
try this
cmd = new oledb.oledbcommand
cmd.commandtext = "SELECT Fixtures.HomeTeam, Fixtures.AwayTeam FROM Fixtures WHERE (Fixtures.FixtureID = ?)"
cmd.parameter.add("@1",1)
cmd.execute
its very safe
try this
V.Gopi.
Easy Design Systems
Coimbatore
India
|
|
|
|
|
Hi. My problem is this. I created a MS Access application in Access 2000 under Windows 2000, Service Pack 4.
My Access application has a form that asks the user to provide a file's pathname and I provide the Open/Save-As common dialog using MS Common Dialog Control, version 6.0. I do this using underlying VBA code and the properties of the Commond Dialog (OLE Class=CommonDialog, Class=MSComDlg.CommonDialog.1)
'call the Open file dialog and retrieve pathname selected<br />
'the Open/SaveAs common dialog appears as an ActiveX Control on the form (design view)<br />
<br />
With ActiveXCtl_OpenSaveAs<br />
.CancelError = True<br />
.Filter = "My data files (*.csv;*.txt)|*.csv;*.txt|All Files (*.*)|*.*"<br />
.DefaultExt = ".csv"<br />
.DialogTitle = "Select data file for Import"<br />
.FilterIndex = 1<br />
.Flags = cdlOFNHideReadOnly<br />
' .Filename = strInitialFilename<br />
.ShowOpen<br />
'<br />
If .Filename <> "" Then<br />
editInputPathname.Value = .Filename<br />
End If<br />
'<br />
End With<br />
Under Office 2003 on a Windows XP machine, I get the error
Microsoft Office Access
Object doesn't support this property or method
then related error messages...
You don't have the license required to use this Active X control...
I have tried putting the COMDLG32.OCX file in places it should find, but that doesn't help.
What must I do to get my code to work on latest Access edition?
Thanks.
Johnny
|
|
|
|
|
I got this message after executing a stored procedure under SQL server.
Procedure or function UpdateAllRecords has too many arguments specified.
the SQL code is:
CREATE PROCEDURE dbo.UpdateAllRecords
@form_id int,
@username varchar,
@site varchar,
@division varchar,
@branch varchar,
@activity varchar,
@room varchar,
@location varchar,
@hazard varchar,
@description varchar,
@rating varchar,
@probability varchar,
@level varchar,
@ventilation varchar,
@laboratory varchar,
@clothing varchar,
@gloves varchar,
@eye varchar,
@respirator varchar,
@footwear varchar,
@info varchar,
@person varchar,
@summary varchar,
@discussed varchar,
@project varchar,
@manager varchar
AS
UPDATE form
SET
activity = @activity,
room = @room,
location = @location,
hazard = @hazard,
description = @description,
risk = @rating,
probability = @probability,
levels = @level,
ventilation = @ventilation,
laboratory = @laboratory,
clothing = @clothing,
gloves = @gloves,
eye = @eye,
respirator = @respirator,
footwear = @footwear,
info = @info,
persons = @person,
summary = @summary,
discussed = @discussed,
lab_manager = @manager,
pro_manager = @project
WHERE
form_id = @form_id
GO
And the page code is:
conn.Open()
Try
Dim command As New SqlCommand("UpdateAllRecords", conn)
command.CommandType = CommandType.StoredProcedure
command.Parameters.Add("@form_id", Session("form_id"))
command.Parameters.Add("@username", Session("username"))
command.Parameters.Add("@site", Session("site"))
command.Parameters.Add("@division", Session("division"))
command.Parameters.Add("@branch", Session("branch"))
command.Parameters.Add("@activity", Session("activity"))
command.Parameters.Add("@room", Session("room"))
command.Parameters.Add("@location", Session("location"))
command.Parameters.Add("@hazard", Session("hazard"))
command.Parameters.Add("@description", Session("description"))
command.Parameters.Add("@rating", Session("rating"))
command.Parameters.Add("@probability", Session("probability"))
command.Parameters.Add("@level", Session("level"))
command.Parameters.Add("@ventilation", Session("ventilation"))
command.Parameters.Add("@laboratory", Session("laboratory"))
command.Parameters.Add("@clothing", Session("clothing"))
command.Parameters.Add("@gloves", Session("gloves"))
command.Parameters.Add("@eye", Session("eye"))
command.Parameters.Add("@respirator", Session("respirator"))
command.Parameters.Add("@footwear", Session("footwear"))
command.Parameters.Add("@info", Session("info"))
command.Parameters.Add("@person", cblPersons.SelectedItem.Text)
command.Parameters.Add("@summary", Session("summary"))
command.Parameters.Add("@discussed", rblOption.SelectedItem.Text)
command.Parameters.Add("@project", Session("project"))
command.Parameters.Add("@manager", Session("manager"))
command.Parameters.Add("@project", Session("project"))
command.ExecuteNonQuery().ToString()
Finally
conn.Close()
End Try
Can anyone please help?
I appreciate you taking your time.
|
|
|
|
|
You defined a project parameter twice.
mcgannmcgann wrote:
command.Parameters.Add("@project", Session("project"))
command.Parameters.Add("@manager", Session("manager"))
command.Parameters.Add("@project", Session("project"))
Also why put a .ToString() on the ExecuteNonQuery method if your not using the return value?
|
|
|
|
|
Can somebody tell me how to run my Windows Application with different Windows User credentials (Windows 2000 Or XP)
I have the UserName and Password which I want to hardcode
A restriced windows users uses this application and the application involves different operations which require a standard or admin user
Thank You
|
|
|
|
|
An application can't get security higher than the person who ran it.
In order for this to work, your application must be executed, from the very start, using different credentials.
This means either...
1) Holding down Shift while you right-click the icon for the app and clicking "Run As", then supplying the credentials.
2) Using the RunAs command line app to launch your application. but since the username and password would be plainly visible, this isn't the best option.
3) Writing your own launcher application that can launch your application using a username and password. You'll have to use the CreateProcessAsUser[^] Win32 API function to launch your application. The downside to this is how are you going to store the username and password so your launcher app can get to it? If your machines are in a workgroup environment, is this username and password the same on all machines? If so, you've got issues.
Now, noone of these options are the best one. Since the application will be running under a common account, you can't tell who's really doing what with that account. It's a generic that is difficult to administer, and that is a big security concern.
You'd be much better off expanding the rights of the people using the application than you would using the RunAs service.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hello Dave!
Thank you for replying.
I think the 3rd option is the suitable one if I keep the encrypted username and password in the text file or registry
Do you?
|
|
|
|
|
Encrpyting it isn't the hard part. Get the CreateProcessAsUser part to work first.
After being a LAN Admin for many years, I'm still going to tell you that this is NOT the way to go.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|