|
Hi guys,
I want to take snapshot of form at runtime without manually pressing the 'Prt Scr' key is it possible if yes can any one guide me how. i want to stored the snap shot of the form in my database.
Please help me thanks in advance.
Sasmi
|
|
|
|
|
You have to create a Bitmap with form's size. Then, create a new Graphics from the Bitmap, and then call the "CopyFromScreen" method of the Graphics object. Here you have c# sample code... You only have to translate to vs basic.
Bitmap oCaptura = new Bitmap(this.Width, this.Height);
Graphics oGfx = Graphics.FromImage((Image)oCaptura);
oGfx.CopyFromScreen(...)
|
|
|
|
|
Helloo Friends,
I want to make my Datagridview column as numeric only.
How can we restrict user from entering other characters than numbers.
If we wnt to do this in case of textbox we will write code into textbox's keypress event.
So in case of datagridview How can we make numeric column?
I m developing application in VB.net(WinFroms)-2005
Thanks fro any help in Advance
"The Difficult i can do it now...
The Impossible will take a little longer."
|
|
|
|
|
What is the source code available to connect Visual Basic6.0 with Matlab
with best regards
poulomig
|
|
|
|
|
Hey all,
I have a form in which i want the user to be able to delete all there private data i.e. cookies, recent files, temp Internet files and stuff like that. What is the command to delete all the files in a certain folder and how would i make it recognise which account they are running the program and delete only there files.
Thank You
|
|
|
|
|
Just deleting the files in the user Temporary Internet Files folder, and subfolders, doesn't work. You have to call into the Win32 API to clear the browser history cache.
If you just want a utility, you can save yourself the time of writing something yourself by checking into something that's prewritten for you, like this[^].
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
What is the code for creating a md4 hash using vb.net?
Radiit
|
|
|
|
|
That's not recommended - MD4 is broken.
|
|
|
|
|
If you are using Visual Studio 2005 which is .net 2.0 you can do this if you can use MD5:
Dim data(DATA_SIZE) As Byte
' This is one implementation of the abstract class MD5.
Dim md5 As New MD5CryptoServiceProvider()
Dim result As Byte() = md5.ComputeHash(data)
Still it would be better to use SHA1. It is a stronger hash. Anyway that code looks like this:
Dim data(DATA_SIZE) As Byte
Dim result() As Byte
Dim sha As New SHA1CryptoServiceProvider()
' This is one implementation of the abstract class SHA1.
result = sha.ComputeHash(data)
If you are using .net 1.1 there aren't any framework libraries you can use. There are some third party tools, but you would most likely have to pay for them.
Hope that helps.
Ben
|
|
|
|
|
hello,
i want to know how to add print option in file menu .
please send brief discription and code.
|
|
|
|
|
How can I update the code in KB-180736 to work in Visual Basic 2003 .Net? I don't know how to create the Delegate function for SetTime and KillTimer.
hhuntman
|
|
|
|
|
Why not just use the built-in Timers in the .NET Framework?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
good day to everyone..
i need ur help very badly.. does anyboday knows or can guide me how to open an existing excel file through vb.net windows form with click event?....
start a new beginning in every ending; thats what life for......
|
|
|
|
|
Actually i've checked in .Net.
However i've used below code in VB6. Please check whether this works for you.
WorkPath = App.Path
fname = "trial.csv"
Set JetConn = CreateObject("ADODB.Connection")
JetConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Extended Properties='Text';Data Source='" & WorkPath & "';"
'Open CSV file to Add/Update Master records
Set newrs = CreateObject("ADODB.Recordset")
strSQL = "SELECT * FROM " & fname
newrs.Open strSQL, JetConn, 1, 2
Regards
KP
|
|
|
|
|
hey everyone, i am writing an application in vb.net
i use web matrix to generate my querys, when i run an update query and use it
it only update information that is not yet in the database that is.. if the field is empty then it will update it...but if there is information in the field..how do i up date it using a sql update statement
Nab
|
|
|
|
|
Is it an update query or an insert query that you have?
When you say "field", do you really mean a field, or do you mean a record? When you say that it's "empty", is it a field that is null, a field that is empty, or a record that doesn't exist?
An insert query will only add new records. An update query will only update records that exist, not create new ones. An update query will always update the values in the fields if the record exist, regardless of what the values were before.
---
single minded; short sighted; long gone;
|
|
|
|
|
its and update query.. and it giving me problem updating.. example.. in my project.. say i have three fields in the table..firstname, lastname, and middle name.. first name and lastname is monditary so information will always be in the table for first and last name.. and middle name might not have informaiton...
i use webmatrix to create my query and then place it in a class in my project then called it where it is needed..
problem: when i try to run an update.. if i try to update a record.. say John Brown is the person's name..if i try to change it to say..mary brown..its not updating..but if i try to change it to John James Brown..note this time, i only updated the middle name because before it didn't have one.. in this case it updates.. so i am wondering whats up with my query.. could u write me a simple update query and let me see if i can use it to test my project..becuase the generated ones not helping me..
thanks..
Nab
|
|
|
|
|
Here is an update query that you can use:
Dim queryString As String = "UPDATE [R_Application] SET [Fname]=@Fname, [Mname]=@Mname, [Lname]=@Lname WHERE (" & _
"[R_Application].[AppId] = @AppId)"
As you see, this is the same as you posted in your other thread. There is nothing wrong with it.
As I said in the other thread, you have to look for the error elsewhere in the code.
Debug the code and look carefully where you get the values from that you put in the parameters for the database call. I suspect that what you actually put in the parameters is the exact values that you find in the database.
---
single minded; short sighted; long gone;
|
|
|
|
|
I have a calculation (as can be seen below) and I want to make this number rounded to the nearest number (eg if the calc = 35.5 = 36 or 35, whichever!), how can i do this, i think the code is right, just not the right value in the round field!
'Initial Calculation
intPerc = ((intScoreTop + intScoreMid + intScoreBot + intScoreAll) * 2)
'Round int to nearest number
intPerc = Math.Round(0)
|
|
|
|
|
You can cast to int, or you can use Math.Ceil or Math.Floor to control the direction.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Try This, it may not be 100% correct but it should get you started:
dim original as string = ((intScoreTop + intScoreMid + intScoreBot + intScoreAll) * 2)<br />
dim determiner as string<br />
dim result as integer<br />
determiner = original.remove(0,indexof(".") + 1)<br />
determiner = determiner.remove(1,s2.length-1)<br />
<br />
if cint(s2) >= 5 then<br />
result = math.ceil(cint(s))<br />
elseif cint(s2) <5 then<br />
result = math.floor(cint(s))<br />
end if
Posted by The ANZAC
|
|
|
|
|
Wow - that's really messy.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
It is very interesting but what I noticed was the variables as (intscoretop, intscoremid,intscorebot and intscoreall) if you have defined these variables as INT32, it will automatically round any assigned value therefore if IntscoreTop = 35.6 will come up with 36 and no need to use math.Round function.
Math.Round function is used for double precision floating point numbers.
What a curious mind needs to discover knowledge is noting else than a pin-hole.
|
|
|
|
|
If the above poster assumption is correct then this it a mute point. However in your original code you were rounding zero, which should round to zero
intPerc = Math.Round(0) Math.Round takes a number and rounds it. You need to supply it with a number, in your case you did '0'. What you meant to do is:
intPerc = Math.Round(intPerc)
|
|
|
|
|
TwoFaced wrote: mute point
You mean a moot point.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|