|
Put a PictureBox on the form and in the code type the following when you want to display the gif.
PictureBox.Image = New Bitmap("GIF PATH")
Where PictureBox is the name of the picturebox and "GIF PATH" is the path of a gif file.
If you have a stream loaded with the gif picture in use the following:
PictureBox.Image = New Bitmap(GIF STREAM)
Where PictureBox is the name of the picturebox and GIF STREAM is the the stream. This can be useful if the gif is an embedded resoource in your app.
In such a case (The gif is an embedded resource) use:
PictureBox.Image = New Bitmap(GetType(FormName).Assembly.GetManifestResourceStream(("GIF RESOURCE NAME")
Where PictureBox is the name of the picturebox, FormName is the name of the form and "GIF RESOURCE NAME" is the complete name of the gif including any folders and the root namespace of your project and the .gif file extension. eg: "MyProject.MyGif.gif"
All this works for animated gifs as well.
Hope it's useful.
I also hope I didn't misunderstand you and that you actually meant 'How to programatically create an animated gif'
|
|
|
|
|
Hello,
i will serialize many classes. The XML root element has also the name of the class name. I want rename the XML root element in the target XML file. With wich serialize feature i can do it?
thanks
Armin
|
|
|
|
|
If everyone know to move toolstrip by mouse as Microsoft Office WOrd, ... Please help me.
................
|
|
|
|
|
If you are using Visual Studio 2005 there is a tool strip container control in the toolbox which allows users to dock toolbars on the top/bottom/left side/right side of the container. I'm not sure how to do it in any other version of Visual Studio though.
|
|
|
|
|
I mention that when the application is running how can move it?
................
|
|
|
|
|
If everyone know how to add icon to ToolStripComboBox in VB.NET 2005, please help or give me some example.
................
|
|
|
|
|
who can send me a application about the shield of alt+esc,ctrl+alt+del and alt+tab...in vb 6.0
thanks advance!!!!!!
初学者!Don't try it, just do it!
*Archibald*rever dragon!
|
|
|
|
|
It is not possible to block CTRL+ALT+DEL in all OS versions without recourse to writing your own GINA.dll - and entirely to advanced topic for this space, but suffice to say VB won't do it.
'--8<------------------------
Ex Datis:
Duncan Jones
Merrion Computing Ltd
|
|
|
|
|
|
Hi guys,
how can i disable/enable a parent form mainmenu from a child form?
tnx...
-::maximus::-
|
|
|
|
|
dim frm as frmMain
frm = me.mdiparent
frm.menuitem.enable = false
Mike Lasseter
|
|
|
|
|
Hello everybody:
I want to open MDI Form from another MDI Form in Parent form. can you tell me.
|
|
|
|
|
have the following forms
frm_main <- the parent form
frm_child <- the mdi child form
try this code
Dim child_form as new frm_child
child_form.show()
hope this'll help
-::maximus::-
-- modified at 2:09 Thursday 1st June, 2006
|
|
|
|
|
Hi,
Is it possible to create Pictureboxes during run time?
During design time, there is only 1 picturebox on the form but when the application is running, I would like to add more pictureboxes 'on the fly'.
Can this be done in vb.net?
|
|
|
|
|
hi
try this code
<br />
Dim tempPictureBox As New PictureBox <br />
tempPictureBox.Image = Image.FromFile("Sun.bmp")<br />
tempPictureBox.Location = New Point(50, 50)<br />
tempPictureBox.Size = New Size(100, 100)<br />
Me.Controls.Add(tempPictureBox)<br />
Tamimi - Code
|
|
|
|
|
ok......thank you!
|
|
|
|
|
Hi ,
in the first time you use your programme it is a normal thing that you the database you work in is empty that mean it has no rocords yet , & that also mean that you will recuperate just emptiness & this throws a debuguage
i want to know how to act with this case what is the code i should add to ma application to stop this bug ?? & to display empty textboxes & empty controls when i have nothing yet in ma database
thank you very much
try to be good if you can't be the best
|
|
|
|
|
Mohammed Amine wrote: in the first time you use your programme it is a normal thing that you the database you work in is empty that mean it has no rocords yet , & that also mean that you will recuperate just emptiness & this throws a debuguage
i want to know how to act with this case what is the code i should add to ma application to stop this bug ??
Do you mean you have a problem with NULL value. If so, try to read this document.[^]
|
|
|
|
|
HI ,
please i have finished ma application in vb.net & i want to deploy it can you tell me how ?? actualy i did a deployement for but i need you if you know to tell me what is the role of a register key in deployement & how can i attach a database with code & this is the interesting part
well here i will make things more clear to let you understand what i want :
i have a database an sql database "i'm working with SQL server 2000"
i knew how to integrate the two files of the database Mdf & the Ldf one in ma application
now i want how can attach this database to the server just with code
i have the two files Mdf & Ldf & i want to attach them to the server just with code can you tell me how please ???
thank you very much
try to be good if you can't be the best
|
|
|
|
|
Example your application name your.exe and your database name your.mdf
If you add file name your.exe to application folder you can see file your.mdf with it.
................
|
|
|
|
|
I have created a program that will access a webpage online using the built-in web browser in visual basic 2005 express, but if the user is NOT online, they get an ugly "Page Cannot Be Displayed" page. I want to be able to validate that the user is online so that I can redirect them to a custom page that I will store on their hard drive if necessary.
I am fairly new to vb, and would appreciate any help I can get.
Thanks in advance!!
|
|
|
|
|
I got the following code from http://www.devx.com/vb2themax/Tip/19159[^]
I haven't tested it, but it appears to be just a matter of making sure the wininet.dll is in the system directory and then calling IsConnectedToInternet function from your code. If it returns true you're connected, if false you're not. They you just change the location based on the response.
Private Declare Function InternetGetConnectedState Lib "wininet.dll" (ByRef _
lpSFlags As Long, ByVal dwReserved As Long) As Long
Const INTERNET_CONNECTION_MODEM = 1
Const INTERNET_CONNECTION_LAN = 2
Const INTERNET_CONNECTION_PROXY = 4
Const INTERNET_CONNECTION_MODEM_BUSY = 8
' return True if there is an active Internect connection
'
' optionally returns the connection mode through
' its argument (see INTERNET_CONNECTION_* constants)
' 1=modem, 2=Lan, 4=proxy
' 8=modem busy with a non-internet connection
Function IsConnectedToInternet(Optional connectMode As Integer) As Boolean
Dim flags As Long
' this ASPI function does it all
IsConnectedToInternet = InternetGetConnectedState(flags, 0)
' return the flag through the optional argument
connectMode = flags
End Function
|
|
|
|
|
I'm really new to vb and don't understand this code or how to use it... Does anyone out there know how I can impliment this into my program... Thanks.
|
|
|
|
|
Hi all,
I have an app which uses async socket and using state.sb.Append(Encoding.Default.GetString(state.buffer, 0, bytesRead)) to get resultant string and Dim byteData As [Byte]() = System.Text.Encoding.Default.GetBytes(data) to convert the string into bytes
. My problem is this String has Non Ascii characters and a two byte header appended. Is there a decoder and Encoder that can give me back the exact message back when I parse through the message. message from source is like.
..0421.>D.... ...B..."1643054521000000140120000000045000000502171701000002171701050208120216601190100C00000000C00000000064305480000000075656810000007430541000000007Tdi Mkt Circle Tdi GH7160202053716C00000000000000440210100000007565020000000205021717010000043054800000000000000000000000000000000000C00000000C00000000160101121000006165015211201210144002000058$.......EBGATMS ZIMSWITCH 00000200DebitGroup 30
But when decoded with the above I dont get the full message and when i try and convert it back to it original state I dont the correct stream.
Please assist
|
|
|
|
|
I dont't want anyone close my process,what can I do?
|
|
|
|