|
The filesystem object lets you read a file a line at a time.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
I'm writing a com callable wrapper to make it possible
for vb6 developers to call the new objects written in C#.
I have trouble to pass an array of any kind from vb6 to
the .Net object.
this is the method in c#:
public string TestMethod(string[] str)
and the call in vb6 is:
str2 = secAccess.TestMethod(str)
and then i get the following compiler error:
Function or interface marked as restricted, or the
function uses an Automation type not supported in Visual
Basic.
I also tried to use [MarshalAs(UnmanagedType.SafeArray)]
in the C# call but I get the same error.
Can somebody help me with this problem.
Please send an answer to mark.willems@rabobank.com
regards,
Mark
|
|
|
|
|
I figured out what the answer is.
To be compatible with COM you should pass the array By Ref instead of By Val(which is the default in .NET).
|
|
|
|
|
Good morning community,
Visual Basic reference widely shows how to create custom commandbar controls and how to handle events from them. One of the popular ways to do this for MS Office application is to assign the "OnAction" property for a created control. (e.g. cbCtrl.OnAction = "MyActionHandler") But how is this all implemented?
I am going to provide the same functionality for my CommandBarControl object. Firstly, I thought that Visual Basic queries for OnAction property and calls the function on its own, but I was wrong - my implementation of get_OnAction was never called.
Could you please tell me about how this OnAction functionality is implemented. Thanks.
__________________
© Vitaly A. Genkin
If an application works, then the number of bugs is even.
|
|
|
|
|
I use a webbrowser contorl to navigate a page in my program. But when the page has frameset, only the first frame will be displayed in this control. So, how can I display pages with frames? Thank you.
|
|
|
|
|
Hmmm. I have have done this, but did not have any problems. Are you sure the HTML is correct? I also think that each frame is treated as a window, but dont take that to the bank. In other words, I am not sure I understand your problem. If you are trying to open an HTML file that has a tag in it the web browser control should just open it. You may want to make sure your web browser control is big enough to display all of the frames. I don't think I am helping much, but I hope it does.
|
|
|
|
|
May I know how to restrict user by launching the application only once?
When the application has been launched and not closed yet, some notification or feedback to user when he/she attempt to launch the application again.
Please help.
thanx in advance.
|
|
|
|
|
In VB6 you can add something simple like this to your load event:
<br />
If App.PrevInstance = True Then<br />
MsgBox "Detected previous instance. Exiting."<br />
End<br />
End If<br />
Roger Stewart
"I Owe, I Owe, it's off to work I go..."
|
|
|
|
|
Thank a lot.
But how about VB .Net?
|
|
|
|
|
|
How would I create a dll file when my program is complied?
Thanks!!;)
|
|
|
|
|
Hi..
you can create a DLL by selecting :
ActiveX DLL enstead of Standard EXE when creating the project..
I wish this is what you mean by your question..
|
|
|
|
|
Hi..
I wish to share a small VB6 problem..
I want to display hte BrowseForFolder Dialog so the user can select a
folder..
so I did this :
add a reference to shell32.dll (or Microsoft Shell controls and Automation)
the code :
Option Explicit
Dim sh As New Shell
Dim f As Folder
Private Sub Command1_Click()
Set f = sh.BrowseForFolder(Me.hWnd, "SDFg", 0)
MsgBox f.Title
End Sub
It works but it just gets the folder title not the path..
I wish to solve it using the Shell and Folder objects.
( I know the other solution using SHBrowseForFolder and SHGetPathFromIDList which you can find at :
http://www.allapi.net/apilist/SHBrowseForFolder.shtml
)
|
|
|
|
|
After you get the Folder object, use the FolderItems collection, like:
Dim fiPath As String<br />
<br />
Set f = sh.BrowseForFolder(Me.hWnd, "SDFg", 0)<br />
<br />
Set fi = f.Items.Item<br />
filePath = fi.Path<br />
MsgBox filePath
This will give you the full path of the item that was selected. You may need to add some checking against the FolderItem object because is maybe a 'special' folder and not have a Path associated with it (i.e MYCOMPUTER).
Roger Stewart
"I Owe, I Owe, it's off to work I go..."
|
|
|
|
|
I was wondering, can VB.net do operator overloading, so I can do something like :
A = B + C
where A,B,C are classes
Notorious SMC
Vb is as VB does
|
|
|
|
|
Sorry, VB.NET doesn't have operator overloading. You'll have to use C# for that...
steve
|
|
|
|
|
Hi !!
I'm using a ListView in my VB6 App. When the user clicks on an item, I manually start the editing, and then I wait for the 'AfterLabelEdit' message to check the item text.
The problem is that it seems VB is not sending the AfterLabelEdit message if the user chose not to change the item text. Thus, my App is not able to knwo when the user finished editing, which is an important information for me.
Any idea how to solve this problem ?
Thank you !
Jerome
|
|
|
|
|
i am trying to draw a rectganle on a .tiff image and then save the image. right now it's just saving a .tiif file nogthing on it. here is the code. your help is greatly appreciated. thanks
g = picImage.CreateGraphics()
Dim objBmp As Bitmap = New Bitmap(picImage.Size.Width, picImage.Size.Height, Imaging.PixelFormat.Format64bppPArgb)
objBmp.FromFile(strPath & curF & ".tif")
g.FromImage(objBmp)
'Sets the position of the mouse
finishX = e.X
finishY = e.Y
up = New Point(finishX, finishY)
'Sets the value of rectangle, x, y, width, height position
rect = New Rectangle(Math.Min(up.X, down.X), Math.Min(up.Y, down.Y), Math.Abs(up.X - down.X), Math.Abs(up.Y - down.Y))
'draws and fills rectagnle
g.DrawImage(objBmp, rect) 'New Rectangle(0, 0, objBmp.Width, objBmp.Height), 0, 0, objBmp.Width, objBmp.Height, GraphicsUnit.Pixel)
g.DrawRectangle(Pens.Black, rect)
g.FillRectangle(New SolidBrush(Color.White), rect)
objBmp.Save(strPath & curF & "s" & ".tif", Imaging.ImageFormat.Tiff)
g.Dispose()
objBmp.Dispose()
Zulfikar Ali
|
|
|
|
|
And what are the values in rect ?
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
i am getting the value from mouse. for example it could be anything. the thing is that when it saves it reduces the file size and if i open it it's just blank.
Zulfikar Ali
|
|
|
|
|
Zulfikar Ali wrote:
for example it could be anything
Yes, but what IS it ? Did you step into the code and make sure it was something that should draw a decent rectangle ?
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
hi guys ,
I want to show the status bar of the webbrowser (webbrowser control).I tried some code but seems not to work. so any help would be most appreciated ?
|
|
|
|
|
Hi..
I want to add hotkey functionality to a VB6 form..
but I can't find a control that can help ..
any help please ?
|
|
|
|
|
Do you mean the type of hotkeys where a letter of the caption is underlined and you must press "Alt" plus the letter to access it? If that is the case, you must use "&" in front of the letter you wish underlined in the caption. For example, to make the "C" of a cancel button the hotkey, the caption would be typed as this: "&Cancel"
Hope that helps.
|
|
|
|
|
thank you for your reply ..
but mean to support function keys (F1-F12)
I made it by setting the form's KeyPreview property to True
and check for the KeyCode in the keydown event
|
|
|
|