|
Are you still stuck on this? I'm pretty sure my buddy has done this before so I could ask him tomorrow if you're still stick (seeing as you asked this a little while ago).
|
|
|
|
|
how to execute query thru code and display the results thru code in VB.Net?
when the data is connected thru oleDbDataadapter i.e MSaccess??
plz help !!
|
|
|
|
|
how to implement Update procedure in visual basic.net when
connection to the database is made using oledbDataadapter and objdataset??
i mean how to implement update query in dataset
when i try update it gives me this error :
Update requires a valid Update Command when passed DataRow collection
with modified rows.
please tell me how to solve this?
--thnx
|
|
|
|
|
you could try and add an Edit() command. I know in VB 6.0, you can only put an update() command if you had an edit or add command before it.
I'm not usre if it is the same in vb.net, I am still in the trial period of experimenting with it.
Have fun!
|
|
|
|
|
pretty new to .NET, i was just trying to read an image column (recordset) into a stream object before i flush the stream and dump everything to disk.
Here's the code:
mstream.Write rs.Fields("Photo").Value 'Exception thrown here!
mstream.SaveToFile "c:\oolala.bmp"
The exception thrown:
MYQUOTE:
"SystemRuntime.InteropServices.COMException 0x800A0C93 Operation is not allowed in this context
at ADODB.StreamClass.Write( Object Buffer)
..."
Any idea? I presume i cant just put this VB 6 code in VB.NET...? any pointer?
Thanx!
norman_lm_fung@hotmail.com
norm
|
|
|
|
|
can any1 help me out... problem is how to create ActiveX controls for making a time line for scheduling which should also have the option of draging so the schedule can be updated.
|
|
|
|
|
I have an old VB6 projected that I have upgraded to VB.NET and all works well apart from one strange issue.
I have a form with an Load event handler, not if I display the form using myForm.Show () Load executes, if I use myForm.ShowDialog () then Load does not execute!
Is there a way round this?
Thanks
Stephen.
|
|
|
|
|
I have not played around with .ShowDialog much, but from the looks of it, what you see is what you get. Is there a reason you are using ShowDialog vs. show? Are you really trying to use this form as a modal dialog box?
|
|
|
|
|
I am writing an application right now in VB 6.0. I was just wondering if someone could help with this. Upon the FormLoad() function, I need the program to call a notepad file (main.ini) and read the third line and replace a variable inside of my program. Can somebody please please help me????
Thanks again,
Bob
|
|
|
|
|
|
ray's ini file reader is the preferred method for working with application config stuff, but if you want to work with text files, use the FileSystemObject
where: scrrun.dll,
register dialog: Microsoft Scripting Runtime
progid: scripting.filesystemobject
i'm typing this code in manually, so it might not be syntactful
<br />
<br />
dim fso as scripting.filesystemobject<br />
set fso = new scripting.filesystemobject<br />
<br />
dim txt as scripting.textstream<br />
set txt = fso.opentextfile("c:\mytextfile.txt")<br />
<br />
do while not txt.atendofstream<br />
msgbox txt.readline<br />
loop<br />
<br />
txt.close<br />
set txt = nothing<br />
set fso = nothing<br />
<br />
-John
|
|
|
|
|
I need to get a path of an app's exe using registry,in VBS
|
|
|
|
|
I would search the registry for the filename that you need the path to. If it is an exe file that is registered to a file ext then it will probably show up in there. Once you know it you can open the key in your script and check to see if it exists.
|
|
|
|
|
I have an application that it connect to a dataenviroment Form by coding,now i want to connect a datagrid to my dataenviroment,but can not.
my code is:
dim myde as new Dataenviroment
myde.connection1.connectionstring="..."
myde.commands(1).activeconnection=myde.connection1
myde.commands(1).commandtext="My table name"
set datagrid1.datasource=myde
datagrid1.datamember=command1
|
|
|
|
|
Dim powerpoint_4
Set powerpoint_4 = CreateObject("PowerPoint.Application")
powerpoint_4.Activate
Dim presentation_4_1
Set presentation_4_1 = powerpoint_4.Presentations.Open("C:\temp\sample.ppt ")
With this the PPT comes up, I do not wish PPT to come up
and make some changes to sample.ppt
|
|
|
|
|
Hi,
Is there any way for differentiating whether a Forms Constructor is
called at DesignTime (by the FormsDesigner) or at Runtime.
I have some code in a Forms Constructor that should be executed only when the
Application is Run, and not when the Form is opened by the Forms Designer.
Thanks,
Firoz
|
|
|
|
|
I am developing a mediaplayer by customising Windows Mediaplayer Control. The mediaplayer should have the ability to detect whether there is already an audio playback running on the Windows 98/2000. If there is one running, the mediaplayer should stop it and start to run its own.
I know there is a property in Mediaplayer control which is called AudioStream, the value of which has been set to -1 be default. But I don't know how to make use of it.
Any help are greatly appreciated.
DJ
|
|
|
|
|
Hi
I'm creating new menu and toolbar in AutoExec sub, and removing it in AutoExit. When AutoExit executes I can see that menu and toolbar dissapear, but when I delete .dot from autostart directory and launch Word they are back. But when I manually execute AutoExit then menu and toolbar dissapear forever (strange, isn't it). Here are my subs:
Sub AutoExec()
Dim PKICommandBar As CommandBar
Dim PKIMenu As CommandBarPopup
Dim ETSIMenu As CommandBarPopup
Dim lTest As Long
'menu
Set PKIMenu = Application.CommandBars("Menu Bar").FindControl _
(Type:=msoControlPopup, Tag:=sMenuName)
On Error Resume Next
lTest = PKIMenu.Height
If (lTest = 0) Then Set PKIMenu = Application.CommandBars("Menu Bar"). _
Controls.Add(Type:=msoControlPopup)
PKIMenu.Caption = sMenuName
PKIMenu.Tag = sMenuName
On Error Resume Next
PKIMenu.Controls(sETSIMenuName).Delete
Set ETSIMenu = PKIMenu.Controls.Add(Type:=msoControlPopup)
ETSIMenu.Caption = sETSIMenuName
With ETSIMenu.Controls.Add(msoControlButton)
.OnAction = "SignDocument"
.Caption = "Podpisz dokument"
End With
With ETSIMenu.Controls.Add(msoControlButton)
.OnAction = "Settings"
.Caption = "Ustawienia"
End With
'toolbar
On Error Resume Next
Application.CommandBars(sETSIMenuName).Delete
lTest = 0
Set PKICommandBar = Application.CommandBars.Add
PKICommandBar.Name = sETSIMenuName
With PKICommandBar.Controls.Add(msoControlButton)
.Style = msoButtonIconAndCaption
.FaceId = 22
.TooltipText = "Podpisz dokument"
.OnAction = "SignDocument"
End With
With PKICommandBar.Controls.Add(msoControlButton)
.Style = msoButtonIconAndCaption
.FaceId = 22
.TooltipText = "Ustawienia"
.OnAction = "Settings"
End With
PKICommandBar.Position = msoBarTop
PKICommandBar.Visible = True
End Sub
Sub AutoExit()
On Error Resume Next
Application.CommandBars(sETSIMenuName).Delete
On Error Resume Next
Application.CommandBars("Menu Bar").Controls(sMenuName).Delete
MsgBox ("exit")'that's why I can see that menu and toolbar dissapear when I close Word
End Sub
Thanks for any help
|
|
|
|
|
Hi
I've created a toolbar in Office 97, but I don't know how to change the icon (I don't want to use standard icons). I would like to put icon data inside .dot file (is it possible?)
Thanks for any help
|
|
|
|
|
Hi All,
I have an application where I want a WinForm to be transferred/reproduced in another machine and get the feedback from the person in the other machine.
This is useful for implementing approval for overrides from an approver.
Would highly appreciarte for useful clues/sample codes.
Rgds
AB
|
|
|
|
|
|
As far as I know there was none that was able to do what the VS IDE could do (forms building).
I heard of folks running editors like CodeWrite and stuff to alloww them to edit and build code, but nothing that did the GUI stuff.
|
|
|
|
|
ok, I'm just starting to learn how to pass more complicated things from my C++ objects to vb (which I'm just starting to learn).
Currently I can't seem to figure out how to get my safearray out of the variant passed through my callback interface. This safearray needs to be passed back through a callback interface ACROSS process boundaries (no passing by ref allowed).
_____________________________________
the C++ side of this is as follows
SAFEARRAY *saHashCodes;
saHashCodes = SafeArrayCreateVector( VT_I4, 0, nNumHashCodes );
for ( U32 index = 0; index
|
|
|
|
|
You should also specify the VT_I4
var.vt = VT_ARRAY | VT_I4;
In ServerLink_ReturnPrivateHashList function you can have your array in "saHashArray" parameter. It will be the array of Long (not Integer!) values. You can obtain any value from him
Dim i As Long<br />
i = saHashArray(0)<br />
' or i = saHashArray(x), where x = 0,...,nNumHashCodes-1<br />
' or i = saHashArray(x), where x = LBound(saHashArray),...,UBound(saHashArray)
Or you can obtain whole array, but it's the same in it's usage
Dim arr() As Long<br />
arr = saHashArray
With best wishes,
Vita
|
|
|
|
|
excellent, it worked like a champ! 3 books, 2 newsgroups and about 4 irc channels later your the first person that could answer that. I really appreciate the help!
|
|
|
|