11 Replies - 1257 Views - Last Post: 14 February 2013 - 11:56 AM Rate Topic: -----

#1 alobi  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 13
  • Joined: 21-January 13

Password form in VB.Net

Posted 08 February 2013 - 06:12 AM

Hi all
Is there a specific form in VB.Net for setting up password or you just use a window form and resize it.
Thanks
Is This A Good Question/Topic? 0
  • +

Replies To: Password form in VB.Net

#2 _HAWK_  Icon User is offline

  • Master(Of Foo)
  • member icon

Reputation: 1055
  • View blog
  • Posts: 4,085
  • Joined: 02-July 08

Re: Password form in VB.Net

Posted 08 February 2013 - 07:08 AM

Resize a form.
Was This Post Helpful? 0
  • +
  • -

#3 alobi  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 13
  • Joined: 21-January 13

Re: Password form in VB.Net

Posted 09 February 2013 - 01:20 AM

Thanks
Was This Post Helpful? 0
  • +
  • -

#4 BJseal91  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 68
  • Joined: 18-April 09

Re: Password form in VB.Net

Posted 12 February 2013 - 01:51 PM

or you can select login form it will make the form for you and have it the standard size or you can resize the form and add it yourself.
Was This Post Helpful? 0
  • +
  • -

#5 LilGhost  Icon User is offline

  • D.I.C Head

Reputation: 8
  • View blog
  • Posts: 98
  • Joined: 12-October 12

Re: Password form in VB.Net

Posted 12 February 2013 - 02:06 PM

Login form is really generic, but it's a good start. Also (assuming your password unlocks and then opens another form), i highly recommend using a pointer to connect the opening event for security reasons.
Was This Post Helpful? 0
  • +
  • -

#6 lar3ry  Icon User is offline

  • Coding Geezer
  • member icon

Reputation: 310
  • View blog
  • Posts: 1,290
  • Joined: 12-September 12

Re: Password form in VB.Net

Posted 12 February 2013 - 04:17 PM

View PostLilGhost, on 12 February 2013 - 03:06 PM, said:

Login form is really generic, but it's a good start. Also (assuming your password unlocks and then opens another form), i highly recommend using a pointer to connect the opening event for security reasons.

Pointer?
Was This Post Helpful? 0
  • +
  • -

#7 LilGhost  Icon User is offline

  • D.I.C Head

Reputation: 8
  • View blog
  • Posts: 98
  • Joined: 12-October 12

Re: Password form in VB.Net

Posted 12 February 2013 - 06:50 PM

View Postlar3ry, on 12 February 2013 - 04:17 PM, said:

View PostLilGhost, on 12 February 2013 - 03:06 PM, said:

Login form is really generic, but it's a good start. Also (assuming your password unlocks and then opens another form), i highly recommend using a pointer to connect the opening event for security reasons.

Pointer?

A pointer, without going into too much detail, is basically sending something and modifying values without modifying the original value itself. Now, i'm not a professional, i'm just a kid in high school, so i kindly ask that a professional (c++ expert preferably, as pointers are avidly used in c++) further explain these.

However, this is what i mean by pointer:
Dim formToShow As New Windows.Forms.Form
Public showForm As Boolean = False
Sub loginPressed() Handles Button1.Click
If password = "password here" Then ' or what ever you use for authentication.
ShowForm = True
formToShow = Form2
formToShow.Show
End If
End Sub



Then in the form2 (formToShow) load events:
sub loading() handles mybase.load
If form1.ShowForm Then
' proceed to load
Else
Application.Exit()
End If
end sub



so basically, formToShow is a pointer to form2. And this isn't making a new object of form2 but rather assigning another way to open the form. Just saying formToShow.Show somewhere in the code, wont do a thing. And "ShowForm" is just a secondary precaution.

Anyways, you can get into multilevel-pointers when doing advanced programming (primarily used in game design) and that's some really interesting stuff because most people who call themselves "game hackers" only know how to modify dynamic addresses, but you can trace back dynamic addresses to static pointers. Then you can get into making masks and patterns for sig scanners so you can always get the right static pointer every time the program runs even if it's updated. Like such:
Posted Image

But anyways, point is that pointers can help when securing applications by making them harder to crack.

This post has been edited by LilGhost: 12 February 2013 - 06:52 PM

Was This Post Helpful? 0
  • +
  • -

#8 lar3ry  Icon User is offline

  • Coding Geezer
  • member icon

Reputation: 310
  • View blog
  • Posts: 1,290
  • Joined: 12-September 12

Re: Password form in VB.Net

Posted 12 February 2013 - 09:05 PM

I see where you're coming from, but VB.Net doesn't have pointers.
I once thought it did, but better minds than mine corrected me.
Was This Post Helpful? 0
  • +
  • -

#9 LilGhost  Icon User is offline

  • D.I.C Head

Reputation: 8
  • View blog
  • Posts: 98
  • Joined: 12-October 12

Re: Password form in VB.Net

Posted 13 February 2013 - 01:29 PM

View Postlar3ry, on 12 February 2013 - 09:05 PM, said:

I see where you're coming from, but VB.Net doesn't have pointers.
I once thought it did, but better minds than mine corrected me.


Actually, i'd choose to argue that. I believe you can pass around a pointer by using the "ByRef" instead of "ByVal". Now, i haven't looked into the "ByRef" option all to closely, but, using logic, we can assume it means, "By Reference". At which point it's technically a pointer.
Was This Post Helpful? 0
  • +
  • -

#10 andrewsw  Icon User is online

  • Fire giant boob nipple gun!
  • member icon

Reputation: 3473
  • View blog
  • Posts: 11,792
  • Joined: 12-December 12

Re: Password form in VB.Net

Posted 13 February 2013 - 01:38 PM

VB.NET does have pointers, although they are not encouraged but have uses with unmanaged code: IntPtr, particularly with other languages that do support pointers (and the Win32 API).

ByRef does use a pointer behind the scenes - every language does. It is more a question of semantics, or accepted usage; that is, within .NET we don't talk about pointers :)
Was This Post Helpful? 0
  • +
  • -

#11 lar3ry  Icon User is offline

  • Coding Geezer
  • member icon

Reputation: 310
  • View blog
  • Posts: 1,290
  • Joined: 12-September 12

Re: Password form in VB.Net

Posted 14 February 2013 - 10:48 AM

View PostLilGhost, on 13 February 2013 - 02:29 PM, said:

Actually, i'd choose to argue that. I believe you can pass around a pointer by using the "ByRef" instead of "ByVal". Now, i haven't looked into the "ByRef" option all to closely, but, using logic, we can assume it means, "By Reference". At which point it's technically a pointer.

Well, you could call it a pointer, and of course, in the generated machine code, it does behave as a pointer to a particular thing. Before you call it a pointer, though, please try passing the address of the second character in a String, or try, in your Sub or Function, to increment the "pointer" passed in.

In managed code, a ByRef argument is treated, and acts like a ByVal, and not like a pointer. When you use ByVal, you are similarly getting an address of the argument passed in, except that the address points to a copy of the object. In other words, you cannot do pointerish things with what has been passed in.

As I say, you could call it a pointer, but if you want to communicate meaningfully with other VB.Net coders, you should probably avoid that.
Was This Post Helpful? 1
  • +
  • -

#12 CodingSup3rnatur@l-360  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 991
  • View blog
  • Posts: 971
  • Joined: 30-September 10

Re: Password form in VB.Net

Posted 14 February 2013 - 11:56 AM

Quote

As I say, you could call it a pointer, but if you want to communicate meaningfully with other VB.Net coders, you should probably avoid that.


I agree. It will certainly confuse communication. More than that though, as you touched upon, its not even correct to talk about references as pointers (or, at least, addresses). Pointers are generally more powerful than references, and you can do more with them. The fact that Microsoft's current CLR implementation happens to implement references using pointers (or, more accurately, memory addresses) is purely an implementation detail. They could have been implemented as opaque handles.

Here is a good blog post I read a while back about this subject. It's about C#, but applies to VB.NET also.


Quote

Actually, i'd choose to argue that. I believe you can pass around a pointer by using the "ByRef" instead of "ByVal". Now, i haven't looked into the "ByRef" option all to closely, but, using logic, we can assume it means, "By Reference". At which point it's technically a pointer.


I find that the use of the terms ByVal and ByRef is responsible for an awful lot of confusion.

ByVal means you copy the value you are passing to the method, and then pass that value. If you are passing an instance of a class, the 'value' that is copied is the reference to the instance (a copy of the instance itself is NOT made), but if you are dealing with a structure, that 'value' is indeed a copy of the actual structure itself.

ByRef really just means that the parameter and the argument refer to the same location (as in, one is the parameter is an alias for the argument). In practical terms, I believe Microsoft's CLR implements that by getting a reference to the value you are passing to the method, and then passing that reference to the method. If you are dealing with an instance of a class, you are therefore effectively passing a reference to a reference, but if you are dealing with a structure, you pass a reference to that structure (note that this does NOT make the structure a reference type!).

This post has been edited by CodingSup3rnatur@l-360: 14 February 2013 - 02:33 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1