|
neetu149 wrote: the application must be simple without installing any extra softwares like dot net,ms access, sql, etc,.
Sure if you send me your address I'll send you a piece off paper and a pen.
|
|
|
|
|
Duuuuh thats installing extra software. FAIL!
|
|
|
|
|
thank you so much you have given me a good answer surely im in need of a pen and paper, as I started learning visual basic and in a few days I'm confident that I can prepare the application of my own..
thanks
|
|
|
|
|
How can I change my IP with New IP
|
|
|
|
|
|
Changing your IP is not as easy as 1, 2, 3. You will have to call up your ISP and request a static IP. Most of the time, they dynamically assign you one based on their allocation. Have fun!
Ranjit Viswakumar
Professional Services Specialist
http://hostmysite.com/?utm_source=bb
|
|
|
|
|
I use this and work only static IP. I use DOS command
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If RadioButton1.Checked Then
If Dir("C:\home.txt") <> "" Then
Shell("cmd.exe /c netsh -f c:\work.txt", vbHide)
MsgBox("Успешно приложихте Интернет настройки за дома")
Else
MsgBox("Нямате архивирани настройки за Интернет в къщи, моля първо ги създайте от менюто Архивирай настройки")
End If
End If
If RadioButton2.Checked Then
If Dir("C:\work.txt") <> "" Then
Shell("cmd.exe /c netsh -f c:\home.txt", vbHide)
MsgBox("Успешно приложихте Интернет настройки за работа")
Else
MsgBox("Нямате архивирани настройки за Интернет на работа, моля първо ги създайте от менюто Архивирай настройки")
End If
End If
End Sub
Private Sub ЗаИнтернетУДомаToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ЗаИнтернетУДомаToolStripMenuItem.Click
Shell("cmd.exe /c netsh -c interface dump > c:\home.txt ", vbHide)
MsgBox("Успешно прехвърлихте текущите настройки на интернет у дома")
End Sub
Private Sub ЗаИнтернетНаРаботаToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ЗаИнтернетНаРаботаToolStripMenuItem.Click
Shell("cmd.exe /c netsh -c interface dump > c:\work.txt ", vbHide)
MsgBox("Успешно прехвърлихте текущите настройки на интернет на работа")
End Sub
Private Sub RadioButton2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton2.CheckedChanged
End Sub
End Class
|
|
|
|
|
how to enhance the look or format of forms
|
|
|
|
|
|
how to draw line in menubar in vb
|
|
|
|
|
Its called Separator. You can add the menu separator by right clicking the MenuStrip->Insert->Separtor.
modified on Saturday, February 7, 2009 5:35 PM
|
|
|
|
|
I have a CRC32 function for calculating the CRC32 checksum of a byte array:
Private CRC32Table(255) As Integer
Public Sub New()
Dim dwPolynomial As Integer = &HEDB88320
Dim j, dwCrc As Integer
For i As Integer = 0 To 255
dwCrc = i
For j = 8 To 1 Step -1
If (dwCrc And 1) Then
dwCrc = ((dwCrc And &HFFFFFFFE) \ 2&) And &H7FFFFFFF
dwCrc = dwCrc Xor dwPolynomial
Else
dwCrc = ((dwCrc And &HFFFFFFFE) \ 2&) And &H7FFFFFFF
End If
Next j
CRC32Table(i) = dwCrc
Next
End Sub
Public Function GetCRC32(ByRef bt() As Byte) As Integer
Dim CRC32Result As Integer = -1
Dim iLookup As Integer
For Each b As Byte In bt
iLookup = (CRC32Result And 255) Xor b
CRC32Result = ((CRC32Result And -256) \ 256) And 16777215
CRC32Result = CRC32Result Xor CRC32Table(iLookup)
Next
Return CRC32Result
End Function
The thing is, i want to combine two calculated CRC32's...
Example:
The CRC32 of GetCRC32(New Byte() {1}) is 1526341860
The CRC32 of GetCRC32(New Byte() {2}) is -1007455906
Now, say i do not have access to the bytes anymore, but i do have access to the CRC32 results (1526341860 and -1007455906).
Is it possible to combine these results as if the original calculation were GetCRC32(New Byte() {1, 2}) ?
|
|
|
|
|
This is very easy to try with your own test data. You'll find that the two examples you provided will not come out equal. There is no way to combine the results to get the same data.
|
|
|
|
|
I developed an application which is based on capturing the screen shots and save as the desired name given by the user.I used sendkeys method to avoid the usage of typing
printscreen key in my keyboard to copy the current screen to my clipboard.In my case I used a picturebox to hold the image and for saving.But if we are pressing the PrintScreen key the it works and without that it also works.The problem occurs during the second time,error occurs that the clipboard is empty or a null value exception is occured.
here is the code which I used.
Public Class main_frm
Dim sav As New SaveFileDialog
Dim i As Integer = 0
Dim abc, nam, path As String
Dim opd As New FolderBrowserDialog
Private Sub main_frm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
disp_pb.SizeMode = PictureBoxSizeMode.StretchImage
abc = "D:\vishnu\Screen\Shots\"
'path = InputBox("Enter the location of file", "Please Respond", i)
End Sub
Private Sub capall_btn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles capall_btn.Click
'Try
Me.WindowState = FormWindowState.Maximized
Me.Hide()
SendKeys.Send("({PRTSC})")
disp_pb.Image = Clipboard.GetDataObject.GetData("Bitmap", True)
'Dim path As String
'abc = "D:\vishnu\a.jpg"
'disp_pb.Image.Save("D:\vishnu\a.jpg")
'path = "D:\vishnu\Screen\Shots\"
' abc = InputBox("Enter the name of file", "Please Respond", i)
' path = path + nam + ".jpg"
opd.ShowDialog()
path = opd.SelectedPath
path += "\"
nam = InputBox("Enter the name of file", "Please Respond", i)
path = path + nam + ".jpg"
disp_pb.Image.Save(path)
Me.Show()
Me.WindowState = FormWindowState.Normal
Clipboard.Clear()
'Catch ex As Exception
' MsgBox(ex.ToString)
' End Try
End Sub
Private Sub actcap_btn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles actcap_btn.Click
End Sub
End Class
|
|
|
|
|
|
Hi,
you don't need the PRNT SCRN key to capture the screen or the active window; there are better ways to get it done, search the nice CP articles on the subject.
And you definitely don't need a PictureBox to save the content to a file; PictureBoxes exist for
looking at an image, no more, no less.
BTW I did not look at your code since it has no formatting and no monospaced font. Please use
the "code block" button (which inserts PRE tags) when publishing some code.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
http://vbnet.mvps.org/index.html?code/bitmap/printscreenapi.htm
Sorry, I could not know how to post the address above as url.
hth
Samir R. Ibrahim
|
|
|
|
|
Hi
I am trying t print I-cards of employees, 4 at a time, on A-4 size paper. The program to generate these cards which is written by me,generates this Image of type '.JPEG'.Size is [640,1040].
Now, When I try to print cards on HP OfficeJet, if I select "Fax print" then it prints correctly, alignments are correct;but the print quality of image becomes poor.
I get the required quality by selecting "Photo Print" but then last 3 lines do not get printed. 3 lines get cropprd.
I don't understand the reason behind it. May I get some ideas??
|
|
|
|
|
Your description isn't very good and it's pretty difficult to diagnose a problem like this without actually seeing what you're getting as output. But, from what i can gather, you didn't check the size of the page you're printing on, didn't do the math to see if your images would fit, and did not scale the images accordingly when you rendered them using the Graphics object you got from the system.
|
|
|
|
|
I will try to explain it again.
The JPEG image of size 640 by 1050 pixels. "Fax print" and "photo print" are the print layouts which is asked to select at the time of printing.
|
|
|
|
|
And that doesn't help.
When you says stuff is getting "cut off", what do you mean?? Is it just the images on one side of the page?? More than one?? Which sides?? Maybe if you posted a link to a picture of the results...
|
|
|
|
|
Oops - that was meant to be the reply button, not the vote button
|
|
|
|
|
Right back at ya!
|
|
|
|
|
Selecting between fax print and photo print alters the device settings (dots per inch and page margins). Your print code needs to see what these settings are before it prints.
|
|
|
|
|
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at WindowsApplication1.Login.OK_Button_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.PerformClick()
at System.Windows.Forms.Form.ProcessDialogKey(Keys keyData)
at System.Windows.Forms.TextBoxBase.ProcessDialogKey(Keys keyData)
at System.Windows.Forms.Control.PreProcessMessage(Message& msg)
at System.Windows.Forms.Control.PreProcessControlMessageInternal(Control target, Message& msg)
at System.Windows.Forms.Application.ThreadContext.PreTranslateMessage(MSG& msg)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:----------------------------------------
Contact List
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:----------------------------------------
Microsoft.VisualBasic
Assembly Version: 8.0.0.0
Win32 Version: 8.0.50727.42 (RTM.050727-4200)
CodeBase: file:----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:----------------------------------------
System.Runtime.Remoting
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:----------------------------------------
ADODB
Assembly Version: 7.0.3300.0
Win32 Version: 7.10.2346
CodeBase: file:----------------------------------------
************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:
<configuration>
<system.windows.forms jitdebugging="true" />
</configuration>
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
Thanx's in advance.
|
|
|
|