|
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
|
|
|
|
|
I figured it out:
'Get an ImageCodecInfo object that represents the TIFF codec.
myImageCodecInfo = GetEncoderInfo("image/Tiff")
Private Shared Function GetEncoderInfo(ByVal mimeType As [String]) As ImageCodecInfo
Dim i As Integer
Dim encoders() As ImageCodecInfo
encoders = ImageCodecInfo.GetImageEncoders()
For i = 0 To (encoders.Length - 1)
If (encoders(i).MimeType = mimeType) Then
Return encoders(i)
End If
Next i
End Function 'GetEncoderInfo
Zulfikar Ali
|
|
|
|
|
Hi there,
When I add a new data environment y right-click on conection porperties the machine says that It's missing the data source locator, I do know what's that nor how to make the data environment work.
Any tips?
Thanks
Ale
|
|
|
|
|
help me please!
I have a form and ProgressBar on it.
I want to close form by clicking on button while progressbar is steping.
But it only work when progressbar ends steping.
form is showdialog
Please help!!
|
|
|
|
|
Hello All,
The sample code below can be used to send a mail message using the Outlook. How to make that generic to pick the default mail client?
*********************************************
Set myOlApp = CreateObject("Outlook.Application")
Set myItem = myOlApp.CreateItem(olMailItem)
Set myAttachments = myItem.Attachments
myAttachments.Add "C:\Hello.txt", olByValue, 1, "Hello World"
Set myRecipient = myItem.Recipients.Add("rainadeepti@rediffmail.com")
'save the item before sending it off.
myItem.Save
myItem.Display
*********************************************
Thanks,
Deepti
|
|
|
|
|
Can anyone tell me what are the problems, shortcomings and bugs related to M$ Winsock control. Many VB developers use it but most of them i've observed are not pleased with this control.
|
|
|
|
|
I'm trying to create a User Control in VB.NET. I think the project to use is the Windows Control Library. It looks like the VB6 User Control environment but it compiles to a DLL file that can only be referenced. When I reference it from another project, I'm not sure how to create an instance of the control (other than through code). The control doesn't show up in the toolbox.
Ain't codin fun?
|
|
|
|