|
Bitmaps don't support an alpha channel natively. Usually when a bitmap is drawn "transparently" it uses what's called a bitmask (or mask for short).
Alternatively, you could try another format like GIF, PNG, TIFF, etc. that do support an alpha channel.
Jeremy Falcon
Imputek
|
|
|
|
|
But how do you convert an icon in VB.NET code to such a format???
http://www.nico.gotdns.com
|
|
|
|
|
How do you do this then??
http://www.nico.gotdns.com
|
|
|
|
|
dear all,
1)how do i add hexadecimal numbers in vb (result too in hexadecimal numbers)
2) if there are 4 hexadecimal numbers say
0x40
0x80
0x1000
0x2000
and i have a number 0x10C2 (which is the hex sum of the top 3 numbers).
now using such a number (which is the sum of any of the above hex numbers ) can i find which of the above numbers are included in the sum if it is ensured that a number is added only once.
thnx in advance
|
|
|
|
|
- In VB/VB.NET, hexadecimal numbers are prefixed with
&H , not 0x .
You use hex numbers in exactly the same way as decimal numbers, e.g. Dim i As Integer = &H40 + &H80 .
To print the result as a hex number, use i.ToString("X") in VB.NET, or Hex(i) in VB6. - The sum of the first three numbers is 10C0, not 10C2.
You can use the And operator to find the numbers. For example:
Dim number As Integer = &H10C0
Dim sum As String
Dim i As Integer
i = 1
Do While number > 0
If 0 <> (number And i) Then
If Len(sum) > 0 Then sum = sum & " + "
sum = sum & Hex(<span title="Whoops!">i)
number = number - i
End If
i = i * 2
Loop
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
|
|
|
|
|
rishabhs wrote:
thanx for ur reply Richard! [rose]
but the code u gave me doesn't returns all the numbers which r added to get the number &H10C0
plz. help me understand the logic of this job
I fixed a typo in my previous post, which should give you the correct result. [You need sum = sum + Hex(i) , not sum = sum + Hex(number) . ]
The code walks through each binary bit of the number, and tests to see if that bit is set, using the bitwise And operator. [0 <> (number And i) ]. If the bit is set, it appends the hex representation of the bit to a string.
0x10C0 = 0001 0000 1100 0000
= 0000 0000 0100 0000
+ 0000 0000 1000 0000
+ 0001 0000 0000 0000
= 0x0040
+ 0x0080
+ 0x1000
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
|
|
|
|
|
thanx a lot
|
|
|
|
|
Hello guys ... I want to write an application which use Wave Pedal. From where i want to start this application. How inputs from Wave Pedal catch in application ....
Actually i do not know from where i get Helped that's why i posting here.
I hope u guys helped me in any way ...
any artical, any web site, any code, any thing .... will help alot
Thanx in advance ...
|
|
|
|
|
I want to know how to send and read bytes to LPT port(parallel port) using VB
|
|
|
|
|
i have 2 images and when mouse goes over 1 the other shows. how do i code it?
i started out putting picture box. am i on the right way? im a rookie so plz be specific. thank you.
|
|
|
|
|
First you should reference "System.Drawing" by right clicking on references or add "Imports System.Drawing" to the top of your project.
In the class name dropdown (above your code) choose the command button and next to that in the method name dropdown choose MouseHover/MouseLeave. Enter code similar to the following:
Private Sub Button1_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.MouseHover
Button1.Image = Image.FromFile("D:\Source\App.ico")
End Sub
Private Sub Button1_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.MouseLeave
Button1.Image = Image.FromFile("D:\Source\Add.ico")
End Sub
|
|
|
|
|
Hi All
I was trying to print the powerpoint files through my program.
the program opens the file, sets the print options, prints it and closes it..
the program has no error, but the line to close the file get executed while the file is printing. How can I wait all the slides in the file get printed and then quit MS PowerPoint?
thanks
|
|
|
|
|
I want to do a sort of the data in a MSHFlexGrid and only when the user clicks in the ColHeader. How can I detect that the user clicked in the ColHeader and the correct column clicked in?
|
|
|
|
|
All you need to do to check that the user clicked on the header column is to have a condition that checks that the fgrid.MouseRow = 0, and to read the column clicked on use fgrid.MouseCol. Both are 0 based.
Cheers
|
|
|
|
|
i know that it is possible to disable a column in a datagrid by using Datagrid1.Columns("Field").Locked = true. is it equally possible to disable a row? for example, i wish to disable a row in 2 of the values in the row are the same (quantity and quantity in), but i do not know how to reference it. The only other column in the row is Product Code which is unique. is there any way to do it - thanks in advance for any help!
|
|
|
|
|
With Adodc4.Recordset
.MoveFirst
Do While Not .EOF
Dim strPriceCode As String
strPriceCode = DataGrid1.Columns("PriceCode")
Dim codeSQL As String
codeSQL = "Select PriceCode " & _
" From PriceDescription " & _
" Where PriceCode = '" & strPriceCode & "'"
Set RS = Conn.Execute(codeSQL)
If RS.BOF And RS.EOF Then
MsgBox " '" & strPriceCode & "' Price code does not exist - please try another", vbExclamation, "Invalid data"
End If
DataGrid1.Columns("Price") = txtTest.Text
If Not IsNumeric(Me.txtTest.Text) Then
MsgBox "Please enter a valid value for Quantity", vbExclamation, "Missing Quantity"
Exit Sub
End If
Dim cPrice As Currency
cPrice = DataGrid1.Columns("Price")
'updating the price table
Dim updateSQL As String
updateSQL = "Update Price set price = " & cPrice & " " & _
" where PriceCode = '" & strPriceCode & "' " & _
" AND ProductCode = '" & strProductCode & "'"
Set RS = Conn.Execute(updateSQL)
.MoveNext
Loop
End With
to (attempt to!) explain the above code, i am saving 1 column of a datagrid, and looping through it by means of the Recordset that it is bound to at run time. However, i want to ensure that the value entered at each record is a numberic value, so it has to be included in the loop as can be seen above. However, when i try to run it ( and enter a non-numeric value to test it) i get the following error " Multiple step operation generated errors - check each status value"....is there anything i can do to fix this? if you need any additional information, please let me know! Thanks in advance!
|
|
|
|
|
im new to programming...
but couldn't you use the IsNumeric() function, if u get true back, just convert it to whichever type u need? CInt, CSng, CDec...etc.
Sorry if i don't know what i'm talking about
______________________________________________
"I'm not me when I dream...anymore." -TRUSTcompany
|
|
|
|
|
Hi,
I want to display a MDI form form ActiveX control. Do U have any idea how to do that? I know it's possible in VB.NET but I want to do it in VB.6.0
Uttam
Regards;
Uttam Kumar
|
|
|
|
|
I have looked into all the crazy ways of doing this and the best that I can find is to create your 'MDI Form' as a usercontrol, then load it onto a real MDI Child form in the parrent application.
The only other thing that you will need to figure out is how to build and destroy menus on the child form if you need them.
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
|
|
|
|
|
Hi,
Thanks a lot for the help but I'm bit lost can U plz send me a sample code?
Lot of thanks in advance.
Uttam
Regards;
Uttam Kumar
|
|
|
|
|
I sent the sample app to first email address on the contact page of your website.
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
|
|
|
|
|
Uttam Kumar,
You cannot do this in native VB6 functionality. However, there are some OCX's out on the Internet that will allow you to do this relatively easily.
Good Luck,
Tony
|
|
|
|
|
Hi,
I need to implement "Back" and "Forward" button functionality (as seen in browser) in my application.
I have general idea about how to implement it(using either stacks or an array) but am wondering if there is any article or code snippet which shows how do it.
Any help is appreciated.
Thanks.
Vidvan
|
|
|
|
|
What are you working with, could you be a little more explicit?
Nick Parker
The only man who never makes a mistake is the man who never does anything. - Theodore Roosevelt
|
|
|
|
|
I am using VB.Net to write an application which can automatically send an email. I don't want to restrict my program by usign Outlook only. Is there any other way to send an email, say through an mail server??
Any help or pointers is greatly appreciated!
Notorious SMC
The difference between the almost-right word & the right word is a really large matter - it's the difference between the lightning bug and the Lightning
Mark Twain
Get your facts first, and then you can distort them as much as you please
Mark Twain
|
|
|
|