|
You can pick a color for a transparency key for your ENTIRE form, not parts of it. If there is anything painted on your form that is this chosen color, even in a Flash animation, it'll be drawn transparent.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi,
I have created dynamic button controls and added in Form directly. I want to add tool tip for each dynamic controls, Let me know how to do it?
Any luck, Thanks in advance.
Regards
Rams.
Be simple and Be sample.
|
|
|
|
|
suppose you are doing the following:
Dim btn As New Button
btn.Location = New Point(30, 10)
btn.Size = New Size(75, 35)
btn.Text = "abc"
ToolTip1.SetToolTip(btn, "this this my tool tip")
' just add a tooltip control to the form from the toolbox
Me.Controls.Add(btn)
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
how i change resolution of a system and according to that resolution all control to change their pixel ratio or forcefully i set a resolution which is fit for my application.
Ram Krishna Pattnayak
Software Developer(SDS)
Sun-Dew Solutions Pvt.Ltd
www.sundewsolutions.com
kolkata
|
|
|
|
|
That's a really bad idea. Changing the screen resolution will rearrange the icons users have on the desktop. You dont change system-wide settings just to make YOUR app look pretty. Windows is a shared system, and it's up to you to write your code so it works and plays nice with others.
Reead Automatic Scaling in Windows Forms[^] and be sure to read up on all the links at the bottom of that page.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
thanks for replay.if i want fix a resolution for my system then i want some code or some example.i want is there any mathod present for fix the screen resolution.thanks for give the hints i am using u,r concept
Ram Krishna Pattnayak
Software Developer(SDS)
Sun-Dew Solutions Pvt.Ltd
www.sundewsolutions.com
kolkata
|
|
|
|
|
|
how i do simple flash animation in vb.net,please any one send sample or send the steps for flash animation in vb.net.
Ram Krishna Pattnayak
Software Developer(SDS)
Sun-Dew Solutions Pvt.Ltd
www.sundewsolutions.com
kolkata
|
|
|
|
|
how i do simple flash animation in vb.net,please any one send sample or send the steps for flash animation in vb.net.
Ram Krishna Pattnayak
Software Developer(SDS)
Sun-Dew Solutions Pvt.Ltd
www.sundewsolutions.com
kolkata
|
|
|
|
|
U have to add ShockwaveFlashObjects & ShockwaveFlashObjects from add reference. then onload if flash object name is FlashObj write:
With FlashObj
.Stop()
.Movie = Application.StartupPath & "\mymovie.swf"
.Play()
End With
then u can dispose it : FlashObj.Dispose()
|
|
|
|
|
dear friends
I have developed an application, when the user clicks on create new file the it should create a sql2005 database file with the user defined name? how should i achive it
thanx
Taher
|
|
|
|
|
Use the CREATE DATABASE MyDbName SQL statement.
|
|
|
|
|
hi
i have to insert into a access table through vb.net
it contains one text field and a memo field
i am able to insert for first time from the second time it shows error
ans pls very urgent
with regards
Balagurunathan.B
|
|
|
|
|
Standard question #2:
What error message do you get?
Standard question #3:
What does your code look like?
---
single minded; short sighted; long gone;
|
|
|
|
|
i have cleared the error
thanks for ur response
with regards
Balagurunathan.B
|
|
|
|
|
How to insert data table details to SQL table in one time......??????
Thiwa
|
|
|
|
|
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Hi,
I'm writing a program which views icons that are embedded in Dll and Exe files. But I'm not sure how to extract the icons from the files to view them. How would I go about doing that and, is there an easier way to view the icons than extracting them first?
Thanks!
Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.
|
|
|
|
|
|
Thank you!
Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.
|
|
|
|
|
Ok, I tried the article that you suggested, but it saves the icon in 16-bit colors instead of 32-bit. I would rather just display certain icons in a DLL (i.e. Shell32.dll) instead of extracting them. Any other suggestions?
Thanks again.
Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.
|
|
|
|
|
if you want to display them in a form try a listview. You can dynamically add items. This link will show you how:
http://abstractvb.com/code.asp?A=968
You can then add each one you want to and set the images etc.
Posted by The ANZAC
|
|
|
|
|
Thanks for replying. I tried displaying the images in a ListView, but to do so I had to add the image I needed into an ImageList. But an ImageList doesn't allow any files except strict image/icons.
Is there any chance that .NET has a class that will view DLL icons automatically?
Thanks again!
Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.
|
|
|
|
|
Not that i know of, perhaps try a new post that asks this question specifically and you may get a better response, you've pretty much reached the extent of my knowledge in this field...lol which obviously isn't much.
Posted by The ANZAC
|
|
|
|
|
I've tried that code before and your right it does save them at a low quality. However, the extraction works just fine and as far as I know it's the only way to get at the icons. You don't actually need to save the icons to view them however. Once the icon has been extracted you can add it to your imagelist and then add a new item to the listview. What I would do is use the code from that example as a base and modify it to suit your needs. I created this example using the 'relevent' code from that project and tweaked it slightly. The end result is a method you can call to popullate a listview with the icons from a given file. Feel free to use it or modify it to suite your needs. I did it quickly so who knows what I missed but it worked great when I tested it. All you need to do is pass to the function the file you want to read and the listview to use for display.
Imports System.IO
Public Class ExtractIcon
Private Declare Function ExtractIconEx Lib "shell32.dll" Alias "ExtractIconExA" _
(ByVal lpszFile As String, _
ByVal nIconIndex As Integer, _
ByRef phiconLarge As Integer, _
ByRef phiconSmall As Integer, _
ByVal nIcons As Integer) As Integer
Private Declare Function DestroyIcon Lib "user32.dll" (ByVal hIcon As Integer) As Integer
Private Declare Function ExtractIcon Lib "shell32.dll" Alias "ExtractIconA" (ByVal hInst As Integer, ByVal lpszExeFileName As String, ByVal nIconIndex As Integer) As Integer
'calls API to determine how many icons are embedded in the file
Private Shared Function GetNumberOfIcons(ByVal fl As String) As Integer
Return ExtractIconEx(fl, -1, 0, 0, 0)
End Function
'Extracts each icon from the file given, and saves it to the destination directory
Public Shared Sub ExtractIconsFromFile(ByVal file As String, ByVal list As ListView)
Dim info As New IO.FileInfo(file)
Dim numicons As Integer ' number of regular icons in the file
Dim retval As Integer ' return value
Dim hInstance As IntPtr = System.Runtime.InteropServices.Marshal.GetHINSTANCE(System.Reflection.Assembly.GetExecutingAssembly.GetModules()(0))
'Make sure we have an image list for our listview
If list.LargeImageList Is Nothing Then
Dim iconImageList As New ImageList
iconImageList.ImageSize = New Size(32, 32)
iconImageList.ColorDepth = ColorDepth.Depth32Bit
list.LargeImageList = iconImageList
End If
list.Items.Clear()
numicons = GetNumberOfIcons(info.FullName)
For i As Integer = 0 To numicons - 1
retval = ExtractIcon(hInstance, info.FullName, i)
If retval > 0 Then
Dim ico As Icon = Icon.FromHandle(New IntPtr(retval))
list.LargeImageList.Images.Add(retval.ToString, ico)
list.Items.Add(retval.ToString, retval.ToString)
End If
DestroyIcon(retval)
Next
End Sub
End Class
-- modified at 1:31 Saturday 3rd March, 2007
|
|
|
|