|
|
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
|
|
|
|
|
I want to add a sum in a textbox from a list of numbers in vb6 and it's not working
sum = 0
i = 0
For i = 1 To List1.ListCount
sum = sum + List1.Text
Next 1
Text1.Text = sum
Thankm you for helping me
|
|
|
|
|
This looks like a homework assignment of sorts. I'll give you a couple of hints.
1) VB starts counting at 0 by default.
2) List controls do not have a "Text" attribute. You will need to find a method that will allow you to access each item in the list independently.
Good luck.
|
|
|
|
|
I am stock I need more help please
Thank you
|
|
|
|
|
Investigate the "List" property of the List object.
<br />
List1.List()<br />
|
|
|
|
|
I decided a fun project to work on would be a VB app that would log on to my Yahoo! mail account, copy the messages into files on my machine, and then delete the messages online. As easy as it is to use OpenUrl, the project is still proving to be a bit outside the scope of my current abilities.
My problem is that when I use OpenUrl on a url that I am currently forcing the user to copy and paste, the cookies required aren't being accessed through my program and I am unsure how to do that. Any suggestions?
Thanks,
Andrew
|
|
|
|
|
The datagrid has edit, update, cancel and delete functionality.
On edit the dropdownlist becomes visible and is populated by a dataset using a stored procedure. I want my users to be able to only select specific [valid] regions.
I need to know how to pass the dropdownlist1.selecteditem.value to the update function [it seems to be going out of scope] so that I can write back the changes.
dropdownlist_selectindexchanged doesn't return a value
Any ideas?
|
|
|
|
|
Hi, I am a vb6 programmer who is about to embark in vb.net. I was wondering if someone could recommend me any GOOD books out there for people beginning vb.net? Thanks a lot
VB is as VB does!
|
|
|
|
|
Ok, I am halfway done for implementing my telephony application and I encountered a major problem. I am using a ZOOM USB Modem and was stunned to learn that it is half duplex. When I dial the phone, and the voice mail answers I can set tones and transmit voice, but I cannot hear what is going on at the other end. How do I switch from a send state to listening state?
|
|
|
|
|
I am working on a multiframe .Tiff editor. I am trying to save several .tiff files into one file. There is C# example in http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemdrawingimagingencoderclasssaveflagtopic.asp
I have converted it to VB .NET.
private sub SaveTiff()
Dim multi As Bitmap
Dim page2 As Bitmap
Dim page3 As Bitmap
Dim myImageCodecInfo As ImageCodecInfo
Dim myEncoder As Encoder
Dim myEncoderParameter As EncoderParameter
Dim myEncoderParameters As EncoderParameters
' Create three Bitmap objects.
multi = New Bitmap("0.tif")
page2 = New Bitmap("1.tif")
page3 = New Bitmap("2.tif")
' Get an ImageCodecInfo object that represents the TIFF codec.
myImageCodecInfo = GetEncoderInfo("image/Tiff")
' Create an Encoder object based on the GUID
' for the SaveFlag parameter category.
myEncoder = Encoder.SaveFlag
' Create an EncoderParameters object.
' An EncoderParameters object has an array of EncoderParameter
' objects. In this case, there is only one
' EncoderParameter object in the array.
myEncoderParameters = New EncoderParameters(1)
' Save the first page (frame).
myEncoderParameter = New EncoderParameter(myEncoder, CLng(EncoderValue.MultiFrame))
myEncoderParameters.Param(0) = myEncoderParameter
multi.Save("C:\Projects\FaxView\save.tif", myImageCodecInfo, myEncoderParameters)
' Save the second page (frame).
myEncoderParameter = New EncoderParameter(myEncoder, CLng(EncoderValue.FrameDimensionPage))
myEncoderParameters.Param(0) = myEncoderParameter
multi.SaveAdd(page2, myEncoderParameters)
' Save the third page (frame).
myEncoderParameter = New EncoderParameter(myEncoder, CLng(EncoderValue.FrameDimensionPage))
myEncoderParameters.Param(0) = myEncoderParameter
multi.SaveAdd(page3, myEncoderParameters)
' Close the multiple-frame file.
myEncoderParameter = New EncoderParameter(myEncoder, CLng(EncoderValue.Flush))
myEncoderParameters.Param(0) = myEncoderParameter
multi.SaveAdd(myEncoderParameters)
end sub
Private Shared Function GetEncoderInfo(ByVal mimeType As [String]) As
ImageCodecInfo
Dim j As Integer
Dim encoders() As ImageCodecInfo
encoders = ImageCodecInfo.GetImageEncoders()
j = 0
While j < encoders.Length
If encoders(j).MimeType = mimeType Then
Return encoders(j)
End If
j = j + 1
End While
Return Nothing
End Function
myImageCodecInfo is retunring nothing. In the GetEncoderInfo function I am increasing j by + 1. But in the MSDN c# example it is missing. If i don't increase J by +1, gives infinite loop.
If you have any idea why it is happening, that would be great be great. Thanks
Zulfikar Ali
|
|
|
|