Interface And Graphics :: Display 48X48 Icon From Project/Resource?
Aug 2, 2010
Im in a win.form app. in .Net 2008 I have a lot of Icons that I want to display on a (TouchScreen enviroment) button The icons are in 8,16; 32 bit in the sizes 16X16 ; 32X32 ; 48X48 The buttons are large enough, they have a dimension of 252X132. The images are loaded via the Button propertie : Image. This has allso a size propertie, but is disabled. And I can see its loading the 32X32 32bpp format But I want the 48X48 size on there. Does some 1 knows how to get those sizes op the button.
View 3 Replies
ADVERTISEMENT
Aug 2, 2010
Im in a win.form app. in .Net 2008 I have a lot of Icons that I want to display on a (TouchScreen enviroment) button The icons are in 8,16; 32 bit in the sizes 16X16 ; 32X32 ; 48X48
The buttons are large enough, they have a dimension of 252X132.The images are loaded via the Button propertie : Image. This has allso a size propertie, but is disabled. And I can see its loading the 32X32 32bpp format But I want the 48X48 size on there. Does some 1 knows how to get those sizes op the button.
I know its possible via a imagelist but why have a resource if you cant use it??
View 6 Replies
May 27, 2009
How would I display an Icon at 48x48 resolution on a form in vb.net? I looked at using imagelist , but I don't know how to display the image that I add to the list using code and how to specify it's coordinates on the form. I did some google searching but none of the examples really show what I need to know.
View 3 Replies
Jun 1, 2009
I'm trying to get the 48x48 icon from an exe. I found a lot of examples in C#, but was unable to convert them to VB.NET. The examples I have are: url...Specifically the portion I can't figure out how to convert is the definition for IImageList..Any suggestions how to do this or how to convert that code?
View 2 Replies
Feb 5, 2008
i'm looking for a way to get the system's folder icon WITHOUT using an icon file. i've also come across this great class that works very well with files but i'm not sure how to make it work with folders.
Code:
Public Class Icons '=====================================================================================
' clsIcon
[Code]......
View 4 Replies
Oct 26, 2011
I like the default icon the program uses on the form title bar. The icon with the little red yellow and blue colored squares. I would also like to use it as the application build icon so it use it as the icon for the .exe file and shortcuts to the .exe file.I searched a long time and couldn't find the answer. Some said to take a screen-shot of the icon displayed on the screen and crop the image and make an icon that way, but when I tried to use alt-tab with the program running, and press print-screen, the alt button made it take a screen-shot of the currently selected window and not the entire screen, so I couldn't figure out how to get a screen-shot of it at it's full size.
View 4 Replies
Jul 8, 2009
where do can I find the save disk icon on the toolstrip.
View 2 Replies
May 31, 2012
I am working on a Vb6 to VB.net migration application.I am not able to proceed in one place.I have a Resources.Resx file in my application in which some Icons are stored like "icoUS","icoCA" etc. And there is a combo box where some country names are listed.On selection of this combo box, the corresponding countrie's flag image should be dsiplayed on a picture box.[code]...
View 1 Replies
Jan 4, 2011
I'm building a basic text based adventure game (main purpose is to just keep me fresh between programming classes during break, since I have my final VB course next semester and am trying to explore some different concepts and ideas for coding in VB) in Visual Studio 2008. During the character creation process, the user is allowed to choose a portrait to represent their character in game. I've loaded up my resource file with the portraits in question, but there is one thing I'm having some trouble with when it comes to selecting the portraits from that file. Keep in mind, I know how to do this exact thing by loading the pictures up into their own asset folder and grabbing them from there to display on the form. The resource file seems like a more intelligent way of doing it, but I've not used it much in past applications.
So, when the user clicks on the "next" arrow to cycle through the possible portrait choices, I want to change the current image in the picture box from, let's say, image1, to image2. Straight forward and all.I could load all of these images up into an image list, but again, this is all for exploratory purposes, so the following if statement is being used for that purpose only. I plan to code a more effective way of cycling through the images at a later date.
If picCharPort.Image = My.Resources.Image1 Then
picCharPort.Image = My.Resources.Image2
End If
For some reason, I am fully capable of assigning My.Resources.Image1 to picCharPort.Image normally, but when I attempt to switch the image to another image like in this if statement, it creates and error.It essentially does not like the "=" operator being used, so I switched it to Is, and it still doesn't work (however, without displaying an error).(considering, the portrait options change depending on character class/gender, etc)?
View 7 Replies
Mar 16, 2011
How does one add a bitmap to a project so that you can refer to it by name? i.e. MyProject.MyBitmap.bmp
View 2 Replies
Jul 24, 2008
I have only recently started using VB.NET after having a little experience in VB6. I am trying hard to force myself into this OOP mindset. I want to know if a certain thing is possible.
I want to be able to call a function in the beginning of my main form's startup sub. The function call would look something like this.
Code:
Private Sub frmMain_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim Username, Password, NewPassword as String
[Code].....
View 3 Replies
Aug 15, 2008
I am trying to write a program in VB2008 Express. I originally wrote it in excel, but I want to add some features and make it a standalone executable. the program is ideal for a spreadsheet application though.
essentially, there are two input tables. each containing about 6 columns and maybe 10 rows. I assume that could be handled by arrays. the output would be a continuously updated table of output based on calculations using the data from the two input tables. the output table would be about 4 columns by up to 1000+ rows, and would need to be recalculated and displayed each time any data in the input tables has changed.
first, are arrays sufficient to handle this? would databases be more appropriate?
second, what's the best way to display a long list of output, that has a user defined length and is continually updated. it would also be nice to have the ability to click on an individual cell (or value) in the output and have more code executed.
is there a way to incorporate a spreadsheet like tool for this as a backend? I want to make sure i'm using the most efficient approach before i invest too much time.
View 1 Replies
Dec 20, 2010
I don't usually use VB but now I must for an assignment. I would like to know if it's possible to change the display name for an object on a listbox. For instance, if I add to it a user defined class, there's a way to provide it's display name, instead of converting it to string and then add it.
This is what I have
Dim format As String = FormatOutput(object)
Lista.Items.Add(format)
I would like to have the same output, but instead add the object.
Note: if such is not possible, then how can I associate the list box selection to the actual object? Doing it by index is painfull, because I'm using linked lists (ie., instead of arrays).
Note 2: python has a __str__ method which is called by default when the object is cast to string. Is there anything like it in VB?
View 6 Replies
Mar 10, 2009
Is there an easy way to display the rgb code of system colors in VB2008?
That is, I am looking for some code that will retrieve the names of the colors that are used in the system colors and display their rgb codes (and maybe show a sample), so I could display, for example, what the rgb code for "control" is.
View 1 Replies
Mar 4, 2010
I need to refer to some strings using an "indirect string" in the registry. It should be in this form:
@filename,resource
MSDN: "If the resource value is zero or greater, the number becomes the index of the string in the binary file. If the number is negative, it becomes a resource ID."How can I find out either of these numbers for my resources that only have names in VB? I also need the ID/index for the exe's icon.
View 2 Replies
Nov 19, 2010
I currently have the following code but I would like to get away from going to a physical location. If I have the icon as a resource, how can I programatically add the icon? I don't want to use the form's designer to do this.
Sub Form1_Load()
Dim ico As New System.Drawing.Icon("C:Resourcesicon.ico")
Me.Icon = ico
End Sub
View 2 Replies
Nov 19, 2010
Im working on a project that needs to print a report of one client.Everything went smooth untill i came across my multiline input text data.When i display it in the PrintPagePreview the text go's outside my page. Even when im printing it only the halve of my text is displayed. I googled and looked everywhere but i can't get a clear fix for it.
[Code]...
View 3 Replies
Jan 22, 2011
I used to program with Visual Basic 6, so I have alot of old programs that I'm updating, plus I'm learning the new VB2008 methods. I'm writing a program that replaces the old "BitBlit" function which is no longer supported by Visual Basic 2008. It involves three picture boxes, one holds the sprite bitmap, a second holds the mask (silhouette) of the sprite bitmap, and a third has a background image.
[Code]...
View 3 Replies
Aug 14, 2009
drawing text on a window which is not the current form's window.I remember doing this in Win32 api with getwindowdc(handle) to obtain a DC for the Window, then textout() on the DC.
View 2 Replies
Jan 12, 2010
how to create a user interface in a game such as the application XFire using Visual Basic?
View 3 Replies
Oct 19, 2008
I'm working on a design project where I have to use a Graphical User Interface that contains a drag and drop form. It consists of having a window dropped on a wall. Both of them are images to scale. I would like to know what kind of code I would have to use to show the x and y coordinates of one of the points of my window when dragged so when I drop it, I'm dropping in it on the desired coordinate of the wall.
View 2 Replies
Jan 12, 2011
Ok, I want to create a class that will handle a special rectangle graphic.In my form, I want to have two of these special rectangles. So, basically, I need two instances of that class in my form, right?I manage to initialize two, alright. But, how exactly am I supposed tomanage drawing/graphics etc in a class, and the results to be displayed in my form?
View 13 Replies
Oct 29, 2008
Using graphics paths for designing...but am getting an error when trying to add a shape to : _shapelist.add(createshape())
It says : Value of type 'system.drawing.drawing2d.graphicspath' cannot be converted to '1-dimensional array of system.drawing.drawing2d.graphicspath'
View 2 Replies
May 18, 2012
I was wondering if I could elicit some tips on how to procede with an interface design approach.That is. What is a good way to go about establishing a "work area" where one can have multiple "floating forms" in this area.Can you have a form which occupies the entire windows desk top and the other forms "float" in this space? the "floating" forms would need to interact with each other where pressing buttons etc on them would affect other forms on the "workspace") Or what would be a good way to start accomplishing that? Or is there a better way to get the same effect?
View 4 Replies
Apr 21, 2010
I'm trying to make a .dll that contains a lot of basic functionality that a program can use. Currently i am trying to use interfaces to make a lot of this functionallity independend of the program using it but i hit a snag. The Basic idea is that a programmer will create his own object using the interface discribed in my .DLL file. Then implements those functions as he likes. He can then instanciate a controller (found in the same DLL) and sends his custom object implementing the interface to that Controller. The controller can then be started and will take over all the work. I do not know what type of object is send to the controller and idealy i want to program it in such a fashion that i shouldn't care as long as the object send implements that interface.In code I am trying to achieve the following: (quite simplyfied)
.Dll:
Code:
Public Interface MyInterface '<----Decleration of the interfaceFunction GetData() As Integer
Function SetData(Data As Integer)
end interface
[code]....
this propperly. I know that the second i set the interface adaptor in the Controller VS comes nagging that it can not be converted to a "MyInterface" Class. Obviously i am doing something wrong. I can change the datatype that the controller expects to the "MyController" type but that would completely ruin the whole idea of flexibillity. I am hoping someone sees what i am trying to do and can point out where i made the thinking error.
View 6 Replies
May 21, 2012
Is this where i would post a picture of my interface and get feedback on changes for easier use? If not is there someplace on this forum or any other forum to do this?
View 1 Replies
Jan 19, 2011
So I decided to make my famous tile selector project, but instead of drawing in a form's graphics, do it inside a tabpage.Well, I managed to get it working, but it seems to... flicker.Normally, setting the form's DoubleBuffered property to True would help a lot there, but apparently, the tabpage has no such property.
When I invalidate the tabpage, I draw two images and fill one rectangle.Following past advice, those two images were created before, just once, and are stored in a variable so I don't create them every time I invalidate the tabpage.
View 1 Replies
Aug 1, 2010
Ok I have this: This makes a sub called 'graphicspaint' then writes "demo version" to a picturebox1
Code:
Imports System.Drawing
Imports System.Windows.Forms
[code]......
View 8 Replies
Dec 5, 2011
i whant do my own shadow effect. i can do the shandow. but how can i plus 2 bitmap images(1 above the other)?
View 15 Replies
Mar 18, 2010
Here's the code that I use to extract the icon size that I want:
Dim i As Icon = My.Resources.Spectrum
Using i2 As New Icon(i, New Size(256, 256))
Me.PictureBox1.Image = i2.ToBitmap
End Using
This works from 16x16 up to 128x128 but for 256x256 it extracts the 128x128 icon. I tried 0x0, because I seem to remember that that is how the large size is stored in the meta data, but that didn't work either.
View 3 Replies